Sponsored Content
Special Forums Cybersecurity Openssl s_client Adding Headers Manually Post 302925860 by metallica1973 on Wednesday 19th of November 2014 06:15:36 PM
Old 11-19-2014
Openssl s_client Adding Headers Manually

Daily stupid question:

How can I successfully add/pass HTTP options to openssl? I am trying to get a response from our test web server /vpn/index.html for testing an application. I can successfully get it doing it the manually way like:
Code:
openssl s_client -connect 192.168.3.20:443
 blah blah blah
 PSK identity: None
 PSK identity hint: None
 Start Time: 1416438768
 Timeout   : 300 (sec)
 Verify return code: 0 (ok)
---
GET /vpn/index.html HTTP/1.0\r\nHost: 192.168.3.20\r\nUser-Agent: Mozilla/5.0\r\n\r\n\n
blah blah blah
                </div>
            </div>
            <div id="logonbelt-bottomshadow">
            </div>
        </div>
<DIV id=scriptArea></DIV>
<script type="text/javascript" language="javascript">
Resources.Load();
</script>
</BODY>
</HTML>
closed

I need the output via
Code:
echo -ne "GET /vpn/index.html HTTP/1.0\r\nHost: 192.168.3.20\r\nUser-Agent: Mozilla/5.0\r\n\r\n\n" | openssl s_client -connect 192.168.3.20:443

so I dont have to do it the manual way like above but for some odd reason my one liner displays nothing. ????

Last edited by metallica1973; 11-20-2014 at 03:06 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Remove text between headers while leaving headers intact

Hi, I'm trying to strip all lines between two headers in a file: ### BEGIN ### Text to remove, contains all kinds of characters ... Antispyware-Downloadserver.com (Germany)=http://www.antispyware-downloadserver.c om/updates/ Antispyware-Downloadserver.com #2... (3 Replies)
Discussion started by: Trones
3 Replies

2. UNIX for Dummies Questions & Answers

cron-apt - adding X-headers

Hi, We use a ticket system for our IT queries called OTRS. Emails sent to that system are placed in ticket queues. OTRS reads X- headers in emails as described here: http://dev.jasonpruim.com/otrs/doc/X-OTRS-Headers.txt We would like to be able to configure cron-apt to place certain X-... (1 Reply)
Discussion started by: karuna
1 Replies

3. Shell Programming and Scripting

Merging of files with different headers to make combined headers file

Hi , I have a typical situation. I have 4 files and with different headers (number of headers is varible ). I need to make such a merged file which will have headers combined from all files (comman coluns should appear once only). For example - File 1 H1|H2|H3|H4 11|12|13|14 21|22|23|23... (1 Reply)
Discussion started by: marut_ashu
1 Replies

4. Shell Programming and Scripting

How to use s_client command

HI, Am not able to close open ssl session once after excuting the s_client command.Please help me. Find below command which am using in my script: ===================================== openssl s_client -connect localhost:443 -debug >/tmp/tempfile.txt 2>&1 after this can you please... (2 Replies)
Discussion started by: sparks
2 Replies

5. Shell Programming and Scripting

Transpose multipe columns to rows and adding headers

Hi, I found the following awk script to transpose multiple (3) columns to multiple rows: #=== BEGIN {FS=","} { for (i=1;i<=NF;i++) { arr=$i; if(nf<= NF) nf=NF; } nr=NR } END { for(i=1;i<=nf;i++) { (8 Replies)
Discussion started by: Gery
8 Replies

6. Solaris

Adding Broastcaste i.p manually

Hi, I am trying to add one interface manually using plumb command. After that it is showing point to point communication. But it should show broadcaste. ce3: flags=1000851<UP,POINTOPOINT,RUNNING,MULTICAST,IPv4> mtu 1500 index 6 inet 10.136.11.225 --> 10.136.11.1 netmask... (2 Replies)
Discussion started by: kkarthik_kaja
2 Replies

7. Shell Programming and Scripting

