Ticket #140 (closed defect: fixed)

Opened 2 months ago

Last modified 2 months ago

NameError in asn1fields.py

Reported by: sylvain@droids-corp.org Assigned to: pbi
Priority: minor Milestone: mainstream
Component: Scapy Version: 2.0.0.x
Keywords: Cc:

Description

Looks like there's a bug when trying to make an SNMP packet.

# cat test.py
from scapy.all import *

print conf.version

p = IP()/UDP()/SNMP(PDU=SNMPget(varbindlist=[SNMPvarbind(oid=ASN1_OID("1.3.6.1.2.1.1.1"))]))
p.show()

# python2.5 test.py
WARNING: No route found for IPv6 destination :: (no default route?)
2.0.0.9 beta
Traceback (most recent call last):
  File "test.py", line 5, in <module>
    p = IP()/UDP()/SNMP(PDU=SNMPget(varbindlist=[SNMPvarbind(oid=ASN1_OID("1.3.6.1.2.1.1.1"))]))
  File "/tmp/scapy-2.0.0.9/scapy/packet.py", line 251, in __div__
    cloneB = other.copy()
  File "/tmp/scapy-2.0.0.9/scapy/packet.py", line 131, in copy
    clone.fields[k]=self.get_field(k).do_copy(clone.fields[k])
  File "/tmp/scapy-2.0.0.9/scapy/asn1fields.py", line 75, in do_copy
    return x.copy()
  File "/tmp/scapy-2.0.0.9/scapy/packet.py", line 131, in copy
    clone.fields[k]=self.get_field(k).do_copy(clone.fields[k])
  File "/tmp/scapy-2.0.0.9/scapy/asn1fields.py", line 79, in do_copy
    if isinstance(x[i], Packet):
NameError: global name 'Packet' is not defined

Attachments

Change History

10/01/08 19:05:51 changed by pbi

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in [b8c1666c4723].


Add/Change #140 (NameError in asn1fields.py)




Change Properties
Action