Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
kazet committed Jul 19, 2024
1 parent 28c7121 commit 1609727
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions artemis/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,12 @@ class Nuclei:
"when the Github API rate limits are spent).",
] = get_config("NUCLEI_CHECK_TEMPLATE_LIST", default=True, cast=bool)

NUCLEI_SECONDS_PER_REQUEST_ON_RETRY: Annotated[
bool,
"When retrying due to 'context deadline exceeded', each request will take at least max(2 * SECONDS_PER_REQUEST, "
"NUCLEI_SECONDS_PER_REQUEST_ON_RETRY).",
] = get_config("NUCLEI_SECONDS_PER_REQUEST_ON_RETRY", default=0.25, cast=int)

NUCLEI_TEMPLATE_GROUPS_FILE: Annotated[
str,
"A path (inside Docker container) of a file with JSON dictionary of template group assignments: "
Expand Down
2 changes: 1 addition & 1 deletion artemis/modules/nuclei.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def _scan(self, templates: List[str], targets: List[str]) -> List[Dict[str, Any]

milliseconds_per_request_candidates = [
milliseconds_per_request_initial,
max(200, milliseconds_per_request_initial * 2),
max(1000 * Config.Modules.Nuclei.NUCLEI_SECONDS_PER_REQUEST_ON_RETRY, milliseconds_per_request_initial * 2),
]

if Config.Miscellaneous.CUSTOM_USER_AGENT:
Expand Down

0 comments on commit 1609727

Please sign in to comment.