SHOW:
|
|
- or go back to the newest paste.
| 1 | #!/usr/bin/env bash | |
| 2 | - | OPZIONI="proxy_SOCKS tunnel_porta_specifica esci" |
| 2 | + | OPZIONI="SOCKS_proxy specific_port_tunnel exit" |
| 3 | ||
| 4 | function SOCKS {
| |
| 5 | - | echo "[+] Inserisci la porta su cui mettere in ascolto il proxy:" |
| 5 | + | echo "[+] Insert the port on which the proxy will listen:" |
| 6 | read PORTASOCKS | |
| 7 | - | echo "[+] Creo il proxy..." |
| 7 | + | echo "[+] Setting up proxy..." |
| 8 | ssh -f -D 0.0.0.0:$PORTASOCKS $IP -p $PORT -N > /dev/null | |
| 9 | - | echo "[+] Proxy creato." |
| 9 | + | echo "[+] Proxy set up." |
| 10 | return 0 | |
| 11 | } | |
| 12 | function SPECIFICPORT {
| |
| 13 | - | echo "[+] Inserisci l'IP della macchina remota verso cui aprire il tunnel:" |
| 13 | + | echo "[+] Insert the IP of the of the remote machine towards which the tunnel will be opened:" |
| 14 | read REMOTEIP | |
| 15 | - | echo "[+] Inserisci la porta locale su cui mettere in ascolto il tunnel:" |
| 15 | + | echo "[+] Insert the local port on which the tunnel will listen:" |
| 16 | read LOCALPORT | |
| 17 | - | echo "[+] Inserisci la porta della macchina remota su cui uscirà il tunnel:" |
| 17 | + | echo "[+] Insert the port of the remote machine towards which the tunnel should point:" |
| 18 | read REMOTEPORT | |
| 19 | - | echo "[+] Creo il tunnel..." |
| 19 | + | echo "[+] Setting up tunnel..." |
| 20 | ssh -f -L 0.0.0.0:$LOCALPORT:$REMOTEIP:$REMOTEPORT $IP -p $PORT -N > /dev/null | |
| 21 | - | echo "[+] Tunnel creato." |
| 21 | + | echo "[+] Tunnel set up" |
| 22 | return 0 | |
| 23 | } | |
| 24 | function IPANDPORT {
| |
| 25 | - | echo "[+] Inserisci l'(utente@)IP della macchina d'appoggio:" |
| 25 | + | echo "[+] Insert the (user@)IP of the jump box:" |
| 26 | read IP | |
| 27 | - | echo "[+] Inserisci la porta della macchina d'appoggio sulla quale è in ascolto il server SSH:" |
| 27 | + | echo "[+] Insert the port on which SSH is listening on the jump box:" |
| 28 | read PORT | |
| 29 | return 0 | |
| 30 | } | |
| 31 | ||
| 32 | - | echo "[+] Cosa vuoi fare?" |
| 32 | + | echo "[+] What do you want to do?" |
| 33 | select opt in $OPZIONI; do | |
| 34 | - | if [ "$opt" = "proxy_SOCKS" ]; then |
| 34 | + | if [ "$opt" = "SOCKS_proxy" ]; then |
| 35 | IPANDPORT | |
| 36 | SOCKS | |
| 37 | - | elif [ "$opt" = "tunnel_porta_specifica" ]; then |
| 37 | + | elif [ "$opt" = "specific_port_tunnel" ]; then |
| 38 | IPANDPORT | |
| 39 | SPECIFICPORT | |
| 40 | elif [ "$opt" = "esci" ]; then | |
| 41 | exit | |
| 42 | else | |
| 43 | - | echo "[-] Opzione sconosciuta" |
| 43 | + | echo "[-] Unknown option" |
| 44 | fi | |
| 45 | done |