aboutsummaryrefslogtreecommitdiff
path: root/net/scapy
diff options
context:
space:
mode:
authorMuhammad Moinur Rahman <bofh@FreeBSD.org>2019-04-10 22:40:35 +0000
committerMuhammad Moinur Rahman <bofh@FreeBSD.org>2019-04-10 22:40:35 +0000
commitceb9b15c43681a76b6d9b48d687f198670896074 (patch)
tree15d0ca49d55cd7552874f5274314a2b877ec2460 /net/scapy
parent4a1556aba2b0343a4ab9abd9b241b943d152bf57 (diff)
downloadports-ceb9b15c43681a76b6d9b48d687f198670896074.tar.gz
ports-ceb9b15c43681a76b6d9b48d687f198670896074.zip
Notes
Diffstat (limited to 'net/scapy')
-rw-r--r--net/scapy/Makefile58
-rw-r--r--net/scapy/distinfo6
-rw-r--r--net/scapy/files/patch-scapy_config.py23
-rw-r--r--net/scapy/pkg-descr23
4 files changed, 73 insertions, 37 deletions
diff --git a/net/scapy/Makefile b/net/scapy/Makefile
index 24aadbbcf80e..f174ac297153 100644
--- a/net/scapy/Makefile
+++ b/net/scapy/Makefile
@@ -2,55 +2,67 @@
# $FreeBSD$
PORTNAME= scapy
-PORTVERSION= 2.3.3
+PORTVERSION= 2.4.2
DISTVERSIONPREFIX= v
CATEGORIES= net
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
-MAINTAINER= vanhu@FreeBSD.org
+MAINTAINER= bofh@FreeBSD.org
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
+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
-P0F_BASE_RUN_DEPENDS= ${LOCALBASE}/etc/p0f.fp:net-mgmt/p0f
-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}
+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
SOX_RUN_DEPENDS= ${LOCALBASE}/bin/sox:audio/sox
+.if ${FLAVOR:Upy27:Mpy27}
+IPYTHON_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}ipython5>0:devel/ipython5
+.endif
+.if ${FLAVOR:Upy36:Mpy3*}
+IPYTHON_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}ipython>0:devel/ipython
+.endif
+
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 <bsd.port.mk>
diff --git a/net/scapy/distinfo b/net/scapy/distinfo
index 81f34654504b..fdfa9b74580d 100644
--- a/net/scapy/distinfo
+++ b/net/scapy/distinfo
@@ -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
diff --git a/net/scapy/files/patch-scapy_config.py b/net/scapy/files/patch-scapy_config.py
new file mode 100644
index 000000000000..6867f0a8e97a
--- /dev/null
+++ b/net/scapy/files/patch-scapy_config.py
@@ -0,0 +1,23 @@
+--- scapy/config.py.orig 2019-01-10 18:33:08 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,9 +431,9 @@ 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 !")
++ raise ScapyInvalidPlatformException("BSD-like (OSX, *BSD...) only !")
+ if conf.use_winpcapy and not WINDOWS:
+ Interceptor.set_from_hook(conf, "use_winpcapy", False)
+ raise ScapyInvalidPlatformException("Windows only !")
diff --git a/net/scapy/pkg-descr b/net/scapy/pkg-descr
index fb73b010094d..f6c5e9af369c 100644
--- a/net/scapy/pkg-descr
+++ b/net/scapy/pkg-descr
@@ -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