I recently downloaded BT5R3 for one of my Scapy project and when I tried to run send() command using a Python script file, I got below error message. (
Backtrack is in default installation)

root@bt:~/Desktop/lab 1/Q2# python Q2.py
WARNING: No route found for IPv6 destination :: (no default route?)
Traceback (most recent call last):
File "Q2.py", line 7, in <module>
send(fragment(ip/tcp,fragsize=16))
File "/usr/lib/pymodules/python2.6/scapy/sendrecv.py", line 235, in send
__gen_send(conf.L3socket(*args, **kargs), x, inter=inter, loop=loop, count=count,verbose=verbose)
File "/usr/lib/pymodules/python2.6/scapy/sendrecv.py", line 207, in __gen_send
x = SetGen(x)
NameError: global name 'SetGen' is not defined

Then I checked it with BT5R1 and it works fine. Therefore I compared sendrecv.py file in R1 and R3. Then I found out in script file, "from base_classes import SetGen" line in header is missing in R3. R3 works fine after I add above line to the sctipt file.


Please check below error messages also,

root@bt:~/Desktop/lab 1/Q2# python Q2.py
WARNING: No route found for IPv6 destination :: (no default route?)
Traceback (most recent call last):
File "Q2.py", line 8, in <module>
ans,unans=sr(ip/tcp, "X"*1000000)
File "/usr/lib/pymodules/python2.6/scapy/sendrecv.py", line 298, in sr
s = conf.L3socket(filter=filter, iface=iface, nofilter=nofilter)
File "/usr/lib/pymodules/python2.6/scapy/arch/linux.py", line 311, in __init__
attach_filter(self.ins, filter)
File "/usr/lib/pymodules/python2.6/scapy/arch/linux.py", line 120, in attach_filter
raise Scapy_Exception("Filter parse error")
NameError: global name 'Scapy_Exception' is not defined


root@bt:~/Desktop/firewall lab 1/Q2# python Q2.py
WARNING: No route found for IPv6 destination :: (no default route?)
Begin emission:
./usr/lib/pymodules/python2.6/scapy/packet.py:295: DeprecationWarning: 'H' format requires 0 <= number <= 65535
p = self.post_build(pkt,pay)
ERROR: --- Error in child 2062
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/scapy/sendrecv.py", line 85, in sndrcv
pks.send(p)
File "/usr/lib/pymodules/python2.6/scapy/arch/linux.py", line 385, in send
for p in fragment(x):
NameError: global name 'fragment' is not defined


Module comparison

In BT5R1

import cPickle,os,sys,time,subprocess
from select import select
from data import *
import arch
from config import conf
from packet import Gen
from utils import warning,get_temp_file,PcapReader,wrpcap
import plist
from error import log_runtime,log_interactive
from base_classes import SetGen


In BT5R3

import cPickle,os,sys,time,subprocess
from select import select
from data import *
from arch import *
from config import conf
from packet import Gen
from utils import warning
import plist
from error import log_runtime,log_interactive