Diagnose my Python/Scapy errors anyone? - Programming On Unix

Users browsing this thread: 1 Guest(s)
Derby
Long time nixers
Had trouble with my Debian partition so thought it would be best to make the inevitable change to Kali (I know, no one will think this is a good idea but I mainly use Linux for pen testing anyway)

Anyway, I am attempting IPv6 packets on Scapy with a very basic script so far it gives the same error if I run through the commands in the Scapy interface as if I run the Python code.

The code I get is as follows:

Code:
import logging
import sys
from scapy.all import *

conf.iface='eth0'
conf.route6.add(dst="fe80::60c:ceff:fee2:d4fe", gw="fe80::21f:c6ff:fe5d:8a38")
print conf.route6
i=IPv6()
i.dst="fe80::60c:ceff:fee2:d4fe"
i.src="fe80::21f:c6ff:fe5d:8a38"
i.display()
q=ICMPv6EchoRequest(data = "lol")
q.display()
p=(i/q)
reply=sr1(p)
reply.show()

The errors I get are as follows:

Code:
WARNING: No route found for IPv6 destination :: (no default route?)
Destination                   Next Hop                  iface  src candidates          
fe80::/64                     ::                        eth0   fe80::21f:c6ff:fe5d:8a38
::1/128                       ::                        lo     ::1                    
fe80::21f:c6ff:fe5d:8a38/128  ::                        lo     ::1                    
fe80::60c:ceff:fee2:d4fe/128  fe80::21f:c6ff:fe5d:8a38  lo     :, :, 1                
###[ IPv6 ]###
  version   = 6
  tc        = 0
  fl        = 0
  plen      = None
  nh        = No Next Header
  hlim      = 64
  src       = fe80::21f:c6ff:fe5d:8a38
  dst       = fe80::60c:ceff:fee2:d4fe
###[ ICMPv6 Echo Request ]###
  type      = Echo Request
  code      = 0
  cksum     = None
  id        = 0x0
  seq       = 0x0
  data      = 'lol'
Begin emission:
ERROR: --- Error in child 10355
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/scapy/sendrecv.py", line 89, in sndrcv
    pks.send(p)
  File "/usr/local/lib/python2.7/dist-packages/scapy/arch/linux.py", line 375, in send
    iff,a,gw  = x.route()
  File "/usr/local/lib/python2.7/dist-packages/scapy/layers/inet6.py", line 356, in route
    return conf.route6.route(dst)
  File "/usr/local/lib/python2.7/dist-packages/scapy/route6.py", line 232, in route
    srcaddr = get_source_addr_from_candidate_set(dst, p[1][1])
  File "/usr/local/lib/python2.7/dist-packages/scapy/utils6.py", line 144, in get_source_addr_from_candidate_set
    candidate_set.sort(cmp=rfc3484_cmp, reverse=True)
AttributeError: 'str' object has no attribute 'sort'

I am running rather late on the thesis the Scapy code implementation will be for (I have a week to implement, document, evaluate and conclude) so if ANYONE has suggestions as to how to remedy this I will be eternally grateful.

If anymore information is needed I'll be happy to provide.

Thanks,

Lux


Messages In This Thread
Diagnose my Python/Scapy errors anyone? - by Derby - 28-08-2013, 01:18 PM