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:
33
nmap/scripts/dependencies.sh
Executable file
33
nmap/scripts/dependencies.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/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/nmap.progress ]] && {
|
||||
exit 0
|
||||
}
|
||||
|
||||
touch /tmp/nmap.progress
|
||||
|
||||
if [ "$1" = "install" ]; then
|
||||
if [ "$2" = "internal" ]; then
|
||||
opkg update
|
||||
opkg install nmap
|
||||
elif [ "$2" = "sd" ]; then
|
||||
opkg update
|
||||
opkg install nmap --dest sd
|
||||
fi
|
||||
|
||||
touch /etc/config/nmap
|
||||
echo "config nmap 'module'" > /etc/config/nmap
|
||||
|
||||
uci set nmap.module.installed=1
|
||||
uci commit nmap.module.installed
|
||||
|
||||
elif [ "$1" = "remove" ]; then
|
||||
opkg remove nmap
|
||||
rm -rf /etc/config/nmap
|
||||
fi
|
||||
|
||||
rm /tmp/nmap.progress
|
||||
18
nmap/scripts/nmap.sh
Executable file
18
nmap/scripts/nmap.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`
|
||||
MYCMD=`cat /tmp/nmap.run`
|
||||
|
||||
if [ "$1" = "start" ]; then
|
||||
eval ${MYCMD}
|
||||
mv /tmp/nmap.scan /pineapple/modules/nmap/scan/scan_${MYTIME}
|
||||
rm -rf /tmp/nmap.run
|
||||
elif [ "$1" = "stop" ]; then
|
||||
killall nmap
|
||||
rm -rf /tmp/nmap.run
|
||||
rm -rf /tmp/nmap.scan
|
||||
fi
|
||||
Reference in New Issue
Block a user