socket send query

Eddie Corns eddie at holyrood.ed.ac.uk
Wed Feb 18 14:17:31 EST 2004


sb at networkdata.co.uk (connections  cardiff) writes:

>hi all,

>i want to mimic what another software program sends to a server.

>if i look with a sniffer i can see the hex data that is being sent by
>the real software program.

>how can i send such data?

>if i send the hex data values with a socket send then python assumes i
>am trying to send a string of ascii characters and when i look at what
>was sent in the sniffer i see the data i sent has been coverted into
>their corresponding hex values.  I want python to leave it alone and
>send it.

>i guess if my hex values had acsii equivalents i could send them and
>they would be converted to the data i want but i dont think all my hex
>data has acsii equivalents..

>is there another way i should be doing this?

>PS.  IN CASE YOU DIDNT NOTICE I AM A NEWBIE!

>many thanks

This is one of the few instances where it's easier to do on Windows than
Unix.  Do a google on "winpcap python" and see if you can find anything that
looks useful (there are quite a few).  You should also be able to find
packages that do this, eg excalibur (IIRC) allows you to interactively create
packets (but it runs like a dog:().  Googling on "winpcap" will give you lots
of links.

Eddie




More information about the Python-list mailing list