Documentation
¶
Index ¶
- func AskConfirmation(message string, batchParam bool) bool
- func DisplayInformationsGUI(profile map[string]interface{}, ...)
- func GetActiveMachineID(proxyURL string) string
- func GetActiveMachineIP(proxyURL string) string
- func GetHTBToken() string
- func GetInformationsFromActiveMachine(proxyParam string) (map[string]interface{}, error)
- func GetMachineType(machine_id interface{}, proxyURL string) string
- func GetUserSubscription(proxyURL string) string
- func HtbRequest(method string, urlParam string, proxyURL string, jsonData []byte) (*http.Response, error)
- func ParseAndFormatDate(input string) (string, error)
- func ParseJsonMessage(resp *http.Response, key string) interface{}
- func SearchItemIDByName(item string, proxyURL string, element_type string, batchParam bool) (string, error)
- func SetRetiredStatus(data map[string]interface{}) string
- func SetStatus(data map[string]interface{}) string
- func SetTabWriterData(w *tabwriter.Writer, data string)
- func SetTabWriterHeader(header string) *tabwriter.Writer
- type Challenge
- type Machine
- type Root
- type Username
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AskConfirmation ¶ added in v1.2.0
AskConfirmation will request confirmation from the user
func DisplayInformationsGUI ¶ added in v1.3.0
func DisplayInformationsGUI(profile map[string]interface{}, advancedLabsMap map[string]map[string]interface{})
Initializes and displays user information in tview
func GetActiveMachineID ¶
GetActiveMachineID returns the id of the active machine
func GetActiveMachineIP ¶ added in v1.3.1
GetActiveMachineIP returns the ip of the active machine
func GetHTBToken ¶
func GetHTBToken() string
GetHTBToken checks whether the HTB_TOKEN environment variable exists
func GetInformationsFromActiveMachine ¶ added in v1.3.0
func GetMachineType ¶
GetMachineType will return the machine type
func GetUserSubscription ¶
GetUserSubscription returns the user's subscription level
func HtbRequest ¶
func HtbRequest(method string, urlParam string, proxyURL string, jsonData []byte) (*http.Response, error)
HtbRequest makes an HTTP request to the Hackthebox API
func ParseAndFormatDate ¶ added in v1.2.0
ParseAndFormatDate takes an input date string, parses it into a time.Time object, and formats it to the "2006-01-02" format.
func ParseJsonMessage ¶
ParseJsonMessage will parse the result of the API request into a JSON
func SearchItemIDByName ¶ added in v1.1.0
func SearchItemIDByName(item string, proxyURL string, element_type string, batchParam bool) (string, error)
SearchItemIDByName will return the id of an item (machine / challenge / user) based on its name
func SetRetiredStatus ¶ added in v1.2.0
SetRetiredStatus determines whether an item is retired or not.
func SetTabWriterData ¶ added in v1.2.0
SetTabWriterData will write the contents of each array cell
func SetTabWriterHeader ¶ added in v1.2.0
SetTabWriterHeader will display the information in an array