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':
|
if self.data_type == 'domain' or self.data_type == 'url':
|
||||||
try:
|
try:
|
||||||
pattern = re.compile("(?:Category: )([\w\s]+)")
|
pattern = re.compile("(?:Category: )([\w\s]+)")
|
||||||
baseurl = 'http://www.fortiguard.com/iprep?data='
|
baseurl = 'http://www.fortiguard.com/webfilter?q='
|
||||||
tailurl = '&lookup=Lookup'
|
url = baseurl + self.getData()
|
||||||
url = baseurl + self.getData() + tailurl
|
|
||||||
req = requests.get(url)
|
req = requests.get(url)
|
||||||
category_match = re.search(pattern, req.content, flags=0)
|
category_match = re.search(pattern, req.content, flags=0)
|
||||||
self.report({
|
self.report({
|
||||||
|
Loading…
Reference in New Issue
Block a user