amplispy.py 文件源码

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

项目:AmpliSpy 作者: NullArray 项目源码 文件源码
def mech_ops():
    br = mechanize.Browser()
    br.set_handle_robots(False)
    br.addheaders = [('user-agent', select_UA()), ('accept', 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8')]

    try:
        response = br.open("http://www.public-dns.info/nameservers.txt")
    except Exception as e:
        print "\n[" + t.red("!") + "]Critical, could not open public-dns.info"
        print "[" + t.green("+") + "]The following status code was recieved:"
        print "\n %s" % (e)
        sys.exit(1)

    result = response.read()
    proc = result.rstrip().split('\n')

    return proc


# If args, read list, else fetch
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号