Skip to content

Commit

Permalink
added --version
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsIgnacioPortal committed Sep 11, 2022
1 parent b6d82c4 commit 7317bab
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ List of all possible arguments:
-o, --output string
Save the inscope urls to a file
--version
Show the installed version
```

The firebounty json is automatically updated every 24hs
Expand Down
13 changes: 13 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ var inscopeURLs []string

func main() {

var version string
var showVersion bool
var company string
var stxt bool
var reuseList string //should only be "Y", "N" or ""
Expand All @@ -79,6 +81,8 @@ func main() {
var outofScopesListFilepath string
usedstdin = false

version = "v3.0.0"

const usage = `Usage: hacker-scoper --file /path/to/targets [--company company | --custom-inscopes-file /path/to/inscopes [--custom-outofcopes-file] /path/to/outofscopes] [--explicit-level INT] [--reuse Y/N] [--chain-mode] [--fire /path/to/firebounty.json]
Usage examples:
Expand Down Expand Up @@ -132,6 +136,9 @@ List of all possible arguments:
-o, --output string
Save the inscope urls to a file
--version
Show the installed version
`

flag.StringVar(&company, "c", "", "Specify the company name to lookup.")
Expand All @@ -153,6 +160,7 @@ List of all possible arguments:
flag.StringVar(&firebountyJSONPath, "fire", "", "Path to the FireBounty JSON")
flag.StringVar(&inscopeOutputFile, "o", "", "Save the inscope urls to a file")
flag.StringVar(&inscopeOutputFile, "output", "", "Save the inscope urls to a file")
flag.BoolVar(&showVersion, "version", false, "Show installed version")
//https://www.antoniojgutierrez.com/posts/2021-05-14-short-and-long-options-in-go-flags-pkg/
flag.Usage = func() { fmt.Print(usage) }
flag.Parse()
Expand All @@ -167,6 +175,11 @@ List of all possible arguments:
''''
`

if showVersion {
fmt.Print("hacker-scoper:" + version + "\n")
os.Exit(0)
}

if firebountyJSONPath == "" {
switch runtime.GOOS {
case "android":
Expand Down

0 comments on commit 7317bab

Please sign in to comment.