-
Notifications
You must be signed in to change notification settings - Fork 1.5k
goflags support #474
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
goflags support #474
Conversation
…discovery/subfinder into issue-378-goflag-support
…nto issue-378-goflag-support
Mzack9999
left a comment
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.
As discussed, if the config file can't be YAML unmarshaled due to deprecated structure, let's warn the user and exit. It may be possible that it's also necessary to modify https://github.com/projectdiscovery/goflags to detect the error. If that's the case, let's track it into a separate GH issue in the goflags repository.
|
Modification in the go flags library is being tracked https://github.com/projectdiscovery/goflags/issues/31 |
ehsandeep
left a comment
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.
@LuitelSamikshya unable to see new config file and scan is not running with this branch as well, here is example outputs:
$ git branch
dev
* issue-378-goflag-support
master
pr/419
pr/424
pr/431
pr/433
pr/437
pr/438
pr/445
pr/461
$ go build
$ ./subfinder -d hackerone.com
__ _____ __
_______ __/ /_ / __(_)___ ____/ /__ _____
/ ___/ / / / __ \/ /_/ / __ \/ __ / _ \/ ___/
(__ ) /_/ / /_/ / __/ / / / / /_/ / __/ /
/____/\__,_/_.___/_/ /_/_/ /_/\__,_/\___/_/ v2.4.9
projectdiscovery.io
Use with caution. You are responsible for your actions
Developers assume no liability and are not responsible for any misuse or damage.
By using subfinder, you also agree to the terms of the APIs used.
[INF] loading the default
[INF] Enumerating subdomains for hackerone.com
[INF] Found 0 subdomains for hackerone.com in 144 microseconds
$ ls ~/.config/subfinder/
config.yaml
Mzack9999
left a comment
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.
It's necessary to update go.mod to use the latest commit of projectdiscovery/goflags#32
Mzack9999
left a comment
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.
Providers are correctly migrated to $HOME/.config/subfinder/provider.yaml, anyway invoking again the tool trigger an EOF error for $HOME/.config/subfinder/config.yaml. If no options are specified, the tool should load the default config from config.yaml and the providers from the default provider.yaml.
Mzack9999
left a comment
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.
If the $home/.config/subfinder folder is empty I guess the application should re-generate empty configuration files:
$ rm -rf /Users/user/.config/subfinder/
$ echo hackerone.com | ./subfinder
__ _____ __
_______ __/ /_ / __(_)___ ____/ /__ _____
/ ___/ / / / __ \/ /_/ / __ \/ __ / _ \/ ___/
(__ ) /_/ / /_/ / __/ / / / / /_/ / __/ /
/____/\__,_/_.___/_/ /_/_/ /_/\__,_/\___/_/ v2.4.9
projectdiscovery.io
Use with caution. You are responsible for your actions
Developers assume no liability and are not responsible for any misuse or damage.
By using subfinder, you also agree to the terms of the APIs used.
[INF] loading the default
[FTL] Could not read configuration file /Users/user/.config/subfinder/provider.yaml: open /Users/user/.config/subfinder/provider.yaml: no such file or directory|
Closing as this PR moved to #498 |
This PR has a dependency to projectdiscovery/goflags#32 and provides following support:
provides go flags support
safely remove following controls from the current config file as we already this information in the code
resolvers,sources, all-sources,recursiveCreates default goflags config for the subfinder at
$HOME/.config/subfinder/config.yamlsupports custom source/provider config file