I have a Centos machine that has two network interfaces, and I need to sent a hex String and force it to one of the interfaces.
I found the socket.bind
and socket.connect
methods, but the thing is - the destination I want to send the hex string to has no ip or port, its a TenGigaBit port on some machine that has no ip.
If it will help, I was able to send the a pcap file to the TenGigaBit port (no ip or port) with tcpreplay, like this:
tcpreplay --intf1=eth0 --cachefile=file.pcap
I want to be able to do the same, with a hex String (either in python or tcpreplay) and send a hex String.