mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2004
Posts: 10
T
Pikka bird
OP Offline
Pikka bird
T
Joined: May 2004
Posts: 10
Hi. I have a problem getting google's homepage. I actually get what a HTTP sniffer would get but i can't decode it like it is with a browser. I just get a bunch of strange character but nothing understandable. Can someone tell me what happened to this site? No addon like !google search work now.
Instead of html code i get something like this ‹ ÿVÛn7}÷W0ëÖ–I+9v.–¸E$iŠ  Œ}¨Û€»;»K„KR$ײjèïø;ücîE–,WŽ$‘œ™3œËáÌ
Thank you for explaining what is this encoding...and how i get rid of it....

Joined: Dec 2003
Posts: 219
F
Fjord artisan
Offline
Fjord artisan
F
Joined: Dec 2003
Posts: 219
Hi!

Please post the HTTP query you're sending to Google.
A good one should be:

GET / HTTP/1.1
Host: www.google.com
User-Agent: Mozilla/5.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
Accept-Language: en-us,en;q=0.5
Connection: Keep-Alive

Everything has to be terminated with a $crlf and a blank $crlf line at the end.

Joined: May 2003
Posts: 79
A
Babel fish
Offline
Babel fish
A
Joined: May 2003
Posts: 79
No, you're wrong, I tested this one and it works perfectly.
!google by sax

Joined: May 2004
Posts: 10
T
Pikka bird
OP Offline
Pikka bird
T
Joined: May 2004
Posts: 10
Thank you... I checked my header (forgot accept-language) and actually..that was strange...My http sniffer was showing me that kind of strange stuff i talked about while it was okay under mirc. So that works, thank you smile
Still i have another problem, with babelfish this time...I have the strange characters under mirc too.
My header must be wrong (although it's exactly the same as my http sniffer - HTTPLook by the way) If you can correct what's wrong....

sockwrite -tn TRANSLATESock POST /babelfish/tr HTTP/1.1 $+ $crlf
sockwrite -tn TRANSLATESock Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */* $+ $crlf
sockwrite -tn TRANSLATESock Referer: http://world.altavista.com/ $+ $crlf
sockwrite -tn TRANSLATESock Accept-Language: fr $+ $crlf
sockwrite -tn TRANSLATESock Content-Type: application/x-www-form-urlencoded $+ $crlf
sockwrite -tn TRANSLATESock Accept-Encoding: gzip, deflate $+ $crlf
sockwrite -tn TRANSLATESock User-Agent: Mozilla/5.0 $+ $crlf
sockwrite -tn TRANSLATESock Host: world.altavista.com $+ $crlf
sockwrite -tn TRANSLATESock Content-Length: $+ $len(doit=done&intl=1&tt=urltext&urltext= $+ $hget(lang,lang_enco) $+ &lp= $+ $hget(lang,translate)) $+ $crlf
sockwrite -tn TRANSLATESock Connection: Close $+ $crlf
sockwrite -tn TRANSLATESock Cache-Control: no-cache
sockwrite -tn TRANSLATESock $crlf
sockwrite -tn TRANSLATESock doit=done&intl=1&tt=urltext&urltext= $+ $hget(lang,lang_enco) $+ &lp= $+ $hget(lang,translate)
sockwrite -tn TRANSLATESock $crlf

--------------------------------------------------------------------

well of course the request is a little bit more complicated here:
$hget(lang,lang_enco) is the text to translate
$hget(lang,translate) --> original language / translate language (value is "fr_en" for french to english for test purpose)

if you see anything wrong....
I have to say, this script i made was working fine for a long time and suddenly ... it stopped...I don't understand...

thank you

Joined: Mar 2004
Posts: 457
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Mar 2004
Posts: 457
as long as you got a blank line with $crlf at the bottom, you do NOT need $crlf at the end of every line.

quote from the help file:
"The -n switch appends a $crlf to the line being sent if it's not a &binvar and if it doesn't already have a $crlf."

Joined: May 2004
Posts: 10
T
Pikka bird
OP Offline
Pikka bird
T
Joined: May 2004
Posts: 10
yes, I thought so but when I don't know what to do, i try anything crazy
It doesn't change anything for me with or without the $crlf
Thank you!

Joined: May 2004
Posts: 10
T
Pikka bird
OP Offline
Pikka bird
T
Joined: May 2004
Posts: 10
okay...found what's wrong...I share it with you just in case...
I put a Accept-Encoding: gzip, deflate $+ $crlf in my script to look like a web browser request but never do that, you can't decode it with mirc. So just scratch this line and it's okay! :tongue:


Link Copied to Clipboard