diff --git a/env.test b/env.test index 82c7062..c84431a 100644 --- a/env.test +++ b/env.test @@ -1,3 +1,4 @@ TEST_REDIS_HOST=test-redis TEST_REDIS_PORT=6379 REDIS_CONN_STR=redis://test-redis:6379/1 +DB_CONN_STR= diff --git a/karton_sqlmap/karton_sqlmap.py b/karton_sqlmap/karton_sqlmap.py index b430740..002b755 100644 --- a/karton_sqlmap/karton_sqlmap.py +++ b/karton_sqlmap/karton_sqlmap.py @@ -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 = [] @@ -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", diff --git a/karton_ssl_checks/karton_ssl_checks.py b/karton_ssl_checks/karton_ssl_checks.py index eab3494..ddedbff 100644 --- a/karton_ssl_checks/karton_ssl_checks.py +++ b/karton_ssl_checks/karton_ssl_checks.py @@ -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: @@ -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