kbandla / dpkt

fast, simple packet creation / parsing, with definitions for the basic TCP/IP protocols
Other
1.09k stars 271 forks source link

Exception with DTP #440

Closed kylekeppler closed 5 years ago

kylekeppler commented 5 years ago

dtp represents DTP.data as a list of (type, data). Packet.__bytes__ was throwing an exception due to this.

I defined DTP.__bytes__ that re-packs the DTP.data to a bytearray

I am not very familiar with DTP, but it seemed the rest of the modules coverts obj.data to a bytearray by overriding Packet.__bytes__.

kylekeppler commented 5 years ago

@brifordwylie it looks like travis is having some troubles

brifordwylie commented 5 years ago

@kylekeppler looking now...

brifordwylie commented 5 years ago

@kylekeppler okay fixed on master. you can either... 1) Look at this PR and make the same change yourself

Probably better to do 2)

kylekeppler commented 5 years ago

@brifordwylie thanks! merged and pushed

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.01%) to 88.749% when pulling d266853135200a62957ff169388c67cdbac5a39d on kylekeppler:bugfix/dtp_bytes into 6291ed4fe3ca88ba5ff21b0dee22e70702e452cc on kbandla:master.