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

allow custom args #185

Merged
merged 5 commits into from
May 24, 2024
Merged

allow custom args #185

merged 5 commits into from
May 24, 2024

Conversation

tarunKoyalwar
Copy link
Member

@tarunKoyalwar tarunKoyalwar commented May 19, 2024

Proposed Changes

  • goflags now allows passing custom args if given instead of os.Args[1:]

  • this was implemented to debug nuclei but vscode debugger can't handle codebase size but this will help in other projects

  • this is expected to be used in debugging or intergration tests
    ex:

package main

import (
	"testing"

	"github.com/projectdiscovery/goflags"
)

func TestNuclei(t *testing.T) {
	command := `-u https://scanme.sh -stats -pt dns`
	run(goflags.GetArgsFromString(command)...)
}

projectdiscovery/nuclei@fb3365c

@tarunKoyalwar tarunKoyalwar marked this pull request as draft May 19, 2024 18:59
@tarunKoyalwar tarunKoyalwar marked this pull request as ready for review May 24, 2024 15:19
@tarunKoyalwar tarunKoyalwar self-assigned this May 24, 2024
@Mzack9999 Mzack9999 merged commit f950823 into main May 24, 2024
5 checks passed
@Mzack9999 Mzack9999 deleted the allow-custom-args branch May 24, 2024 16:46
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.

None yet

2 participants