Battle.NET Script


SUBMITTED BY: Guest

DATE: Aug. 4, 2014, 6:11 p.m.

FORMAT: C#

SIZE: 2.1 kB

HITS: 24707

  1. Option Explicit
  2. 'declaring the shell control for a windows firewall and the command to pass in to windows shell
  3. Dim wshShell, command
  4. 'declaring var to handle user selection
  5. Dim inputControl
  6. 'debugging purposes...
  7. On Error Resume Next
  8. 'creating dialogue box to take user input
  9. inputControl = InputBox("Please enter enable to turn chat on. Enter disable to turn chat off. Click OK when done or click cancel to close.","Battle.net Authentication Controller")
  10. 'handling user input and executing action
  11. If lcase(inputControl) = "enable" Then
  12. 'Instructions to enable the Battle.net authentication service to appear online.
  13. MsgBox "Enabling Battle.net authentication service. Click OK to continue."
  14. Set wshShell = WScript.CreateObject("WScript.Shell")
  15. command = "netsh advfirewall firewall delete rule name=BNetChat"
  16. 'Deleting the rule that blocks the Battle.net authentication port.
  17. wshShell.Run command, 0, False
  18. MsgBox "Battle.net authentication service has been restored."
  19. ElseIf lcase(inputControl) = "disable" Then
  20. 'Instructions to disable the Battle.net authentication service to appear offline.
  21. MsgBox "Disabling Battle.net authentication service. Click OK to continue."
  22. Set wshShell = WScript.CreateObject("WScript.Shell")
  23. command = "netsh advfirewall firewall add rule name=BNetChat dir=out action=block protocol=TCP remoteport=1119"
  24. 'Creating the rule that blocks the Battle.net authentication port.
  25. wshShell.Run command, 0, False
  26. MsgBox "Battle.net authentication service has been disabled."
  27. Else
  28. 'If nothing is selected, do nothing.
  29. MsgBox "No options selected. Closing now."
  30. End If
  31. 'debugging purposes...
  32. On Error Goto 0

comments powered by Disqus