I am trying to get a batch script which will do the below task.
- Telnet to any website on port 80 (
telnet google.com 80
) - Execute HTTP GET request (
GET / HTTP/1.1
andhost: google.com
) - Redirect this output to the txt file.
I want the output in .txt files as shown below.
Filename: HTTP.txt
HTTP/1.1 302 Found
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Location: http://www.google.co.in/?gfe_rd=cr&ei=ClUXV8WSEujI8Aep2L7oAQ
Content-Length: 261
Date: Wed, 20 Apr 2016 10:08:10 GMT
I want a batch file to auto input HTTP GET request and to set the HTTP host as well.