Skip to content

Commit

Permalink
Fixing modules-extra to match core refactor (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazet authored Jul 14, 2023
1 parent b85deb7 commit fd1a2b3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions env.test
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
TEST_REDIS_HOST=test-redis
TEST_REDIS_PORT=6379
REDIS_CONN_STR=redis://test-redis:6379/1
DB_CONN_STR=
6 changes: 3 additions & 3 deletions karton_sqlmap/karton_sqlmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def _call_sqlmap(
self, url: str, arguments: List[str], find_in_output: str, timeout_seconds: Optional[int] = None
) -> Optional[str]:
def _run() -> Optional[str]:
if Config.CUSTOM_USER_AGENT:
additional_configuration = ["-A", Config.CUSTOM_USER_AGENT]
if Config.Miscellaneous.CUSTOM_USER_AGENT:
additional_configuration = ["-A", Config.Miscellaneous.CUSTOM_USER_AGENT]
else:
additional_configuration = []

Expand All @@ -41,7 +41,7 @@ def _run() -> Optional[str]:
"python3",
"/sqlmap/sqlmap.py",
"--delay",
str(Config.SECONDS_PER_REQUEST_FOR_ONE_IP),
str(Config.Limits.SECONDS_PER_REQUEST),
"-u",
url,
"--crawl",
Expand Down
6 changes: 3 additions & 3 deletions karton_ssl_checks/karton_ssl_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def run(self, current_task: Task) -> None:
f"https://{domain}",
],
capture_output=True,
timeout=Config.REQUEST_TIMEOUT_SECONDS,
timeout=Config.Limits.REQUEST_TIMEOUT_SECONDS,
)
stderr = process_result.stderr.decode("ascii", errors="ignore")
except subprocess.TimeoutExpired as e:
Expand All @@ -94,13 +94,13 @@ def run(self, current_task: Task) -> None:
original_url,
verify=False,
stream=True,
timeout=Config.REQUEST_TIMEOUT_SECONDS,
timeout=Config.Limits.REQUEST_TIMEOUT_SECONDS,
headers=http_requests.HEADERS,
)
)
result["response_status_code"] = response.status_code
result["response_content_prefix"] = response.content.decode("utf-8", errors="ignore")[
: Config.CONTENT_PREFIX_SIZE
: Config.Miscellaneous.CONTENT_PREFIX_SIZE
]

redirect_url = response.url
Expand Down

0 comments on commit fd1a2b3

Please sign in to comment.