sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master grimoire by Vlad Glagolev (87a775170ee64dc2ec83c6ca20c0a41af75ca2c5)
- From: Vlad Glagolev <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (87a775170ee64dc2ec83c6ca20c0a41af75ca2c5)
- Date: Fri, 26 Jan 2018 15:14:04 +0000
GIT changes to master grimoire by Vlad Glagolev <stealth AT sourcemage.org>:
ChangeLog | 3 ++
net/packit/BUILD | 3 ++
net/packit/CONFIGURE | 11 ++++++++
net/packit/DEPENDS | 2 +
net/packit/DETAILS | 23 +++++++++++++++++
net/packit/HISTORY | 3 ++
net/packit/PRE_BUILD | 9 ++++++
net/packit/configure.patch | 29 ++++++++++++++++++++++
net/packit/header.patch | 22 +++++++++++++++++
net/packit/noopt.patch | 10 +++++++
net/packit/overflow.patch | 58
+++++++++++++++++++++++++++++++++++++++++++++
11 files changed, 173 insertions(+)
New commits:
commit 87a775170ee64dc2ec83c6ca20c0a41af75ca2c5
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>
packit: new spell, network injection and capture tool
diff --git a/ChangeLog b/ChangeLog
index db0f3f8..f736987 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2018-01-26 Vlad Glagolev <stealth AT sourcemage.org>
+ * net/packit: new spell, network injection and capture tool
+
2018-01-23 Ismael Luceno <ismael AT sourcemage.org>
* perl-cpan/otrs: new spell, Open Technology Real Services ticketing
system
diff --git a/net/packit/BUILD b/net/packit/BUILD
new file mode 100755
index 0000000..37dd67b
--- /dev/null
+++ b/net/packit/BUILD
@@ -0,0 +1,3 @@
+OPTS="${PACKIT_OPTS} ${OPTS}" &&
+
+default_build
diff --git a/net/packit/CONFIGURE b/net/packit/CONFIGURE
new file mode 100755
index 0000000..4bcfa9a
--- /dev/null
+++ b/net/packit/CONFIGURE
@@ -0,0 +1,11 @@
+config_query_option PACKIT_OPTS "Enable debugging?" n \
+ "--enable-debug" \
+ "--disable-debug" &&
+
+config_query_option PACKIT_OPTS "Enable packet capture support?" y \
+ "--with-capture" \
+ "--without-capture" &&
+
+config_query_option PACKIT_OPTS "Enable packet injection support?" y \
+ "--with-injection" \
+ "--without-injection"
diff --git a/net/packit/DEPENDS b/net/packit/DEPENDS
new file mode 100755
index 0000000..0918530
--- /dev/null
+++ b/net/packit/DEPENDS
@@ -0,0 +1,2 @@
+depends libnet &&
+depends libpcap
diff --git a/net/packit/DETAILS b/net/packit/DETAILS
new file mode 100755
index 0000000..f2a9dcd
--- /dev/null
+++ b/net/packit/DETAILS
@@ -0,0 +1,23 @@
+ SPELL=packit
+ VERSION=1.0
+ SOURCE=${SPELL}-${VERSION}.tgz
+
SOURCE_URL[0]=http://packetfactory.openwall.net/projects/${SPELL}/downloads/${SOURCE}
+
SOURCE_HASH=sha512:cc7e957d2149edbc92d4d914c9f29aecb7945bab43f2df7435bc4c21a4724f92e9d99990683e4d301384117f79819f87f423eaa28dbef11b37a96c4aa40a1398
+SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-${VERSION}"
+ DOCS="ChangeLog INSTALL ${DOCS}"
+ WEB_SITE=http://packetfactory.openwall.net/projects/packit/
+ LICENSE[0]=GPL
+ ENTERED=20180126
+ KEYWORDS="net security"
+ SHORT="network injection and capture tool"
+cat << EOF
+Packit (Packet toolkit) is a network auditing tool. Its value is derived from
+its ability to customize, inject, monitor, and manipulate IP traffic.
+
+By allowing you to define (spoof) nearly all TCP, UDP, ICMP, IP, ARP, RARP,
and
+Ethernet header options, Packit can be useful in testing firewalls, intrusion
+detection/prevention systems, port scanning, simulating network traffic, and
+general TCP/IP auditing.
+
+Packit is also an excellent tool for learning TCP/IP.
+EOF
diff --git a/net/packit/HISTORY b/net/packit/HISTORY
new file mode 100644
index 0000000..d79910d
--- /dev/null
+++ b/net/packit/HISTORY
@@ -0,0 +1,3 @@
+2018-01-26 Vlad Glagolev <stealth AT sourcemage.org>
+ * DETAILS, DEPENDS, {PRE_,}BUILD, CONFIGURE, header.patch,
noopt.patch,
+ overflow.patch, configure.patch: created spell, version 1.0
diff --git a/net/packit/PRE_BUILD b/net/packit/PRE_BUILD
new file mode 100755
index 0000000..52d64e3
--- /dev/null
+++ b/net/packit/PRE_BUILD
@@ -0,0 +1,9 @@
+default_pre_build &&
+cd "${SOURCE_DIRECTORY}" &&
+
+patch -p0 < "${SPELL_DIRECTORY}/header.patch" &&
+patch -p0 < "${SPELL_DIRECTORY}/overflow.patch" &&
+patch -p0 < "${SPELL_DIRECTORY}/noopt.patch" &&
+patch -p0 < "${SPELL_DIRECTORY}/configure.patch" &&
+
+autoreconf -fi
diff --git a/net/packit/configure.patch b/net/packit/configure.patch
new file mode 100644
index 0000000..5cbc5ee
--- /dev/null
+++ b/net/packit/configure.patch
@@ -0,0 +1,29 @@
+--- configure.in.orig 2003-09-27 09:33:24.000000000 -0400
++++ configure.in 2018-01-26 10:04:39.000000000 -0500
+@@ -45,15 +45,17 @@
+ BINS="packit"
+
+ AC_ARG_ENABLE(debug,
+- [ --enable-debug Enable debugging],
+- [ if test "$GCC" = yes; then
+- DEBUG="yes"
+- CFLAGS="${CFLAGS} -DDEBUG -ggdb"
+- else
+- DEBUG="yes"
+- CFLAGS="${CFLAGS} -DDEBUG"
+- fi
+- ],)
++ [ --enable-debug Enable debugging])
++
++AS_IF([test "x$enable_debug" != "xno"], [
++ if test "$GCC" = yes; then
++ DEBUG="yes"
++ CFLAGS="${CFLAGS} -DDEBUG -ggdb"
++ else
++ DEBUG="yes"
++ CFLAGS="${CFLAGS} -DDEBUG"
++ fi
++])
+
+ AC_ARG_WITH(capture,
+ [ --without-capture Remove packet capture support],
diff --git a/net/packit/header.patch b/net/packit/header.patch
new file mode 100644
index 0000000..f424f72
--- /dev/null
+++ b/net/packit/header.patch
@@ -0,0 +1,22 @@
+--- src/globals.h.orig
++++ src/globals.h
+@@ -31,7 +31,7 @@
+ #include <libnet.h>
+ #include <pcap.h>
+ #include <sys/types.h>
+-#include <net/bpf.h>
++#include <pcap-bpf.h>
+ #include <signal.h>
+ #include <time.h>
+ #include <stdio.h>
+--- src/main.h.orig
++++ src/main.h
+@@ -26,7 +26,7 @@
+ #include <libnet.h>
+ #include <pcap.h>
+ #include <sys/types.h>
+-#include <net/bpf.h>
++#include <pcap-bpf.h>
+ #include <signal.h>
+ #include <time.h>
+ #include <stdio.h>
diff --git a/net/packit/noopt.patch b/net/packit/noopt.patch
new file mode 100644
index 0000000..14882bb
--- /dev/null
+++ b/net/packit/noopt.patch
@@ -0,0 +1,10 @@
+--- src/main.c.orig
++++ src/main.c
+@@ -201,6 +201,7 @@
+ #ifdef DEBUG
+ fprintf(stdout, "DEBUG: parse_inject\n");
+ #endif
++ if (!opts) print_usage();
+
+ while((opt = getopt(argc, argv, opts)) != -1)
+ {
diff --git a/net/packit/overflow.patch b/net/packit/overflow.patch
new file mode 100644
index 0000000..2fd9733
--- /dev/null
+++ b/net/packit/overflow.patch
@@ -0,0 +1,58 @@
+--- src/utils.c.orig
++++ src/utils.c
+@@ -137,7 +137,7 @@
+ #endif
+
+ va_start(va, msgp);
+- vsnprintf(msg, 256, msgp, va);
++ vsnprintf(msg, 255, msgp, va);
+
+ msg_len = strlen(msg);
+
+--- src/exit.c.orig
++++ src/exit.c
+@@ -36,7 +36,7 @@
+ while(1)
+ {
+ fprintf(stderr, "\n\nWould you like to quit? (y/n): ");
+- fgets(a, 16, stdin);
++ fgets(a, 2, stdin);
+
+ if(!strncasecmp(a, "Y", 1))
+ break;
+--- src/define_defaults.c.orig
++++ src/define_defaults.c
+@@ -36,7 +36,7 @@
+ rand_d_port = (p_mode == M_TRACE) ? 1 : 0;
+ r_timeout = 1;
+ burst_rate = 1;
+- hwaddr_p[17] = 0;
++ /* hwaddr_p[18] = 0; */
+ init_type = 1;
+ interval_sec = 1;
+ interval_usec = 0;
+--- src/inject_defs.h.orig
++++ src/inject_defs.h
+@@ -132,9 +132,9 @@
+ u_int16_t rand_d_addr;
+
+ u_int8_t *s_addr; /* source ethernet address string */
+- u_int8_t shw_addr[17];
++ u_int8_t shw_addr[18];
+ u_int8_t *d_addr; /* destination ethernet address
string */
+- u_int8_t dhw_addr[17];
++ u_int8_t dhw_addr[18];
+ } ehdr_o;
+
+ struct arphdr_opts
+@@ -153,8 +153,8 @@
+ u_int8_t *r_eaddr; /* receiver ethernet address */
+ u_int16_t rand_r_eaddr;
+
+- u_int8_t shw_addr[17];
+- u_int8_t rhw_addr[17];
++ u_int8_t shw_addr[18];
++ u_int8_t rhw_addr[18];
+ } ahdr_o;
+
+ libnet_t *pkt_d;
- [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (87a775170ee64dc2ec83c6ca20c0a41af75ca2c5), Vlad Glagolev, 01/26/2018
Archive powered by MHonArc 2.6.24.