logo       

Bug in Packet.sprintf(): msg#00018

security.scapy.general

Subject: Bug in Packet.sprintf()

Hi,

According to Packet.sprintf(), the following should work:

>>> IP(dst='127.0.0.1').sprintf('%dst%')
Traceback (most recent call last):
File "<console>", line 1, in ?
File "scapy-1.0.0.47.py", line 4148, in sprintf
raise Exception("Bad format string [%%%s%s]" % (fmt[:25], fmt [25:] and "..."))
Exception: Bad format string [%dst%]

The attached *patch*

Attachment: sprintf.patch
Description: Binary data

fixes it:

>>> IP(dst='127.0.0.1').sprintf('%dst%')
'127.0.0.1'

Guillaume



---------------------------------------------------------------------
Desinscription: envoyez un message a: scapy.ml-unsubscribe@xxxxxxxxxx
Pour obtenir de l'aide, ecrivez a: scapy.ml-help@xxxxxxxxxx
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise