scapy.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:OSPTF 作者: xSploited 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号