mike01 / pypacker

:package: The fastest and simplest packet manipulation lib for Python
GNU General Public License v2.0
251 stars 46 forks source link

Replace string type with byte type in missed places. #16

Closed NazarTkachuk closed 7 years ago

NazarTkachuk commented 7 years ago

Replace string type with byte type for default values in packet field. In certain modules rfb.py, mb.py

Example: pypacker/pypacker/layer567/smb.py

class SMB(pypacker.Packet): hdr = [ ("proto", "4s", b""), ("cmd", "B", 0), ("err", "I", 0), ("flags1", "B", 0), ("flags2", "B", 0), ("pad", "6s", ""), # replace with b"" ("tid", "H", 0), ("pid", "H", 0), ("uid", "H", 0), ("mid", "H", 0) ]

pypacker/pypacker/layer567/rfb.py class SetPixelFormat(pypacker.Packet): hdr = ( ("pad", "3s", ""), # replace with b"" ("pixel_fmt", "16s", "") # replace with b"" )

mike01 commented 7 years ago

Thx, will be merged