Sign in to follow this  
Followers 0
AzKay

Null byte problem.

8 posts in this topic

#1 ·  Posted (edited)

$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- #

Share this post


Link to post
Share on other sites



This can't be right...

StringToBinary

did you try just...

ConsoleWrite($oHTTP.ResponseText & @CRLF)


f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Share this post


Link to post
Share on other sites

Yeah, That returns just; GIF89an. So I used StringToBinary to see where it was stopping at.


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

Also, I think you need to use ResponseBody

Lar.


f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Share this post


Link to post
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- #

Share this post


Link to post
Share on other sites

ResponseBody uses Byref ... so ... problem.

Lar.


f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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
Sign in to follow this  
Followers 0