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
unbound-streamtcp(1)						      unbound						      unbound-streamtcp(1)

NAME
unbound-streamtcp - unbound DNS lookup utility SYNOPSIS
unbound-streamtcp [-unsh] [-f ipaddr[@port]] name type class DESCRIPTION
unbound-streamtcp sends a DNS Query of the given type and class for the given name to the DNS server over TCP and displays the response. If the server to query is not given using the -f option then localhost (127.0.0.1) is used. More queries can be given on one commandline, they are resolved in sequence. The available options are: name This name is resolved (looked up in the DNS). type Specify the type of data to lookup. class Specify the class to lookup for. -u Use UDP instead of TCP. No retries are attempted. -n Do not wait for the answer. -s Use SSL. -h Print program usage. -f ipaddr[@port] Specify the server to send the queries to. If not specified localhost (127.0.0.1) is used. EXAMPLES
Some examples of use. $ unbound-streamtcp www.example.com A IN $ unbound-streamtcp -f 192.168.1.1 www.example.com SOA IN $ unbound-streamtcp -f 192.168.1.1@1234 153.1.168.192.in-addr.arpa. PTR IN EXIT CODE
The unbound-streamtcp program exits with status code 1 on error, 0 on no error. AUTHOR
This manual page was written by Tomas Hozza <thozza@redhat.com>. NLnet Labs Mar 21, 2013 unbound-streamtcp(1)
All times are GMT -4. The time now is 12:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy