Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
0xDexter0us committed Aug 29, 2023
1 parent 6e6c1a5 commit 3eb9275
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ func printCSVDescending(data []Data) {
fmt.Printf("%s\n", d.Attributes.AssetIdentifier)
}
}
func help() {}

func main() {

Expand All @@ -98,15 +99,15 @@ func main() {
flag.BoolVar(&showHelp, "h", false, "Show help message")
flag.Parse()

if showHelp {
if showHelp || program == "" || username == "" || apiKey == "" {
asciiArt := `
_ _ __ _ _
| |__ / | ___ ___ ___ _ __ ___ / _| ___| |_ ___| |__ ___ _ __
| '_ \| | / __|/ __/ _ \| '_ \ / _ \ | |_ / _ \ __/ __| '_ \ / _ \ '__|
| | | | | \__ \ (_| (_) | |_) | __/ | _| __/ || (__| | | | __/ |
|_| |_|_| |___/\___\___/| .__/ \___| |_| \___|\__\___|_| |_|\___|_|
|_|
`
_ _ __ _ _
| |__ / | ___ ___ ___ _ __ ___ / _| ___| |_ ___| |__ ___ _ __
| '_ \| | / __|/ __/ _ \| '_ \ / _ \ | |_ / _ \ __/ __| '_ \ / _ \ '__|
| | | | | \__ \ (_| (_) | |_) | __/ | _| __/ || (__| | | | __/ |
|_| |_|_| |___/\___\___/| .__/ \___| |_| \___|\__\___|_| |_|\___|_|
|_|
`

fmt.Println(asciiArt)
fmt.Println("\"h1 scope fetcher\" is a tool to fetch all inscope assets of HackerOne programs for integration in your automation and hacking workflow.")
Expand All @@ -116,11 +117,6 @@ func main() {
return
}

if program == "" || username == "" || apiKey == "" {
fmt.Println("Please provide program name, API username, and API key.\n Try -h for help.")
return
}

baseURL := fmt.Sprintf("https://api.hackerone.com/v1/hackers/programs/%s/structured_scopes?page%%5Bsize%%5D=100", program)

allData, err := fetchAllPages(baseURL)
Expand Down

0 comments on commit 3eb9275

Please sign in to comment.