View | Details | Raw Unified | Return to bug 230110 | Differences between
and this patch

Collapse All | Expand All

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

Return to bug 230110