Hello all.
I have spent some time reading perl books and writing my first perl scripts and now I have a script that reads data from iptables ipqueue (tcp port 80) and it prints all that tcp data to stdout.
From there I can pipe it to grep or sed and print only parts of that data that I'm interested of, for example like this:
Code:
bt ~ # /root/Desktop/tcp-payload.pl |sed -n '/<iframe/,/\/iframe>/p'
That would print out only http traffic that is between <iframe> tags.
But there is one thing that really bugs me, it is that when there is pictures like .jpg .png it really messes up things. You can test how it messes things up by catting .jpg or .png images.
Code:
cat /path/to/some.jpg
Is there some non printable characters or something similar (binary data?) messing up things ?
I believe what I need is somekind of filter that transforms that data/characters to printable characters like "*" .
If someone could point me to right direction (or give links to pages that I could read) it would be great.
tia
/////