Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
438
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. display dialog "AIRPORT SHH TUNNEL" buttons {"Tunnel", "Cancel"} default button "Disconnect"
  2. if button returned of the result is "Cancel" then
  3.     set loop to false
  4. if button returned of the result is "Tunnel" then
  5.     set loop to true
  6.     tell application "Terminal"
  7.         do shell script "
  8.             sudo networksetup -setsocksfirewallproxy Airport
  9.             ssh -D 8080 -f -C -q -N guest@67.186.178.159" with administrator privileges
  10.     end tell
  11.     display dialog "Connected..." buttons {"Disconnect"} default button "Disconnect"
  12. repeat while loop is true
  13.         if button returned of the result is "Disconnect" then
  14.             do shell script "sudo networksetup -setsocksfirewallproxystate Airport off" with administrator privileges
  15.             set loop to false
  16. end if
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement