Guest User

Untitled

a guest
Feb 21st, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. Gui, Add, Button, x46 y20 w100 h30 Gon , Proxy ON
  2. Gui, Add, Button, x46 y60 w100 h30 Goff , Proxy OFF
  3. Gui, Add, Button, x46 y100 w100 h30 Ggtfo , Exit
  4. ; Generated using SmartGUI Creator 4.0
  5. Gui, Show, x129 y99 h146 w194, Proxy Status
  6. Return
  7.  
  8. on:
  9. setproxy("ON", "127.0.0.1:1080")
  10. return
  11.  
  12.  
  13. off:
  14. setproxy("OFF")
  15. return
  16.  
  17.  
  18. setproxy(state="", address="")
  19. {
  20. if(state = "")
  21. state = "ON"
  22. if (state ="ON")
  23. {
  24. regwrite,REG_SZ,HKCU,Software\Microsoft\Windows\CurrentVersion\Internet Settings,ProxyServer,%address%
  25. regwrite,REG_DWORD,HKCU,Software\Microsoft\Windows\CurrentVersion\Internet Settings,Proxyenable,1
  26. }
  27. else if (state="OFF")
  28. regwrite,REG_DWORD,HKCU,Software\Microsoft\Windows\CurrentVersion\Internet Settings,Proxyenable,0
  29.  
  30. dllcall("wininet\InternetSetOptionW","int","0","int","39","int","0","int","0")
  31. dllcall("wininet\InternetSetOptionW","int","0","int","37","int","0","int","0")
  32. Return
  33. }
  34. ;;----------------------------------------------------------
  35. ;; Function RegRead
  36. ;;----------------------------------------------------------
  37. RegRead(RootKey, SubKey, ValueName = "") {
  38. RegRead, v, %RootKey%, %SubKey%, %ValueName%
  39. Return, v
  40. }
  41.  
  42. gtfo:
  43. ExitApp
  44.  
  45. GuiClose:
  46. ExitApp
Add Comment
Please, Sign In to add comment