I am trying to build IP and TCP packets from scratch in Python and am having some difficulty. I started out using ctypes.create_string_buffer() and loading it up with struct.pack_into() but I don't like the hex representation it creates, makes it hard for me to calculate the checksum (converting the hex to something that arithmetic ops can be applied to). I would love it if I could somehow manipulate raw bytes instead of types because I am doing several bitwise ops. Any one have any suggestions for me?
No replies to this topic
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









