mirror of
https://github.com/valitydev/Cortex-Analyzers.git
synced 2024-11-07 17:38:53 +00:00
Merge pull request #51 from ecapuano/patch-1
corrected for change to fortiguard portal
This commit is contained in:
commit
42aa819349
@ -18,9 +18,8 @@ class URLCategoryAnalyzer(Analyzer):
|
||||
if self.data_type == 'domain' or self.data_type == 'url':
|
||||
try:
|
||||
pattern = re.compile("(?:Category: )([\w\s]+)")
|
||||
baseurl = 'http://www.fortiguard.com/iprep?data='
|
||||
tailurl = '&lookup=Lookup'
|
||||
url = baseurl + self.getData() + tailurl
|
||||
baseurl = 'http://www.fortiguard.com/webfilter?q='
|
||||
url = baseurl + self.getData()
|
||||
req = requests.get(url)
|
||||
category_match = re.search(pattern, req.content, flags=0)
|
||||
self.report({
|
||||
|
Loading…
Reference in New Issue
Block a user