Help with joining files and adding headers to files

Hi, I have about 20 tab delimited text files that have non sequential numbering such as: UCD2.summary.txt UCD45.summary.txt UCD56.summery.txt The first column of each file has the same number of lines and content. The next 2 column have data points: i.e UCD2.summary.txt: a 8.9 ... (8 Replies)
Discussion started by: rrdavis
8 Replies

8. Programming

Check The value a pointer returned by struct s_client != 0

Hi guys , i got segment fault , and when i trace , found it happens since the value of pointer which is returned by Struct S_client (*ptr) is zero if (ptr !=0)i know , adding above line of code is not the solution and not correct for the case since above line only check for the pointer... (1 Reply)
Discussion started by: pooyair
1 Replies

9. Red Hat

Issue w/manually installing OpenSSL 1.0.1j

My Redhat Enterprise 5 system is vulnerable to POODLE and there does not seem to be a Redhat fix coming down the pipe. So I have downloaded OpenSSL 1.0.1j from source and built it. My question is ho do I make sure the Apache and Tomcat use the1.0.1j version and not the distro version. Thanks,... (0 Replies)
Discussion started by: caspersgrin
0 Replies

10. UNIX for Beginners Questions & Answers

Adding to an array in an external file, and adding elements to it.

I have an array in an external file, "array.txt", which contains: char *testarray={"Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"};I want to be able to add an element to this array, and have that element display, whenever I call it, without having to recompile... (29 Replies)
Discussion started by: ignatius
29 Replies
Dancer::Response(3pm)					User Contributed Perl Documentation				     Dancer::Response(3pm)

NAME
Dancer::Response - Response object for Dancer SYNOPSIS
# create a new response object Dancer::Response->new( status => 200, content => 'this is my content' ); Dancer::SharedData->response->status; # 200 # fetch current response object my $response = Dancer::SharedData->response; # fetch the current status $response->status; # 200 # change the status $response->status(500); PUBLIC API
new Dancer::Response->new( status => 200, content => 'my content', headers => HTTP::Headers->new(...), ); create and return a new Dancer::Response object current my $response = Dancer::SharedData->response->current(); return the current Dancer::Response object, and reset the object exists if ($response->exists) { ... } test if the Dancer::Response object exists content # get the content my $content = $response->content; my $content = Dancer::SharedData->response->content; # set the content $response->content('my new content'); Dancer::SharedData->response->content('my new content'); set or get the content of the current response object status # get the status my $status = $response->status; my $status = Dancer::SharedData->response->status; # set the status $response->status(201); Dancer::SharedData->response->status(201); set or get the status of the current response object content_type # get the status my $ct = $response->content_type; my $ct = Dancer::SharedData->response->content_type; # set the status $response->content_type('application/json'); Dancer::SharedData->response->content_type('application/json'); set or get the status of the current response object pass $response->pass; Dancer::SharedData->response->pass; set the pass value to one for this response has_passed if ($response->has_passed) { ... } if (Dancer::SharedData->response->has_passed) { ... } test if the pass value is set to true halt Dancer::SharedData->response->halt(); $response->halt; halted if (Dancer::SharedData->response->halted) { ... } if ($response->halted) { ... } header # set the header $response->header('X-Foo' => 'bar'); Dancer::SharedData->response->header('X-Foo' => 'bar'); # get the header my $header = $response->header('X-Foo'); my $header = Dancer::SharedData->response->header('X-Foo'); get or set the value of a header headers $response->headers(HTTP::Headers->new(...)); Dancer::SharedData->response->headers(HTTP::Headers->new(...)); return the list of headers for the current response headers_to_array my $headers_psgi = $response->headers_to_array(); my $headers_psgi = Dancer::SharedData->response->headers_to_array(); this method is called before returning a PSGI response. It transforms the list of headers to an array reference. perl v5.14.2 2012-01-28 Dancer::Response(3pm)
All times are GMT -4. The time now is 11:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy