net_inetSourceAnalysis.py 文件源码

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

项目:Snakepit 作者: K4lium 项目源码 文件源码
def _fortiURL(self, urlInput): 
        httplib2.debuglevel = 4          

        conn = urllib2.urlopen("http://www.fortiguard.com/ip_rep.php?data=" + urlInput + "&lookup=Lookup", timeout=60)
        content2String = conn.read()        

        rpd = re.compile('h3\sstyle\=\"float:\sleft\"\>Category:\s(.+)\<\/h3', re.IGNORECASE)
        rpdFind = re.findall(rpd, content2String)
        rpdSorted = rpdFind

        m = ''
        for m in rpdSorted:
            fortiGuard = urlInput + " Categorization: " + m  

            if MALICIOUS in m:
                self.hitcount += 1
        if m == '':
            fortiGuard = urlInput + " Categorization: Uncategorized"   

        return fortiGuard
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号