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:
16
DNSMasqSpoof/scripts/autostart_dnsmasqspoof.sh
Executable file
16
DNSMasqSpoof/scripts/autostart_dnsmasqspoof.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/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
|
||||
|
||||
if grep addn-hosts /etc/dnsmasq.conf &> /dev/null; then
|
||||
/etc/init.d/dnsmasq stop && /etc/init.d/dnsmasq start
|
||||
else
|
||||
echo "no-dhcp-interface=" >> /etc/dnsmasq.conf
|
||||
echo "server=8.8.8.8" >> /etc/dnsmasq.conf
|
||||
echo "no-hosts" >> /etc/dnsmasq.conf
|
||||
echo "addn-hosts=/pineapple/modules/DNSMasqSpoof/hosts/dnsmasq.hosts" >> /etc/dnsmasq.conf
|
||||
|
||||
/etc/init.d/dnsmasq stop && /etc/init.d/dnsmasq start
|
||||
fi
|
||||
30
DNSMasqSpoof/scripts/dependencies.sh
Executable file
30
DNSMasqSpoof/scripts/dependencies.sh
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/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/DNSMasqSpoof.progress ]] && {
|
||||
exit 0
|
||||
}
|
||||
|
||||
touch /tmp/DNSMasqSpoof.progress
|
||||
|
||||
if [ "$1" = "install" ]; then
|
||||
if [ "$2" = "internal" ]; then
|
||||
echo '' > /dev/null
|
||||
elif [ "$2" = "sd" ]; then
|
||||
echo '' > /dev/null
|
||||
fi
|
||||
|
||||
touch /etc/config/dnsmasqspoof
|
||||
echo "config dnsmasqspoof 'module'" > /etc/config/dnsmasqspoof
|
||||
|
||||
uci set dnsmasqspoof.module.installed=1
|
||||
uci commit dnsmasqspoof.module.installed
|
||||
|
||||
elif [ "$1" = "remove" ]; then
|
||||
rm -rf /etc/config/dnsmasqspoof
|
||||
fi
|
||||
|
||||
rm /tmp/DNSMasqSpoof.progress
|
||||
21
DNSMasqSpoof/scripts/dnsmasqspoof.sh
Executable file
21
DNSMasqSpoof/scripts/dnsmasqspoof.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/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
|
||||
|
||||
if [ "$1" = "start" ]; then
|
||||
echo "no-dhcp-interface=" >> /etc/dnsmasq.conf
|
||||
echo "server=8.8.8.8" >> /etc/dnsmasq.conf
|
||||
echo "no-hosts" >> /etc/dnsmasq.conf
|
||||
echo "addn-hosts=/pineapple/modules/DNSMasqSpoof/hosts/dnsmasq.hosts" >> /etc/dnsmasq.conf
|
||||
|
||||
/etc/init.d/dnsmasq stop && /etc/init.d/dnsmasq start
|
||||
elif [ "$1" = "stop" ]; then
|
||||
sed -i '/no-dhcp-interface=/d' /etc/dnsmasq.conf
|
||||
sed -i '/server=8.8.8.8/d' /etc/dnsmasq.conf
|
||||
sed -i '/no-hosts/d' /etc/dnsmasq.conf
|
||||
sed -i '/addn-hosts=\/pineapple\/modules\/DNSMasqSpoof\/hosts\/dnsmasq.hosts/d' /etc/dnsmasq.conf
|
||||
|
||||
/etc/init.d/dnsmasq stop && /etc/init.d/dnsmasq start
|
||||
fi
|
||||
Reference in New Issue
Block a user