Jump to content

Null byte problem.


AzKay
 Share

Recommended Posts

$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP.Open("GET", "http://www.google.com.au/intl/en_au/images/logo.gif", False)
$oHTTP.Send()
ConsoleWrite(StringToBinary($oHTTP.ResponseText) & @CRLF)

47494638396114016E00E70000FFFFFFF7FBFFE7EBFFC6D7FFBDCFEFADC7F7A5~

Seems that autoit cuts it off when it sees the first 00, Any ideas on getting around this? Edited by AzKay
# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Link to comment
Share on other sites

.ResponseBody has never worked for me in autoit. Works fine in vbs though;

$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP.Open("GET", "http://www.google.com.au/intl/en_au/images/logo.gif", False)
$oHTTP.Send()
MsgBox(0, "", $oHTTP.ResponseBody) ;Returns blank?

Set oHTTP = CreateObject("winhttp.winhttprequest.5.1")
oHTTP.Open "GET", "http://www.google.com.au/intl/en_au/images/logo.gif", False
oHTTP.Send
MsgBox oHTTP.ResponseBody
# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Link to comment
Share on other sites

  • 1 year later...

I have run into a similar problem, but I have actually had ResponseBody work on certain machines (XP for sure, and some 2000 machines I think). Could this possibly be a problem with an out-of-date DLL or COM object?

I am using WinHttpRequest object in order to initially post login credentials and then keep the session alive...any suggestions for another library to use? I'll probably try to implement the INET functionality by ParoXsitiC in the mean time.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...