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:
18
DNSspoof/scripts/autostart_dnsspoof.sh
Executable file
18
DNSspoof/scripts/autostart_dnsspoof.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/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 dnsspoof.autostart.interface`
|
||||
HOSTSFILE="/etc/pineapple/spoofhost"
|
||||
|
||||
if [ -z "$MYINTERFACE" ]; then
|
||||
MYINTERFACE="br-lan"
|
||||
fi
|
||||
|
||||
uci set dnsspoof.run.interface=${MYINTERFACE}
|
||||
uci commit dnsspoof.run.interface
|
||||
|
||||
dnsspoof -i ${MYINTERFACE} -f ${HOSTSFILE} > /dev/null 2> /pineapple/modules/DNSspoof/log/output_${MYTIME}.log
|
||||
35
DNSspoof/scripts/dependencies.sh
Executable file
35
DNSspoof/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/DNSspoof.progress ]] && {
|
||||
exit 0
|
||||
}
|
||||
|
||||
touch /tmp/DNSspoof.progress
|
||||
|
||||
if [ "$1" = "install" ]; then
|
||||
if [ "$2" = "internal" ]; then
|
||||
opkg update
|
||||
opkg install dnsspoof
|
||||
elif [ "$2" = "sd" ]; then
|
||||
opkg update
|
||||
opkg install dnsspoof --dest sd
|
||||
fi
|
||||
|
||||
touch /etc/config/dnsspoof
|
||||
echo "config dnsspoof 'run'" > /etc/config/dnsspoof
|
||||
echo "config dnsspoof 'autostart'" >> /etc/config/dnsspoof
|
||||
echo "config dnsspoof 'module'" >> /etc/config/dnsspoof
|
||||
|
||||
uci set dnsspoof.module.installed=1
|
||||
uci commit dnsspoof.module.installed
|
||||
|
||||
elif [ "$1" = "remove" ]; then
|
||||
opkg remove dnsspoof
|
||||
rm -rf /etc/config/dnsspoof
|
||||
fi
|
||||
|
||||
rm /tmp/DNSspoof.progress
|
||||
15
DNSspoof/scripts/dnsspoof.sh
Executable file
15
DNSspoof/scripts/dnsspoof.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/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 dnsspoof.run.interface`
|
||||
HOSTSFILE="/etc/pineapple/spoofhost"
|
||||
|
||||
if [ "$1" = "start" ]; then
|
||||
dnsspoof -i ${MYINTERFACE} -f ${HOSTSFILE} > /dev/null 2> /pineapple/modules/DNSspoof/log/output_${MYTIME}.log
|
||||
elif [ "$1" = "stop" ]; then
|
||||
killall dnsspoof
|
||||
fi
|
||||
Reference in New Issue
Block a user