-
Notifications
You must be signed in to change notification settings - Fork 639
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
add no-clobber flag #827
add no-clobber flag #827
Conversation
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.
Discussing internally if a behavior like wget overwrite/no-clobber
would be a good fit
f95ee1e
to
26f87d8
Compare
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.
lgtm - The current implementation acts by increasing the folder name version number if an existing one is detected.
$ go run . -ncb -srd test -u http://scanme.sh
$ ls
Directory: C:\Users\user\go\src\github.com\projectdiscovery\katana\cmd\katana
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 29/04/2024 14:42 test
d----- 29/04/2024 14:42 test1
d----- 29/04/2024 14:46 test10
d----- 29/04/2024 14:46 test11
d----- 29/04/2024 14:43 test2
d----- 29/04/2024 14:43 test3
d----- 29/04/2024 14:44 test4
d----- 29/04/2024 14:44 test5
d----- 29/04/2024 14:45 test6
d----- 29/04/2024 14:45 test7
d----- 29/04/2024 14:45 test8
d----- 29/04/2024 14:46 test9
Closes #749
This PR modifies the behavior of the
store-response-dir
directory creation. With the new-no-clobber
flag, the directory will be created as is if there are no existing directories. However, if directories already exist, it will increase the number suffix of the given directory or add a new suffix. When removing directories, all created directories will be removed.