Hey,
I've written a http sniffer that monitors the traffic on port 80.
This application works like it should be but there is one small problem.
Suppose I run the application and I surf to www.google.be then I retrieve
all the HTTP messages (Response and Request)
but the content of the message is gzip encoded (http compression).
Here you see the original message:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Content-Encoding: gzip
Server: GWS/2.1
Content-Length: 1763
Date: Sun, 01 Oct 2006 09:22:42 GMT
< Wr۸@F '(qֵDf'l.n NsL[<$
-{=~zc<? %1-X"s|8~ sF%.1-5
D
OMiWg-qF',*
&T
3wR[͵?OX7#"Z MSEZ3Z2~sN|c
Sew{f* m"Tir7G ?>DfU""1 L
>ʤ.I6YN2 \?%|1I6 Jh:J(IG:oY6\ ' +~Hj"' ),+)'
;6 "V0uyfdY+ h*Qffes[>"!؍?,S? `yٺ<'.7$$knJ 3+ra*' PMOa'p}^ 1.ZIXXL Gm ɏ|vJ janoD m8oj
sbAL, "I.[zѳ~Pʲ?PSY$ jfY.TL"'= "'<Ҧ1 K.,
$uE&vU4u KMMO'ͲVw. Be.!WSV7 Z9z,,l X*V"iI"?&?. O{a>'?BKާ Z!<<^RQOA SbI-K'gh-z6_ĢI ~\pO.[Y:\YE5 X*!g)Y9x *a(kZN? :z]^?č"S*b-X{XH3
yuON7NZrt skyfHfYi zW֢Wsoa_-NW̤* m
44P.D.F*Ay ??vk.я `0"CfYfi s?{c
jx7a,O[?z[Ͽm.fQ<|$K
~<dT-(?-F7jva
vypG <MOM@ĺsFdq _`I<#hP bk'EcSL ?Cb@A| >r%JoS Q?0'f?,
l|n[ Vox,.~ToA? Yjׁ)*T ˧-3?̏e8o.0 ik
t'Um^,x :f-8ic"sf* 3W|Z|RYy "_%,@x
6lu\2q?^ w\,H* o?b'乶Sv G_M"?WT
When I copy the encoded content into notepad and save it as a gz file.
If I try to decompress it, I receive "CRC is invalid".
I've tried several things but nothing seems to work.
Has anybody how I can decompress the content of this message so I retrieve
the html code?
Thx in advance
Frederik