與其糾纏 Scapy 『新舊版本』一時間之『環境變數』的問題︰
root@kali:~# scapy INFO: Can't import PyX. Won't be able to use psdump() or pdfdump(). WARNING: No route found for IPv6 destination :: (no default route?) aSPY//YASa apyyyyCY//////////YCa | sY//////YSpcs scpCY//Pp | Welcome to Scapy ayp ayyyyyyySCP//Pp syY//C | Version 2.4.0 AYAsAYYYYYYYY///Ps cY//S | pCCCCY//p cSSps y//Y | https://github.com/secdev/scapy SPPPP///a pP///AC//Y | A//A cyP////C | Have fun! p///Ac sC///a | P////YCpc A//A | Craft packets before they craft scccccp///pSP///p p//Y | you. sY/////////y caa S//P | -- Socrate cayCyayP//Ya pY/Ya | sY/PsY////YCc aC//Yp sc sccaCY//PCypaapyCP//YSs spCPY//////YPSps ccaacs using IPython 5.8.0 >>>
※參考︰
root@kali:~# cd /usr/lib/python2.7/dist-packages/scapy root@kali:/usr/lib/python2.7/dist-packages/scapy# nano extlib.py .. MATPLOTLIB = 0 MATPLOTLIB_INLINED = 0 MATPLOTLIB_DEFAULT_PLOT_KARGS = dict() log_loading.info("Can't import matplotlib. Won't be able to plot.") ## PYX def _test_pyx(): """Returns if PyX is correctly installed or not""" try: with open(os.devnull, 'wb') as devnull: r = subprocess.check_call(["pdflatex", "--version"], stdout=devnull(dirname {PYTHON:-python} PYTHONPATH=PYTHON -m scapy $@
root@kali:~# python Python 2.7.15+ (default, Aug 31 2018, 11:56:52) [GCC 8.2.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pyx >>>
及在 kali 系統中需要麻煩驗證安裝的 □○︰
apt-get install cython
apt-get install libgeos-dev
apt-get install libproj-dev
pip install cartopy
root@kali:~# python Python 2.7.15+ (default, Aug 31 2018, 11:56:52) [GCC 8.2.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from scapy.all import * >>> conf.geoip_city = "/root/test/GeoLite2-City_20181030/GeoLite2-City.mmdb" >>> ans,uans = traceroute(["www.google.co.uk", "www.secdev.org"], verbose=0) >>> ans.world_trace()
何不就直接闖蕩『筆記本』之天下呦☆
apt-get install ipython ipython3
apt-get install jupyter-notebook python3-notebook python-notebook
jupyter-notebook –allow-root
scapy/doc/notebooks/Scapy in 15 minutes.ipynb