Skip to content

Commit

Permalink
Merge pull request #410 from owasp-noir/refactor/add-code-config-options
Browse files Browse the repository at this point in the history
Refactor config_initializer.cr to include status code options
  • Loading branch information
ksg97031 authored Sep 22, 2024
2 parents 0434f93 + 679ab6b commit 009d3fb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/config_initializer.cr
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,9 @@ class ConfigInitializer
"config_file" => YAML::Any.new(""),
"concurrency" => YAML::Any.new("100"),
"debug" => YAML::Any.new(false),
"exclude_codes" => YAML::Any.new(""),
"exclude_techs" => YAML::Any.new(""),
"format" => YAML::Any.new("plain"),
"status_codes" => YAML::Any.new(false),
"exclude_codes" => YAML::Any.new(""),
"include_path" => YAML::Any.new(false),
"nolog" => YAML::Any.new(false),
"output" => YAML::Any.new(""),
Expand All @@ -110,6 +109,7 @@ class ConfigInitializer
"set_pvalue_form" => YAML::Any.new([] of YAML::Any),
"set_pvalue_json" => YAML::Any.new([] of YAML::Any),
"set_pvalue_path" => YAML::Any.new([] of YAML::Any),
"status_codes" => YAML::Any.new(false),
"techs" => YAML::Any.new(""),
"url" => YAML::Any.new(""),
"use_filters" => YAML::Any.new([] of YAML::Any),
Expand Down Expand Up @@ -148,6 +148,9 @@ class ConfigInitializer
# Whether to enable debug mode
debug: #{options["debug"]}
# The status codes to exclude
exclude_codes: "#{options["exclude_codes"]}"
# Technologies to exclude
exclude_techs: "#{options["exclude_techs"]}"
Expand Down Expand Up @@ -187,6 +190,9 @@ class ConfigInitializer
set_pvalue_json:
set_pvalue_path:
# The status codes to use
status_codes: #{options["status_codes"]}
# The technologies to use
techs: "#{options["techs"]}"
Expand Down

0 comments on commit 009d3fb

Please sign in to comment.