1*8460358cSPatrick WilliamsSUMMARY = "Network scanning and manipulation tool"
2*8460358cSPatrick WilliamsDESCRIPTION = "Scapy is a powerful interactive packet manipulation program. \
3*8460358cSPatrick WilliamsIt is able to forge or decode packets of a wide number of protocols, send \
4*8460358cSPatrick Williamsthem on the wire, capture them, match requests and replies, and much more. \
5*8460358cSPatrick WilliamsIt can easily handle most classical tasks like scanning, tracerouting, probing, \
6*8460358cSPatrick Williamsunit tests, attacks or network discovery (it can replace hping, 85% of nmap, \
7*8460358cSPatrick Williamsarpspoof, arp-sk, arping, tcpdump, tethereal, p0f, etc.). It also performs very \
8*8460358cSPatrick Williamswell at a lot of other specific tasks that most other tools can't handle, like \
9*8460358cSPatrick Williamssending invalid frames, injecting your own 802.11 frames, combining technics \
10*8460358cSPatrick Williams(VLAN hopping+ARP cache poisoning, VOIP decoding on WEP encrypted channel, ...), etc."
11*8460358cSPatrick WilliamsSECTION = "security"
12*8460358cSPatrick WilliamsLICENSE = "GPL-2.0-only"
13*8460358cSPatrick Williams
14*8460358cSPatrick WilliamsLIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
15*8460358cSPatrick Williams
16*8460358cSPatrick Williams# If you want ptest support, use the git repo
17*8460358cSPatrick Williams# UTscapy does not exist in the pypi pkg
18*8460358cSPatrick Williams#
19*8460358cSPatrick WilliamsSRCREV = "f7a64114b35fd8ee63ce07290f8a2dffd52b215f"
20*8460358cSPatrick WilliamsSRC_URI = "git://github.com/secdev/scapy.git;branch=master;protocol=https \
21*8460358cSPatrick Williams           file://run-ptest"
22*8460358cSPatrick Williams
23*8460358cSPatrick WilliamsS = "${WORKDIR}/git"
24*8460358cSPatrick Williams
25*8460358cSPatrick WilliamsUPSTREAM_CHECK_COMMITS = "1"
26*8460358cSPatrick Williams
27*8460358cSPatrick Williamsinherit python_setuptools_build_meta ptest
28*8460358cSPatrick Williams
29*8460358cSPatrick Williamsdo_install:append() {
30*8460358cSPatrick Williams        mv ${D}${bindir}/scapy ${D}${bindir}/scapy3
31*8460358cSPatrick Williams}
32*8460358cSPatrick Williams
33*8460358cSPatrick Williamsdo_install_ptest() {
34*8460358cSPatrick Williams    install -m 0644 ${S}/scapy/tools/UTscapy.py ${D}${PTEST_PATH}
35*8460358cSPatrick Williams    install -m 0644 ${S}/test/regression.uts ${D}${PTEST_PATH}
36*8460358cSPatrick Williams    sed -i 's,@PTEST_PATH@,${PTEST_PATH},' ${D}${PTEST_PATH}/run-ptest
37*8460358cSPatrick Williams}
38*8460358cSPatrick Williams
39*8460358cSPatrick WilliamsRDEPENDS:${PN} = "tcpdump python3-compression python3-cryptography python3-netclient  \
40*8460358cSPatrick Williams                  python3-netserver python3-pydoc python3-pkgutil python3-shell \
41*8460358cSPatrick Williams                  python3-threading python3-numbers python3-fcntl python3-logging \
42*8460358cSPatrick Williams                  python3-difflib"
43*8460358cSPatrick WilliamsRDEPENDS:${PN}-ptest += "python3-json python3-mock python3-multiprocessing \
44*8460358cSPatrick Williams                         iproute2 tshark"
45