def run(self, args):
try:
if not self.client.conn.modules["os.path"].exists("C:\\WIndows\\system32\\Packet.dll"):
raise PupyModuleError("WinPcap is not installed !. You should download/upload NPcap (https://github.com/nmap/npcap/releases) and install it silently (with the /S flag) ")
if not self.client.conn.modules['ctypes'].windll.Shell32.IsUserAnAdmin():
self.warning("you are running this module without beeing admin")
with redirected_stdo(self.client.conn):
old_completer=readline.get_completer()
try:
psc=self.client.conn.modules['pyshell.controller'].PyShellController()
readline.set_completer(psc.get_completer())
readline.parse_and_bind('tab: complete')
psc.write("from scapy.all import *")
while True:
cmd=raw_input(">>> ")
psc.write(cmd)
finally:
readline.set_completer(old_completer)
readline.parse_and_bind('tab: complete')
except KeyboardInterrupt:
pass
评论列表
文章目录