daily pastebin goal
25%
SHARE
TWEET

reset Network proxy (OSX/Dok malware recovery)

applehelpwriter Apr 29th, 2017 (edited) 167 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ###########################################################
  2. -->> ABOUT
  3. ###########################################################
  4. (*
  5.  
  6.  Phil Stokes -- 2017
  7.  applehelpwriter.com
  8.  sqwarq.com
  9.  
  10. *)
  11. ###########################################################
  12. -->> DESCRIPTION
  13. ###########################################################
  14. (*
  15.  
  16. Turn off the Automatic Proxy Configuration in Network System Preferences.
  17.  
  18. *)
  19. ###########################################################
  20. -->> USAGE
  21. ###########################################################
  22. (*
  23.  
  24. Requires Admin password.
  25. This script was developed primarily as part of a remedy for victims of OSX/Dok malware.
  26. This script does not remove the malware's files. Use DetectX for that: http://sqwarq.com/detectx
  27. A full recovery procedure for this malware can be found at:
  28. http://applehelpwriter.com/2017/04/29/how-to-recover-from-osxdok-malware/
  29.  
  30. *)
  31. ###########################################################
  32. -->> COMMANDS
  33. ###########################################################
  34.  
  35. set services to paragraphs of (do shell script "networksetup -listallnetworkservices")
  36. set autoproxyURL to " 0.0.0.0"
  37. set autoproxySERVICE to ""
  38. repeat with i from 2 to (count of services)
  39.     set autoproxySERVICE to item i of services as text
  40.     do shell script ("networksetup -setautoproxyurl " & (quoted form of autoproxySERVICE) & autoproxyURL) with administrator privileges
  41.     do shell script ("networksetup -setautoproxystate " & (quoted form of autoproxySERVICE) & " off") with administrator privileges
  42. end repeat
  43.  
  44.  
  45.  
  46.  
  47.  
  48. ###########################################################
  49. #EOF
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top