Openssl s_client Adding Headers Manually


 
Thread Tools Search this Thread
Special Forums Cybersecurity Openssl s_client Adding Headers Manually
# 1  
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..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
Login or Register to Ask a Question