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

add no-clobber flag #827

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open

Conversation

dogancanbakir
Copy link
Member

@dogancanbakir dogancanbakir commented Mar 28, 2024

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.

@dogancanbakir dogancanbakir self-assigned this Mar 28, 2024
@dogancanbakir dogancanbakir linked an issue Mar 28, 2024 that may be closed by this pull request
Copy link
Member

@Mzack9999 Mzack9999 left a 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

@dogancanbakir dogancanbakir changed the title introduce incremental crawling add no-clobber flag Apr 18, 2024
Copy link
Member

@Mzack9999 Mzack9999 left a 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

@Mzack9999 Mzack9999 added the Type: Enhancement Most issues will probably ask for additions or changes. label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support incremental crawling
2 participants