Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #First argument defines last IP octet for 2nd and 3rd commands.
- #Second argument defines an additional subnet you want to proxy for the last sshuttle connection.
- crazystuffhere(){
- echo -n Password:
- read -s something
- echo "Connecting to 1st Jumpbox 192.168.5.50 and proxying IP 192.168.10.50 through it."
- osascript -e "tell app \"Terminal\"
- do script \"sshuttle -r 192.168.5.50 192.168.10.50\"
- delay 2
- end tell"
- echo "Connecting to 2nd Jumpbox 192.168.10.50 and proxying IP 192.168.20.$1 through it."
- osascript -e "tell app \"Terminal\"
- do script \"sshuttle -r username@192.168.10.50 192.168.20.$1\"
- delay 2
- do script \"$something\" in window 1
- end tell"
- echo "Waiting 5 Seconds"
- Sleep 5
- echo "Connecting to 3rd Jumpbox 192.168.20.$1 and proxying IP subnet 192.168.50.0/24 and $2 through it."
- osascript -e "tell app \"Terminal\"
- do script \"sshuttle -r username@192.168.20.$1 192.168.50.0/24 $2\"
- delay 2
- do script \"$something\" in window 1
- end tell"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement