devanshbatham / ParamSpider

Mining URLs from dark corners of Web Archives for bug hunting/fuzzing/further probing
MIT License
2.48k stars 422 forks source link

Update main.py #103

Closed dragonked2 closed 8 months ago

dragonked2 commented 1 year ago
Remove Duplicate Imports: You've imported the os module twice. We can remove one of them.

Use a Set for Extensions: Using a set for HARDCODED_EXTENSIONS can improve the has_extension function's performance as set membership checks are faster than list checks.

Improve Command-Line Argument Handling: We can simplify the command-line argument handling by combining similar actions into functions and avoiding redundant checks.

Remove Redundant Logging Configurations: You can simplify the logging configuration and avoid repetition.

Use F-Strings for Logging: Use f-strings for logging messages to improve readability.

Avoid Redundant File Operations: Avoid reading and writing the same file multiple times. You can collect URLs in memory and write them to the file once.