1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
#!/bin/bash
#
# Maintainer: Deposite Pirate <ofni.sknuplatem@etaripd>
source /usr/src/ports/Build/build.sh
NAME=kismet
VERSION=20130211
BUILD=2
DEPENDS=('tcpip >= 20130209-1' 'pcre >= 8.32-1' 'openssl >= 1.0.1c-1')
# Description
cat > ${PKG}/install/slack-desc <<EOF
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
$(padd)|-----handy-ruler------------------------------------------------------|
${NAME}: kismet (wireless network scanner)
${NAME}:
${NAME}: Kismet is an 802.11 layer2 wireless network detector, sniffer, and
${NAME}: intrusion detection system. Kismet will work with any wireless card
${NAME}: which supports raw monitoring (rfmon) mode, and can sniff 802.11b,
${NAME}: 802.11a, and 802.11g traffic.
${NAME}:
${NAME}: Kismet identifies networks by passively collecting packets and
${NAME}: detecting standard named networks, detecting (and given time,
${NAME}: decloaking) hidden networks, and infering the presence of
${NAME}: nonbeaconing networks via data traffic.
EOF
cat >> ${PKG}/install/doinst.sh <<EOF
#!/bin/sh
config() {
NEW="\$1"
OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r \$OLD ]; then
mv \$NEW \$OLD
elif [ "\$(cat \$OLD | md5sum)" = "\$(cat \$NEW | md5sum)" ]; then
# toss the redundant copy
rm \$NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
config etc/kismet/kismet.conf.new
config etc/kismet/kismet_drone.conf.new
chown root.netdev usr/bin/kismet_capture
chmod 4750 usr/bin/kismet_capture
EOF
# Sources
SRCNAME[0]=${NAME}
SRCVERS[0]=${VERSION}
SRCPACK[0]=http://www.kismetwireless.net/code/${SRCNAME[0]}-${SRCVERS[0]}.tar.xz
SRCCOPY[0]="GPL2"
build0()
{
sed -i 's|@datadir@/kismet/wav|@datadir@/sounds/kismet|g' Makefile.inc.in
LIBS="-lnl-3 -lnl-genl-3" \
CFLAGS="${FLAGS}" CXXFLAGS="${FLAGS}" \
./configure \
--build="${ARCH}-slackware-linux" \
--prefix="${SYS_DIR[usr]}" \
--mandir="${SYS_DIR[man]}" \
--sysconfdir="${SYS_DIR[etc]}/kismet" \
--libdir="${SYS_DIR[lib]}/plugins" \
--localstatedir="${SYS_DIR[var]}" \
--with-pcreheaders="${SYS_DIR[include]}/pcre" \
--with-suidgroup="netdev"
make ${JOBS} dep
make ${JOBS}
make ${JOBS} plugins
make install suidinstall DESTDIR="${PKG}"
make plugins-install DESTDIR="${PKG}"
doc README
changelog RELEASENOTES.txt
install.dir ${PKG}${SYS_DIR[share]}/icons/hicolor/48x48/apps
install.dat kismet.png ${PKG}${SYS_DIR[share]}/icons/hicolor/48x48/apps
install.dir ${PKG}${SYS_DIR[share]}/applications
install.dat kismet.desktop ${PKG}${SYS_DIR[share]}/applications
install.dir ${PKG}${SYS_DIR[share]}/dtds
install.dat extra/*.{dtd,xsd} ${PKG}${SYS_DIR[share]}/dtds
mv \
${PKG}${SYS_DIR[etc]}/kismet/kismet.conf \
${PKG}${SYS_DIR[etc]}/kismet/kismet.conf.new
mv \
${PKG}${SYS_DIR[etc]}/kismet/kismet_drone.conf \
${PKG}${SYS_DIR[etc]}/kismet/kismet_drone.conf.new
chmod 0755 ${PKG}${SYS_DIR[lib]}/plugins/kismet*/*.so
}
|