scan.py 文件源码

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

项目:netattack2 作者: chrizator 项目源码 文件源码
def __init__(self, interface):
        self.interface = interface
        self.hosts = {}
        self.advanced_scan = False
        try:
            self.local_ip = netifaces.ifaddresses(interface)[netifaces.AF_INET][0]['addr']
        except KeyError:
            self.local_ip = raw_input("\n{R}ERROR: Unable to retrieve local IP address\n{N}Please enter manually: ".format(R=RED, N=NORMAL))
        try:
            self.gateway_ip = netifaces.gateways()["default"][netifaces.AF_INET][0]
        except KeyError:
            self.gateway_ip = raw_input("\n{R}ERROR: Unable to retrieve gateway IP address\n{N}Please enter manually: ".format(R=RED, N=NORMAL))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号