mirror of
https://github.com/hak5/nano-tetra-modules.git
synced 2025-10-29 16:58:09 +00:00
Add modules to repository
This commit is contained in:
17
p0f/scripts/autostart_p0f.sh
Executable file
17
p0f/scripts/autostart_p0f.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
#2015 - Whistle Master
|
||||
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||
|
||||
MYTIME=`date +%s`
|
||||
MYINTERFACE=`uci get p0f.autostart.interface`
|
||||
|
||||
if [ -z "$MYINTERFACE" ]; then
|
||||
MYINTERFACE="br-lan"
|
||||
fi
|
||||
|
||||
uci set p0f.run.interface=${MYINTERFACE}
|
||||
uci commit p0f.run.interface
|
||||
|
||||
p0f -i ${MYINTERFACE} -o /pineapple/modules/p0f/log/output_${MYTIME}.log 2>&1 &
|
||||
35
p0f/scripts/dependencies.sh
Executable file
35
p0f/scripts/dependencies.sh
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
#2015 - Whistle Master
|
||||
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||
|
||||
[[ -f /tmp/p0f.progress ]] && {
|
||||
exit 0
|
||||
}
|
||||
|
||||
touch /tmp/p0f.progress
|
||||
|
||||
if [ "$1" = "install" ]; then
|
||||
if [ "$2" = "internal" ]; then
|
||||
opkg update
|
||||
opkg install p0f
|
||||
elif [ "$2" = "sd" ]; then
|
||||
opkg update
|
||||
opkg install p0f --dest sd
|
||||
fi
|
||||
|
||||
touch /etc/config/p0f
|
||||
echo "config p0f 'module'" > /etc/config/p0f
|
||||
echo "config p0f 'run'" >> /etc/config/p0f
|
||||
echo "config p0f 'autostart'" >> /etc/config/p0f
|
||||
|
||||
uci set p0f.module.installed=1
|
||||
uci commit p0f.module.installed
|
||||
|
||||
elif [ "$1" = "remove" ]; then
|
||||
opkg remove p0f
|
||||
rm -rf /etc/config/p0f
|
||||
fi
|
||||
|
||||
rm /tmp/p0f.progress
|
||||
14
p0f/scripts/p0f.sh
Executable file
14
p0f/scripts/p0f.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
#2015 - Whistle Master
|
||||
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||
|
||||
MYTIME=`date +%s`
|
||||
MYINTERFACE=`uci get p0f.run.interface`
|
||||
|
||||
if [ "$1" = "start" ]; then
|
||||
p0f -i ${MYINTERFACE} -o /pineapple/modules/p0f/log/output_${MYTIME}.log
|
||||
elif [ "$1" = "stop" ]; then
|
||||
killall -9 p0f
|
||||
fi
|
||||
Reference in New Issue
Block a user