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

Added flag for single or comma separated stdin input values (#737) #759

Merged
merged 3 commits into from
Sep 21, 2022
Merged

Added flag for single or comma separated stdin input values (#737) #759

merged 3 commits into from
Sep 21, 2022

Conversation

ariasmn
Copy link
Contributor

@ariasmn ariasmn commented Sep 9, 2022

There are a couple of things which I don't know if are ok:

  • Variable/function naming. Non-native speaker so maybe the spelling is wrong.
  • You can input from the stdin and a file (using both the -l and -u flags) at the same time.
  • Did not add any tests because I didn't fully understand how these works. I can do some if needed with some guidance.

@ariasmn
Copy link
Contributor Author

ariasmn commented Sep 20, 2022

@ehsandeep @Ice3man543 Just wanted to check the current status of the PR and ask if there is anything more I could do to help

runner/runner.go Outdated
var numHosts int
// check if a string input has been provided
if r.options.InputTargetHost != "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use the logic from goflags that automatically splits the input into a slice. See StringSliceVarP

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could check how it has been done in other projects of ours (e.g. nuclei or dnsx)

Copy link
Contributor

@forgedhallpass forgedhallpass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see my comments.

@ariasmn
Copy link
Contributor Author

ariasmn commented Sep 20, 2022

Done! Just updated the PR.

Please let me know if everything is ok.

Copy link
Member

@Ice3man543 Ice3man543 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@ehsandeep ehsandeep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

./httpx -u example.com,google.com -silent

https://google.com
https://example.com

@ehsandeep ehsandeep merged commit d48afd2 into projectdiscovery:dev Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add flag for accepting single or comma separated input values
4 participants