I am working on network analyzer. I have used code available form http://www.binarytides.com/python-packet-sniffer-code-linux/. The data section output of the program is as follows:
Content-Type: text/html; charset=iso-8859-1M�Ak�0 ���ZO�aQz��▒�&e�� �s�эU���V:���� ����'qW�oձ.�U�UP7/�~ ��}�v��*n�<���J&��W/�%mb��7ドル��a���I�����G���D�RYO�&�Gx֗�uC▒~t�!B�7�.@ !� ��>�6��yԭ%��X9�7�i�i ��w���
�� O��?6�]��l���K��
I need to convert this raw data into readable form and then analyze the data.I am using using python 2.7.
1 Answer 1
If you look at the Content-Encoding header, it says gzip. This means that the web-page is compressed using the gzip algorithm. As such it's binary data that you can't print out, you have to uncompress it first.
You can use the Python gzip module for that.
iso-8859-1as the header says.