E1M1 Posted September 17, 2013 Posted September 17, 2013 Hello I am trying to get server response, but as soon as I use https instead of http I get nothing. if you replace https with http and 443 with 80 then it works fine. header.txt GET {GET} HTTP/1.1 Host: {host} User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Connection: keep-alive Cache-Control: max-age=0 autoit code TCPStartup() $url = "https://www.google.com" $parts = StringSplit($url,"/") $main = $parts[1] if StringLeft($main ,4) = "http" Then $main = $parts[3] EndIf $header = fileread("header.txt") $get = "" For $i = 4 to $parts[0] $get &= "/"&$parts[$i] Next $header = StringReplace($header,"{host}", $main) $header = StringReplace($header,"{GET}", $get) $ip = TCPNameToIP($main) ConsoleWrite($ip & @CRLF) ConsoleWrite($header & @CRLF) $hconn = TCPConnect($ip ,443) TCPSend($hconn,$header) While 1 Sleep(10) $recv = TCPRecv($hconn,4096) if @error Then Exit If $recv <> "" Then ConsoleWrite(BinaryToString($recv)&@CRLF) EndIf WEnd edited
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now