scapy - Name Error "global name 'Padding' is not defined"
<p>Im trying to write little http proxy server just for testing how scapy handles packet with <code>StreamSocket</code>.</p>

<pre><code>from scapy.all import *
import socket

sk = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
print "Start"
sk.bind(("127.0.0.1",8090))
sk.listen(1)
conn , addr = sk.accept()
ss = StreamSocket(conn)
r = ss.recv(2048)
print r
ss.close()
</code></pre>

<p>When I got the line <code>r = ss.recv(2048)</code> it says (on scapy 2.2.0):</p>

<pre><code>Traceback (most recent call last):
File "&lt;string&gt;", line 254, in run_nodebug
File "C:\Python26\ProxyServer\module1.py", line 21, in &lt;module&gt;
    r = ss.recv()
File "C:\Python26\lib\site-packages\scapy\supersocket.py", line 126, in recv
    pad = pkt.getlayer(Padding)
NameError: global name 'Padding' is not defined
</code></pre>

<p>I have tried to update my scapy (from 2.2.0 to 2.3.2) and it does the same error:</p>

<pre><code>Traceback (most recent call last):
File "&lt;string&gt;", line 254, in run_nodebug
File "C:\Python26\ProxyServer\module1.py", line 21, in &lt;module&gt;
    r = ss.recv()
File "C:\Python26\lib\site-packages\scapy\supersocket.py", line 126, in recv
    pkt = self.basecls(pkt)
NameError: global name 'Padding' is not defined
</code></pre>

<p>Please Help?
sorry for my bad english</p>

<p>Note: I have windows 7 64 bit , python 2.6 and now scapy 2.3.2</p>