mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 08:38:28 +00:00
fix: [hosts] fix number of hosts extracted
This commit is contained in:
parent
5094b2dcbb
commit
bdaa4c51c9
2 changed files with 1 additions and 2 deletions
|
@ -22,7 +22,6 @@ sys.path.append(os.environ['AIL_BIN'])
|
||||||
# Import Project packages
|
# Import Project packages
|
||||||
##################################
|
##################################
|
||||||
from modules.abstract_module import AbstractModule
|
from modules.abstract_module import AbstractModule
|
||||||
from lib.objects.Items import Item
|
|
||||||
from lib.ConfigLoader import ConfigLoader
|
from lib.ConfigLoader import ConfigLoader
|
||||||
from lib import d4
|
from lib import d4
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ class Hosts(AbstractModule):
|
||||||
# if mimetype.split('/')[0] == "text":
|
# if mimetype.split('/')[0] == "text":
|
||||||
|
|
||||||
content = item.get_content()
|
content = item.get_content()
|
||||||
hosts = self.regex_findall(self.host_regex, item.get_id(), content)
|
hosts = self.regex_findall(self.host_regex, item.get_id(), content, r_set=True)
|
||||||
if hosts:
|
if hosts:
|
||||||
print(f'{len(hosts)} host {item.get_id()}')
|
print(f'{len(hosts)} host {item.get_id()}')
|
||||||
for host in hosts:
|
for host in hosts:
|
||||||
|
|
Loading…
Reference in a new issue