Skip to content

Commit

Permalink
validation (#1118)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazet authored Jul 2, 2024
1 parent 9daa021 commit a531d89
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 6 additions & 2 deletions artemis/modules/subdomain_enumeration.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from artemis.binds import TaskStatus, TaskType
from artemis.config import Config
from artemis.db import DB
from artemis.domains import is_subdomain
from artemis.domains import is_domain, is_subdomain
from artemis.module_base import ArtemisBase
from artemis.utils import check_output_log_on_error

Expand Down Expand Up @@ -40,7 +40,7 @@ def __init__(self, db: Optional[DB] = None, *args, **kwargs) -> None: # type: i

if len({bind.identity for bind in self.backend.get_binds()} & set(old_modules)) > 0:
for old_task in self.backend.iter_all_tasks(parse_resources=False):
if old_task.receiver in old_modules:
if old_task.receiver in old_modules and old_task.payload.get("source", None) != "migration":
self.log.info(f"Moving task from {old_task.receiver} to {self.identity}")
new_task = Task(
{"type": TaskType.DOMAIN.value},
Expand Down Expand Up @@ -152,6 +152,10 @@ def run(self, current_task: Task) -> None:

valid_subdomains_from_tool = set()
for subdomain in subdomains_from_tool:
subdomain = subdomain.strip(".")
if not is_domain(subdomain):
self.log.info("Non-domain returned: %s from %s", subdomain, domain)
continue
if not is_subdomain(subdomain, domain):
self.log.info("Non-subdomain returned: %s from %s", subdomain, domain)
continue
Expand Down
1 change: 0 additions & 1 deletion scripts/start
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ fi
--scale=karton-wordpress_plugins=5 \
--scale=karton-nuclei=5 \
--scale=karton-bruter=5 \
--scale=karton-subdomain_enumeration=5 \
$ADDITIONAL_OPTIONS

if [ $? -eq 0 ]; then
Expand Down

0 comments on commit a531d89

Please sign in to comment.