-
Notifications
You must be signed in to change notification settings - Fork 1k
fix: prevent response file overwrite when -sd flag is used #2226
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
Merged
Mzack9999
merged 7 commits into
projectdiscovery:dev
from
jjhwan-h:fix/no-dedupe-store-sd
Jan 9, 2026
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3cac134
fix: prevent response file overwrite when -sd flag is used
jjhwan-h 63130de
Merge branch 'dev' into pr/2226
Mzack9999 bd4dc82
fix var declaration
Mzack9999 a3212c6
fix lint errors
Mzack9999 ca007ea
fix: correct index file name generation
jjhwan-h 07b45fa
fixing index generation
Mzack9999 048c43f
Merge branch 'dev' into pr/2226
Mzack9999 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: projectdiscovery/httpx
Length of output: 1651
🏁 Script executed:
Repository: projectdiscovery/httpx
Length of output: 253
🏁 Script executed:
Repository: projectdiscovery/httpx
Length of output: 2016
🏁 Script executed:
Repository: projectdiscovery/httpx
Length of output: 1312
🏁 Script executed:
Repository: projectdiscovery/httpx
Length of output: 48
🏁 Script executed:
Repository: projectdiscovery/httpx
Length of output: 589
🏁 Script executed:
Repository: projectdiscovery/httpx
Length of output: 148
🏁 Script executed:
Repository: projectdiscovery/httpx
Length of output: 935
🏁 Script executed:
Repository: projectdiscovery/httpx
Length of output: 48
🏁 Script executed:
Repository: projectdiscovery/httpx
Length of output: 1287
🏁 Script executed:
Repository: projectdiscovery/httpx
Length of output: 1299
🏁 Script executed:
Repository: projectdiscovery/httpx
Length of output: 48
🏁 Script executed:
Repository: projectdiscovery/httpx
Length of output: 2184
🏁 Script executed:
Repository: projectdiscovery/httpx
Length of output: 3485
🏁 Script executed:
Repository: projectdiscovery/httpx
Length of output: 122
🏁 Script executed:
Repository: projectdiscovery/httpx
Length of output: 493
🏁 Script executed:
Repository: projectdiscovery/httpx
Length of output: 409
🏁 Script executed:
Repository: projectdiscovery/httpx
Length of output: 2359
🏁 Script executed:
Repository: projectdiscovery/httpx
Length of output: 4375
Add fallback hash or guard
FileNameHashusage against empty values.The switch from
domainFile-based naming toresp.FileNameHashintroduces a potential issue:FileNameHashis only set within theif scanopts.StoreResponse || scanopts.StoreChainblock in the analyze function (lines 2256-2301). If both conditions are false,FileNameHashremains an empty string. However, the output routine createsdomainResponseFileandscreenshotResponseFileat lines 1140-1141 using this potentially empty hash, andscreenshotResponseFileis later used ifr.scanopts.Screenshotis enabled. This can result in screenshot files named only.pngwithout a hash prefix. Either:FileNameHashis always computed regardless ofStoreResponse/StoreChainsettings, orscreenshotResponseFileusage with a fallback hash ifFileNameHashis empty.🤖 Prompt for AI Agents