Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix paramminer finish() repeating checks bug #2177

Merged
merged 10 commits into from
Jan 15, 2025
Merged

Conversation

liquidsec
Copy link
Collaborator

@liquidsec liquidsec commented Jan 15, 2025

This fixes a serious bug with the paramminer finish() method that was causing the same parameters to be checked multiple times and make bigger scans take a ridiculous amount of time.

Related Issue:

#2159

Summary of Changes

Centralized Parameter Handling:

Moved the logic for adding new parameters to self.extracted_words_master to the handle_event method only, ensuring only new parameters not in the wordlist are added, and only from WEB_PARAMETER events.

Simplified finish Method:

Streamlined the finish method by directly using a set comprehension in a single operation to filter and process extracted_words_master.
The use of list operations to remove already checked parameters was also very inefficient.

Event Filtering Enhancement:

Now Filtering URLs ending in .pdf a static extension

@liquidsec liquidsec added bug Something isn't working high-priority labels Jan 15, 2025
@liquidsec liquidsec changed the title Fixing paramminer finsh() bug Fixing paramminer finish() bug Jan 15, 2025
@liquidsec liquidsec changed the title Fixing paramminer finish() bug Fix paramminer finish() repeating checks bug Jan 15, 2025
Copy link

codecov bot commented Jan 15, 2025

Codecov Report

Attention: Patch coverage is 87.50000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 93%. Comparing base (12e8aee) to head (f470724).
Report is 11 commits behind head on dev.

Files with missing lines Patch % Lines
bbot/modules/paramminer_headers.py 78% 2 Missing ⚠️
...2/module_tests/test_module_paramminer_getparams.py 94% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##             dev   #2177   +/-   ##
=====================================
- Coverage     93%     93%   -0%     
=====================================
  Files        376     376           
  Lines      29154   29167   +13     
=====================================
+ Hits       26932   26943   +11     
- Misses      2222    2224    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@liquidsec liquidsec merged commit f14b5b4 into dev Jan 15, 2025
14 checks passed
@liquidsec liquidsec deleted the paramminer-finish-bug-fix branch January 15, 2025 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high-priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants