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:
23
SSLsplit/scripts/autostart_sslsplit.sh
Executable file
23
SSLsplit/scripts/autostart_sslsplit.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/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`
|
||||
|
||||
killall sslsplit
|
||||
|
||||
echo '1' > /proc/sys/net/ipv4/ip_forward
|
||||
iptables -X
|
||||
iptables -F
|
||||
iptables -t nat -F
|
||||
iptables -P INPUT ACCEPT
|
||||
iptables -P FORWARD ACCEPT
|
||||
iptables -P OUTPUT ACCEPT
|
||||
|
||||
sh /pineapple/modules/SSLsplit/rules/iptables
|
||||
|
||||
iptables -t nat -A POSTROUTING -j MASQUERADE
|
||||
|
||||
sslsplit -D -l /pineapple/modules/SSLsplit/connections.log -L /pineapple/modules/SSLsplit/log/output_${MYTIME}.log -k /pineapple/modules/SSLsplit/cert/certificate.key -c /pineapple/modules/SSLsplit/cert/certificate.crt ssl 0.0.0.0 8443 tcp 0.0.0.0 8080
|
||||
55
SSLsplit/scripts/dependencies.sh
Executable file
55
SSLsplit/scripts/dependencies.sh
Executable file
@@ -0,0 +1,55 @@
|
||||
#!/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/SSLsplit.progress ]] && {
|
||||
exit 0
|
||||
}
|
||||
|
||||
touch /tmp/SSLsplit.progress
|
||||
|
||||
if [ "$1" = "install" ]; then
|
||||
if [ "$2" = "internal" ]; then
|
||||
opkg update
|
||||
opkg install sslsplit
|
||||
opkg install openssl-util
|
||||
opkg install libevent2
|
||||
opkg install libevent2-core
|
||||
opkg install libevent2-extra
|
||||
opkg install libevent2-openssl
|
||||
opkg install libevent2-pthreads
|
||||
elif [ "$2" = "sd" ]; then
|
||||
opkg update
|
||||
opkg install sslsplit --dest sd
|
||||
opkg install openssl-util --dest sd
|
||||
opkg install libevent2 --dest sd
|
||||
opkg install libevent2-core --dest sd
|
||||
opkg install libevent2-extra --dest sd
|
||||
opkg install libevent2-openssl --dest sd
|
||||
opkg install libevent2-pthreads --dest sd
|
||||
fi
|
||||
|
||||
openssl genrsa -out /pineapple/modules/SSLsplit/cert/certificate.key 1024
|
||||
openssl req -new -nodes -x509 -sha1 -out /pineapple/modules/SSLsplit/cert/certificate.crt -key /pineapple/modules/SSLsplit/cert/certificate.key -config /pineapple/modules/SSLsplit/cert/openssl.cnf -extensions v3_ca -subj '/O=SSLsplit Root CA/CN=SSLsplit Root CA/' -set_serial 0 -days 3650
|
||||
|
||||
touch /etc/config/sslsplit
|
||||
echo "config sslsplit 'module'" > /etc/config/sslsplit
|
||||
|
||||
uci set sslsplit.module.installed=1
|
||||
uci commit sslsplit.module.installed
|
||||
|
||||
elif [ "$1" = "remove" ]; then
|
||||
opkg remove sslsplit
|
||||
opkg remove openssl-util
|
||||
opkg remove libevent2
|
||||
opkg remove libevent2-core
|
||||
opkg remove libevent2-extra
|
||||
opkg remove libevent2-openssl
|
||||
opkg remove libevent2-pthreads
|
||||
|
||||
rm -rf /etc/config/sslsplit
|
||||
fi
|
||||
|
||||
rm /tmp/SSLsplit.progress
|
||||
17
SSLsplit/scripts/generate_certificate.sh
Executable file
17
SSLsplit/scripts/generate_certificate.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
|
||||
|
||||
[[ -f /tmp/SSLsplit_certificate.progress ]] && {
|
||||
exit 0
|
||||
}
|
||||
|
||||
touch /tmp/SSLsplit_certificate.progress
|
||||
|
||||
# Generate the SSL certificate authority and key for SSLsplit to use
|
||||
openssl genrsa -out /pineapple/modules/SSLsplit/cert/certificate.key 1024
|
||||
openssl req -new -nodes -x509 -sha1 -out /pineapple/modules/SSLsplit/cert/certificate.crt -key /pineapple/modules/SSLsplit/cert/certificate.key -config /pineapple/modules/SSLsplit/cert/openssl.cnf -extensions v3_ca -subj '/O=SSLsplit Root CA/CN=SSLsplit Root CA/' -set_serial 0 -days 3650
|
||||
|
||||
rm /tmp/SSLsplit_certificate.progress
|
||||
41
SSLsplit/scripts/sslsplit.sh
Executable file
41
SSLsplit/scripts/sslsplit.sh
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/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`
|
||||
|
||||
killall sslsplit
|
||||
|
||||
if [ "$1" = "start" ]; then
|
||||
|
||||
echo '1' > /proc/sys/net/ipv4/ip_forward
|
||||
iptables -X
|
||||
iptables -F
|
||||
iptables -t nat -F
|
||||
iptables -P INPUT ACCEPT
|
||||
iptables -P FORWARD ACCEPT
|
||||
iptables -P OUTPUT ACCEPT
|
||||
|
||||
sh /pineapple/modules/SSLsplit/rules/iptables
|
||||
|
||||
iptables -t nat -A POSTROUTING -j MASQUERADE
|
||||
|
||||
sslsplit -D -l /pineapple/modules/SSLsplit/connections.log -L /pineapple/modules/SSLsplit/log/output_${MYTIME}.log -k /pineapple/modules/SSLsplit/cert/certificate.key -c /pineapple/modules/SSLsplit/cert/certificate.crt ssl 0.0.0.0 8443 tcp 0.0.0.0 8080
|
||||
|
||||
elif [ "$1" = "stop" ]; then
|
||||
|
||||
rm -rf /pineapple/modules/SSLsplit/connections.log
|
||||
|
||||
iptables -F
|
||||
iptables -X
|
||||
iptables -t nat -F
|
||||
iptables -t nat -X
|
||||
iptables -t mangle -F
|
||||
iptables -t mangle -X
|
||||
iptables -P INPUT ACCEPT
|
||||
iptables -P FORWARD ACCEPT
|
||||
iptables -P OUTPUT ACCEPT
|
||||
|
||||
fi
|
||||
Reference in New Issue
Block a user