From df1f17791c1f46e1d03d5bee350312f963084f7b Mon Sep 17 00:00:00 2001 From: "Alex Munene (@enenumxela)" <62714471+enenumxela@users.noreply.github.com> Date: Mon, 24 Jul 2023 09:07:08 +0300 Subject: [PATCH] chore: - --- .github/workflows/release.yml | 4 +++- .goreleaser.yaml | 2 -- cmd/xurlfind3r/main.go | 36 ++++++++++++++++++----------------- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 21da946..0e20215 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,8 +26,10 @@ jobs: name: Run GoReleaser uses: goreleaser/goreleaser-action@v4 with: - args: "release --clean" + distribution: goreleaser version: latest + args: "release --clean" + workdir: . env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" SLACK_WEBHOOK: "${{ secrets.SLACK_WEBHOOK }}" diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 37cb102..fa08bdf 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -39,8 +39,6 @@ archives: id: tgz builds: [xurlfind3r-cli] format: tar.gz - replacements: - darwin: macOS format_overrides: - goos: windows diff --git a/cmd/xurlfind3r/main.go b/cmd/xurlfind3r/main.go index 3ca7621..165148a 100644 --- a/cmd/xurlfind3r/main.go +++ b/cmd/xurlfind3r/main.go @@ -43,7 +43,7 @@ func init() { // Handle CLI arguments, flags & help message (pflag) pflag.StringVarP(&domain, "domain", "d", "", "") pflag.BoolVar(&includeSubdomains, "include-subdomains", false, "") - pflag.BoolVarP(&listSources, "sources", "s", false, "") + pflag.BoolVar(&listSources, "sources", false, "") pflag.StringSliceVarP(&sourcesToUse, "use-sources", "u", []string{}, "") pflag.StringSliceVarP(&sourcesToExclude, "exclude-sources", "e", []string{}, "") pflag.BoolVar(&parseWaybackRobots, "parse-wayback-robots", false, "") @@ -62,28 +62,30 @@ func init() { h := "USAGE:\n" h += " xurlfind3r [OPTIONS]\n" - h += "\nTARGET:\n" - h += " -d, --domain string domain to match URLs\n" - h += " --include-subdomains bool match subdomain's URLs\n" + h += "\nINPUT:\n" + h += " -d, --domain string domain to match URLs\n" + + h += "\nSCOPE:\n" + h += " --include-subdomains bool match subdomain's URLs\n" h += "\nSOURCES:\n" - h += " -s, --sources bool list supported sources\n" - h += " -u, --use-sources strings comma(,) separated sources to use\n" - h += " -e, --exclude-sources strings comma(,) separated sources to exclude\n" - h += " --parse-wayback-robots bool with wayback, parse robots.txt snapshots\n" - h += " --parse-wayback-source bool with wayback, parse source code snapshots\n" + h += " --sources bool list supported sources\n" + h += " -u, --use-sources string[] comma(,) separated sources to use\n" + h += " -e, --exclude-sources string[] comma(,) separated sources to exclude\n" + h += " --parse-wayback-robots bool with wayback, parse robots.txt snapshots\n" + h += " --parse-wayback-source bool with wayback, parse source code snapshots\n" h += "\nFILTER & MATCH:\n" - h += " -f, --filter string regex to filter URLs\n" - h += " -m, --match string regex to match URLs\n" + h += " -f, --filter string regex to filter URLs\n" + h += " -m, --match string regex to match URLs\n" h += "\nOUTPUT:\n" - h += " --no-color bool no color mode\n" - h += " -o, --output string output URLs file path\n" - h += fmt.Sprintf(" -v, --verbosity string debug, info, warning, error, fatal or silent (default: %s)\n", string(levels.LevelInfo)) + h += " --no-color bool disable colored output\n" + h += " -o, --output string output URLs file path\n" + h += fmt.Sprintf(" -v, --verbosity string debug, info, warning, error, fatal or silent (default: %s)\n", string(levels.LevelInfo)) h += "\nCONFIGURATION:\n" - h += fmt.Sprintf(" -c, --configuration string configuration file path (default: %s)\n", defaultYAMLConfigFile) + h += fmt.Sprintf(" -c, --configuration string configuration file path (default: %s)\n", defaultYAMLConfigFile) fmt.Fprintln(os.Stderr, h) } @@ -127,8 +129,8 @@ func main() { // List suported sources if listSources { - hqgolog.Info().Msgf("listing %v current supported sources", au.Underline(strconv.Itoa(len(config.Sources))).Bold()) - hqgolog.Info().Msgf("sources with %v needs a key or token", au.Underline("*").Bold()) + hqgolog.Info().Msgf("listing, %v, current supported sources.", au.Underline(strconv.Itoa(len(config.Sources))).Bold()) + hqgolog.Info().Msgf("sources marked with %v need key(s) or token(s) to work.", au.Underline("*").Bold()) hqgolog.Print().Msg("") needsKey := make(map[string]interface{})