GoToolSharing / htb-cli

Interact with Hackthebox using your terminal - Be faster and more competitive !
https://github.com/GoToolSharing/htb-cli
GNU General Public License v3.0
87 stars 6 forks source link

[BUG] Invalid AppToken #74

Closed QU35T-code closed 11 months ago

QU35T-code commented 1 year ago

Describe the bug When App Token is invalid

To Reproduce

./htb-cli sherlocks
error: invalid character '<' looking for beginning of value
panic: interface conversion: interface {} is nil, not []interface {}

goroutine 1 [running]:
github.com/GoToolSharing/htb-cli/lib/sherlocks.CreateFlex({0x0?, 0x0?}, {0x449b0e, 0x6}, 0x0?)
    /home/runner/work/htb-cli/htb-cli/lib/sherlocks/tui.go:46 +0x538
github.com/GoToolSharing/htb-cli/cmd.glob..func6.1({0x46233a, 0x38}, {0x449b0e, 0x6}, 0x10?, 0x40001583c0)
    /home/runner/work/htb-cli/htb-cli/cmd/sherlocks.go:90 +0xf8
github.com/GoToolSharing/htb-cli/cmd.glob..func6(0x7fb640?, {0x4490f8?, 0x0?, 0x0?})
    /home/runner/work/htb-cli/htb-cli/cmd/sherlocks.go:102 +0x45c
github.com/spf13/cobra.(*Command).execute(0x7fb640, {0x837e08, 0x0, 0x0})
    /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:876 +0x4b4
github.com/spf13/cobra.(*Command).ExecuteC(0x7fb3c0)
    /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:990 +0x338
github.com/spf13/cobra.(*Command).Execute(...)
    /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:918
github.com/GoToolSharing/htb-cli/cmd.Execute()
    /home/runner/work/htb-cli/htb-cli/cmd/root.go:26 +0x24
main.main()
    /home/runner/work/htb-cli/htb-cli/main.go:19 +0x80
QU35T-code commented 11 months ago

Duplicate #77