Net_Zapper_1.py 文件源码

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

项目:NetZapper 作者: NetZapper 项目源码 文件源码
def Host_Discovery():
    live_hosts=[]
    a=str(raw_input(Fore.CYAN +"\nEnter network octects (net id) of ip e.g 192.168.10.*: "+Fore.RESET))
    if a=='' or a is None or a.isalpha():
        print Fore.RED+"Enter correct input...!!!"+Fore.RESET
        return
    else:
        print Fore.GREEN + "\n\t\tLive Hosts are....."+Fore.RESET
        ans,unans=arping(a,verbose=False)
        print Fore.GREEN+"\n IP ADDRESS\t\t  MAC ADDRESS\n"+Fore.RESET
        for i in ans:
            print Fore.GREEN+i[0].pdst +'\t\t'+ i[1].src + Fore.RESET
            if i[0].pdst not in live_hosts:
                live_hosts.append(i[0].pdst)
    print Fore.GREEN + "\n%s hosts up..." %len(live_hosts)+Fore.RESET
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号