scapy-python

https://www.cnblogs.com/Emoth/p/8610755.html

 

https://pypi.org/project/scapy-python3/

 如下:在ubuntu下,直接scapy或者./scapy进不去scapy交互式界面,因为kamene是新的包名字,所以要用kamene来进入交互式界面

root@ubuntu:/home/vigossr/scapy/Network/ARP# scapy

        PIP package scapy-python3 used to provide scapy3k, which was a fork from scapy implementing python3 compatibility since 2016. This package was included in some of the Linux distros under name of python3-scapy. Starting from scapy version 2.4 (released in March, 2018) mainstream scapy supports python3. To reduce any confusion scapy3k was renamed to kamene. 
You should use either pip package kamene for scapy3k (see http://github.com/phaethon/kamene for differences in use) or mainstream scapy (pip package scapy, http://github.com/secdev/scapy).  

Traceback (most recent call last):
  File "/usr/local/bin/scapy", line 25, in <module>
    interact()
  File "/usr/local/lib/python3.5/dist-packages/scapy/main.py", line 461, in interact
    init_session(session_name, mydict)
  File "/usr/local/lib/python3.5/dist-packages/scapy/main.py", line 329, in init_session
    scapy_builtins = {k: v for k, v in six.iteritems(importlib.import_module(".all", "scapy").__dict__) if _validate_local(k)}  # noqa: E501
  File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 665, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/usr/local/lib/python3.5/dist-packages/scapy/all.py", line 5, in <module>
    raise Exception(msg)
Exception: 
        PIP package scapy-python3 used to provide scapy3k, which was a fork from scapy implementing python3 compatibility since 2016. This package was included in some of the Linux distros under name of python3-scapy. Starting from scapy version 2.4 (released in March, 2018) mainstream scapy supports python3. To reduce any confusion scapy3k was renamed to kamene. 
You should use either pip package kamene for scapy3k (see http://github.com/phaethon/kamene for differences in use) or mainstream scapy (pip package scapy, http://github.com/secdev/scapy).  

root@ubuntu:/home/vigossr/scapy/Network/ARP# kamene
WARNING: No route found for IPv6 destination :: (no default route?). This affects only IPv6
INFO: Please, report issues to https://github.com/phaethon/kamene
INFO: Can't import python cryptography lib. Won't be able to decrypt WEP.
INFO: Can't import python cryptography lib. Disabled IPsec encryption/authentication.
INFO: Can't import python cryptography. Disabled certificate manipulation tools
WARNING: IPython not available. Using standard Python shell instead.
Welcome to kamene (3.0.0)
>>> a=IP(ttl=10)
>>> a.show()
###[ IP ]###
  version= 4
  ihl= None
  tos= 0x0
  len= None
  id= 1
  flags= 
  frag= 0
  ttl= 10
  proto= hopopt
  chksum= None
  src= 127.0.0.1
  dst= 127.0.0.1
  \options\
>>> a=IP(src='192.168.1.1',dst='1.1.1.1')
>>> a.show()
###[ IP ]###
  version= 4
  ihl= None
  tos= 0x0
  len= None
  id= 1
  flags= 
  frag= 0
  ttl= 64
  proto= hopopt
  chksum= None
  src= 192.168.1.1
  dst= 1.1.1.1
  \options\

  

posted @ 2019-07-18 16:29  月亮上的石头  阅读(1381)  评论(0编辑  收藏  举报