Advertisement
Wasif_Hasan_

FakeWindowsUpdatePrank.vbs

Sep 17th, 2020 (edited)
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Option Explicit
  2. Dim objWMIService,strComputer,colItems,colItem,strOS,objRegex,strAllOSes
  3. Dim arrAllOSes,strResult,strOSItem,WshShell,arrURI,iter,objProcessList,objProcess
  4. iter = 0
  5. Set WshShell = CreateObject("Wscript.Shell")
  6. arrURI = Array("xp","vista","win7","win8","win10ue")
  7. strAllOSes = "Windows XP,Windows Vista,Windows 7,Windows 8,Windows 10"
  8. arrAllOSes = Split(strAllOSes,",")
  9. strComputer = "."
  10. Set objWMIService = GetObject("winmgmts:\\" & strComputer)
  11. Set colItems = objWMIService.InstancesOf("Win32_OperatingSystem")
  12. For Each colItem in colItems
  13.   strOS = colItem.Caption
  14. Next
  15. Set objProcessList = objWMIService.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'explorer.exe'")
  16. For Each objProcess in objProcessList
  17.   objProcess.Terminate()
  18. Next
  19. WshShell.Run "taskkill /im explorer.exe /f",0,True
  20. Set objRegex = New RegExp
  21. With objRegex
  22.   .Pattern = ".*Windows XP.*"
  23.   .IgnoreCase = True
  24.   .Global = False
  25. End With
  26. For Each strOSItem In arrAllOSes
  27.   With objRegex
  28.     .Pattern = ".*" & strOSItem & ".*"
  29.     .IgnoreCase = True
  30.     .Global = False
  31.   End With
  32.   If objRegex.Test(strOS) Then
  33.     WshShell.Run "iexplore -k fakeupdate.net/" & arrURI(iter)
  34.   End If
  35.   iter = iter + 1
  36. Next
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement