-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathshellinabox.init
executable file
·20 lines (16 loc) · 1.19 KB
/
shellinabox.init
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
echo "#!/bin/bash" > /opt/shellinabox.run
echo "export SSH_PORT=$SSH_PORT" >> /opt/shellinabox.run
echo "export USERNAME=$USERNAME" >> /opt/shellinabox.run
echo "export DEFAULT_IP=$DEFAULT_IP" >> /opt/shellinabox.run
echo "export ALLOWED_NETWORKS=$ALLOWED_NETWORKS" >> /opt/shellinabox.run
echo "export INACTIVITY_INTERVAL=$INACTIVITY_INTERVAL" >> /opt/shellinabox.run
echo "export VAULT_ENABLED=$VAULT_ENABLED" >> /opt/shellinabox.run
echo "export VAULT_URL=$VAULT_URL" >> /opt/shellinabox.run
echo "export VAULT_VALUE=$VAULT_VALUE" >> /opt/shellinabox.run
echo "export TERM=xterm" >> /opt/shellinabox.run
echo "exec /opt/shellinabox.py \$1" >> /opt/shellinabox.run
chmod 755 /opt/shellinabox.run
cat /opt/shellinabox.run
echo 0 > /proc/sys/kernel/yama/ptrace_scope
/usr/bin/shellinaboxd -q -p 80 -u webshell -g webshell --disable-ssl --no-beep --service '/:webshell:webshell:HOME:/opt/shellinabox.run ${url}' --user-css 'Black on White:+/etc/shellinabox/options-enabled/00+Black on White.css,White On Black:-/etc/shellinabox/options-enabled/00_White On Black.css;Color Terminal:+/etc/shellinabox/options-enabled/01+Color Terminal.css,Monochrome:-/etc/shellinabox/options-enabled/01_Monochrome.css'