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
urlsnarf/scripts/autostart_urlsnarf.sh
Executable file
17
urlsnarf/scripts/autostart_urlsnarf.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 urlsnarf.autostart.interface`
|
||||
|
||||
if [ -z "$MYINTERFACE" ]; then
|
||||
MYINTERFACE="br-lan"
|
||||
fi
|
||||
|
||||
uci set urlsnarf.run.interface=${MYINTERFACE}
|
||||
uci commit urlsnarf.run.interface
|
||||
|
||||
urlsnarf -i ${MYINTERFACE} > /pineapple/modules/urlsnarf/log/output_${MYTIME}.log &
|
||||
35
urlsnarf/scripts/dependencies.sh
Executable file
35
urlsnarf/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/urlsnarf.progress ]] && {
|
||||
exit 0
|
||||
}
|
||||
|
||||
touch /tmp/urlsnarf.progress
|
||||
|
||||
if [ "$1" = "install" ]; then
|
||||
if [ "$2" = "internal" ]; then
|
||||
opkg update
|
||||
opkg install urlsnarf
|
||||
elif [ "$2" = "sd" ]; then
|
||||
opkg update
|
||||
opkg install urlsnarf --dest sd
|
||||
fi
|
||||
|
||||
touch /etc/config/urlsnarf
|
||||
echo "config urlsnarf 'run'" > /etc/config/urlsnarf
|
||||
echo "config urlsnarf 'autostart'" >> /etc/config/urlsnarf
|
||||
echo "config urlsnarf 'module'" >> /etc/config/urlsnarf
|
||||
|
||||
uci set urlsnarf.module.installed=1
|
||||
uci commit urlsnarf.module.installed
|
||||
|
||||
elif [ "$1" = "remove" ]; then
|
||||
opkg remove urlsnarf
|
||||
rm -rf /etc/config/urlsnarf
|
||||
fi
|
||||
|
||||
rm /tmp/urlsnarf.progress
|
||||
14
urlsnarf/scripts/urlsnarf.sh
Executable file
14
urlsnarf/scripts/urlsnarf.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 urlsnarf.run.interface`
|
||||
|
||||
if [ "$1" = "start" ]; then
|
||||
urlsnarf -i ${MYINTERFACE} > /pineapple/modules/urlsnarf/log/output_${MYTIME}.log
|
||||
elif [ "$1" = "stop" ]; then
|
||||
killall urlsnarf
|
||||
fi
|
||||
Reference in New Issue
Block a user