--- Makefile (revision 495742) +++ Makefile (working copy) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= scapy -PORTVERSION= 2.3.3 +PORTVERSION= 2.4.2 DISTVERSIONPREFIX= v CATEGORIES= net @@ -10,47 +10,52 @@ COMMENT= Powerful interactive packet manipulation program in python LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/LICENSE +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}libdnet>0:net/py-libdnet@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pcap>0:net/py-pcap@${PY_FLAVOR} + +USES= python:2.7 +USE_PYTHON= autoplist distutils USE_GITHUB= yes GH_ACCOUNT= secdev -RUN_DEPENDS= ${PYTHON_SITELIBDIR}/dnet.so:net/py-libdnet@${PY_FLAVOR} \ - ${PYTHON_SITELIBDIR}/pcap.py:net/py-pcap@${PY_FLAVOR} - -USES= python:2.7 -USE_PYTHON= autoplist distutils NO_ARCH= yes -OPTIONS_DEFINE= PYX PYCRYPTO PYGNUPLOT GRAPH P0F_BASE QUESO_BASE NMAP MANUF MATPLOT -PYX_DESC= PostScript and PDF graphs drawing -PYCRYPTO_DESC= Use py-crypto for WEP decoding -PYGNUPLOT_DESC= Use py-gnuplot wrapper to plot graphs +OPTIONS_DEFINE= GRAPH IPYTHON P0F_BASE MANUF MATPLOT NMAP PYCRYPTO PYGNUPLOT PYX QUESO_BASE SOX GRAPH_DESC= graph generation and visualization -P0F_BASE_DESC= p0f OS signatures database -QUESO_BASE_DESC= queso OS signatures database -NMAP_DESC= nmap OS signatures database +IPYTHON_DESC= Use IPython (enhanced interactive shell) MANUF_DESC= wireshark's MANUF MAC database MATPLOT_DESC= Install python matplotlibs +NMAP_DESC= nmap OS signatures database +P0F_BASE_DESC= p0f OS signatures database +PYCRYPTO_DESC= Use py-crypto for WEP decoding +PYGNUPLOT_DESC= Use py-gnuplot wrapper to plot graphs +PYX_DESC= PostScript and PDF graphs drawing +QUESO_BASE_DESC=queso OS signatures database SOX_DESC= Support for VoIP -PYX_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/pyx/__init__.py:graphics/py-PyX12@${PY_FLAVOR} -PYCRYPTO_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/Crypto/__init__.py:security/py-pycrypto@${PY_FLAVOR} -PYGNUPLOT_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/Gnuplot/__init__.py:math/py-gnuplot@${PY_FLAVOR} GRAPH_RUN_DEPENDS= ${LOCALBASE}/bin/MagickCore-config:graphics/ImageMagick6 \ ${LOCALBASE}/bin/dot:graphics/graphviz +IPYTHON_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}ipython>0:devel/ipython@${PY_FLAVOR} +NMAP_RUN_DEPENDS= ${LOCALBASE}/share/nmap/nmap-os-db:security/nmap +MANUF_RUN_DEPENDS= ${LOCALBASE}/share/wireshark/manuf:net/wireshark +MATPLOT_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}/matplotlib/__init__.py:math/py-matplotlib@${PY_FLAVOR} P0F_BASE_RUN_DEPENDS= ${LOCALBASE}/etc/p0f.fp:net-mgmt/p0f +PYCRYPTO_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}/Crypto/__init__.py:security/py-pycrypto@${PY_FLAVOR} +PYGNUPLOT_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}/Gnuplot/__init__.py:math/py-gnuplot@${PY_FLAVOR} +PYX_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}/pyx/__init__.py:graphics/py-PyX12@${PY_FLAVOR} QUESO_BASE_RUN_DEPENDS= ${LOCALBASE}/etc/queso.conf.sample:net/queso -NMAP_RUN_DEPENDS= ${LOCALBASE}/share/nmap/nmap-os-db:security/nmap -MANUF_RUN_DEPENDS= ${LOCALBASE}/share/wireshark/manuf:net/wireshark -MATPLOT_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/matplotlib/__init__.py:math/py-matplotlib@${PY_FLAVOR} SOX_RUN_DEPENDS= ${LOCALBASE}/bin/sox:audio/sox post-patch: @${REINPLACE_CMD} "s,share/man/man1,man/man1," ${WRKSRC}/setup.py + @${REINPLACE_CMD} "s,pdflatex,pdftex," ${WRKSRC}/scapy/extlib.py @${REINPLACE_CMD} "s,/usr/share/,${LOCALBASE}/share/," \ - ${WRKSRC}/scapy/data.py ${WRKSRC}/scapy/utils6.py \ - ${WRKSRC}/scapy/modules/nmap.py + ${WRKSRC}/scapy/data.py \ + ${WRKSRC}/scapy/modules/nmap.py \ + ${WRKSRC}/scapy/utils6.py @${REINPLACE_CMD} "s,/etc/,${LOCALBASE}/etc/," \ - ${WRKSRC}/scapy/modules/p0f.py ${WRKSRC}/scapy/modules/queso.py + ${WRKSRC}/scapy/modules/p0f.py .include --- distinfo (revision 495742) +++ distinfo (working copy) @@ -1,3 +1,3 @@ -TIMESTAMP = 1513871305 -SHA256 (secdev-scapy-v2.3.3_GH0.tar.gz) = 67642cf7b806e02daeddd588577588caebddc3426db7904e7999a0b0334a63b5 -SIZE (secdev-scapy-v2.3.3_GH0.tar.gz) = 1459132 +TIMESTAMP = 1552603437 +SHA256 (secdev-scapy-v2.4.2_GH0.tar.gz) = 141ee386cf6f296e8c9fae94a40a5386ac2d9bfa43a3870b13f575200c46b5f8 +SIZE (secdev-scapy-v2.4.2_GH0.tar.gz) = 3330071 --- files/patch-scapy_config.py (nonexistent) +++ files/patch-scapy_config.py (working copy) @@ -0,0 +1,20 @@ +--- scapy/config.py.orig 2019-03-14 21:06:18 UTC ++++ scapy/config.py +@@ -16,7 +16,7 @@ import socket + import sys + + from scapy import VERSION, base_classes +-from scapy.consts import DARWIN, WINDOWS, LINUX ++from scapy.consts import BSD, DARWIN, WINDOWS, LINUX + from scapy.data import ETHER_TYPES, IP_PROTOS, TCP_SERVICES, UDP_SERVICES, \ + MANUFDB + from scapy.error import log_scapy, warning, ScapyInvalidPlatformException +@@ -431,7 +431,7 @@ def _set_conf_sockets(): + """Populate the conf.L2Socket and conf.L3Socket + according to the various use_* parameters + """ +- if conf.use_bpf and not DARWIN: ++ if conf.use_bpf and not BSD: + Interceptor.set_from_hook(conf, "use_bpf", False) + raise ScapyInvalidPlatformException("Darwin (OSX) only !") + if conf.use_winpcapy and not WINDOWS: --- pkg-descr (revision 495742) +++ pkg-descr (working copy) @@ -1,13 +1,14 @@ -Scapy is a powerful interactive packet manipulation program. It is -able to forge or decode packets of a wide number of protocols, send -them on the wire, capture them, match requests and replies, and much -more. It can easily handle most classical tasks like scanning, -tracerouting, probing, unit tests, attacks or network discovery (it -can replace hping, 85% of nmap, arpspoof, arp-sk, arping, tcpdump, -tethereal, p0f, etc.). It also performs very well at a lot of other -specific tasks that most other tools can't handle, like sending -invalid frames, injecting your own 802.11 frames, combining technics -(VLAN hopping+ARP cache poisoning, VOIP decoding on WEP encrypted -channel, ...), etc. +Scapy is a powerful interactive packet manipulation program. It is able to forge +or decode packets of a wide number of protocols, send them on the wire, capture +them, match requests and replies, and much more. +It can easily handle most classical tasks like scanning, tracerouting, probing, +unit tests, attacks or network discovery (it can replace hping, 85% of nmap, +arpspoof, arp-sk, arping, tcpdump, tethereal, p0f, etc.). + +It also performs very well at a lot of other specific tasks that most other +tools can't handle, like sending invalid frames, injecting your own 802.11 +frames, combining technics (VLAN hopping+ARP cache poisoning, VOIP decoding on +WEP encrypted channel, ...), etc. + WWW: http://secdev.org/projects/scapy