Skip to content

Commit

Permalink
Merge pull request #1406 from zrquan/async
Browse files Browse the repository at this point in the history
move --async to General
  • Loading branch information
shelld3v authored Oct 14, 2024
2 parents dd65f56 + 0c4195a commit 60a5b84
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Table of Contents
* [Pausing progress](#pausing-progress)
* [Recursion](#recursion)
* [Threads](#threads)
* [Asynchronous](#asynchronous)
* [Prefixes / Suffixes](#prefixes--suffixes)
* [Blacklist](#blacklist)
* [Filters](#filters)
Expand Down Expand Up @@ -176,6 +177,7 @@ Options:
General Settings:
-t THREADS, --threads=THREADS
Number of threads
--async Enable asynchronous mode
-r, --recursive Brute-force recursively
--deep-recursive Perform recursive scan on every directory depth (e.g.
api/users -> api/)
Expand Down Expand Up @@ -264,7 +266,6 @@ Options:
Advanced Settings:
--crawl Crawl for new paths in responses
--async Enable asynchronous mode
View Settings:
--full-url Full URLs in the output (enabled automatically in
Expand Down Expand Up @@ -297,6 +298,7 @@ By default, `config.ini` inside your dirsearch directory is used as the configur

[general]
threads = 25
async = False
recursive = False
deep-recursive = False
force-recursive = False
Expand Down Expand Up @@ -348,7 +350,6 @@ max-retries = 1

[advanced]
crawl = False
async = False

[view]
full-url = False
Expand Down
2 changes: 1 addition & 1 deletion config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

[general]
threads = 25
async = False
recursive = False
deep-recursive = False
force-recursive = False
Expand Down Expand Up @@ -63,7 +64,6 @@ max-retries = 1

[advanced]
crawl = False
async = False

[view]
full-url = False
Expand Down
2 changes: 1 addition & 1 deletion lib/core/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ def parse_config(opt):

# General
opt.thread_count = opt.thread_count or config.safe_getint("general", "threads", 25)
opt.async_mode = opt.async_mode or config.safe_getboolean("general", "async")
opt.include_status_codes = opt.include_status_codes or config.safe_get(
"general", "include-status"
)
Expand Down Expand Up @@ -353,7 +354,6 @@ def parse_config(opt):

# Advanced
opt.crawl = opt.crawl or config.safe_getboolean("advanced", "crawl")
opt.async_mode = opt.async_mode or config.safe_getboolean("advanced", "async")

# View
opt.full_url = opt.full_url or config.safe_getboolean("view", "full-url")
Expand Down
12 changes: 6 additions & 6 deletions lib/parse/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ def parse_arguments():
metavar="THREADS",
help="Number of threads",
)
general.add_option(
"--async",
action="store_true",
dest="async_mode",
help="Enable asynchronous mode",
)
general.add_option(
"-r",
"--recursive",
Expand Down Expand Up @@ -467,12 +473,6 @@ def parse_arguments():
dest="crawl",
help="Crawl for new paths in responses"
)
advanced.add_option(
"--async",
action="store_true",
dest="async_mode",
help="Enable asynchronous mode",
)

# View Settings
view = OptionGroup(parser, "View Settings")
Expand Down

0 comments on commit 60a5b84

Please sign in to comment.