Documentation ¶
Index ¶
- func AskConfirmation(message string) bool
- func DisplayInformationsGUI(profile map[string]interface{}, ...)
- func GetActiveExpiredTime() (string, error)
- func GetActiveMachineID() (string, error)
- func GetActiveMachineIP() (string, error)
- func GetActiveReleaseArenaMachineIP() (string, error)
- func GetChallengeBlooder(challengeID string) (string, error)
- func GetCurrentUsername() string
- func GetHTBToken() (string, error)
- func GetInformationsFromActiveMachine() (map[string]interface{}, error)
- func GetMachineType(machine_id interface{}) (string, error)
- func GetReleaseArenaExpiredTime() (string, error)
- func GetUserSubscription() (string, error)
- func HTTPRequest(method string, urlParam string, jsonData []byte) (*http.Response, error)
- func HtbRequest(method string, urlParam string, jsonData []byte) (*http.Response, error)
- func ParseAndFormatDate(input string) (string, error)
- func ParseJsonMessage(resp *http.Response, key string) interface{}
- func SearchEndgameID(partialName string) (int, error)
- func SearchFortressID(partialName string) (int, error)
- func SearchItemIDByName(item string, element_type string) (string, error)
- func SearchLastReleaseArenaMachine() (string, error)
- func SearchProlabID(partialName string) (int, 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
- func TruncateString(str string, maxLength int) string
- type Activity
- type Challenge
- type ChallengeFinder
- type ChallengeResponseFinder
- type Data
- type DataActivity
- type Endgame
- type EndgameJsonResponse
- type InfoActivity
- type Item
- type JsonResponse
- type Lab
- type Machine
- type ProlabJsonResponse
- type Root
- type Username
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AskConfirmation ¶
AskConfirmation will request confirmation from the user
func DisplayInformationsGUI ¶
func DisplayInformationsGUI(profile map[string]interface{}, advancedLabsMap map[string]map[string]interface{})
Initializes and displays user information in tview
func GetActiveExpiredTime ¶ added in v1.5.0
GetActiveExpiredTime returns the expired date of the active machine
func GetActiveMachineID ¶
GetActiveMachineID returns the id of the active machine
func GetActiveMachineIP ¶
GetActiveMachineIP returns the ip of the active machine
func GetActiveReleaseArenaMachineIP ¶ added in v1.6.0
GetActiveReleaseArenaMachineIP returns the ip of the active release arena machine
func GetChallengeBlooder ¶ added in v1.6.0
func GetCurrentUsername ¶ added in v1.5.0
func GetCurrentUsername() string
GetCurrentUsername retrieves the current system user's name.
func GetHTBToken ¶
GetHTBToken checks whether the HTB_TOKEN environment variable exists
func GetMachineType ¶
GetMachineType will return the machine type
func GetReleaseArenaExpiredTime ¶ added in v1.6.0
func GetUserSubscription ¶
GetUserSubscription returns the user's subscription level
func HTTPRequest ¶
HTTPRequest makes an HTTP request with the specified method, URL, proxy settings, and data.
func HtbRequest ¶
HtbRequest makes an HTTP request to the Hackthebox API
func ParseAndFormatDate ¶
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 SearchEndgameID ¶ added in v1.6.0
func SearchFortressID ¶ added in v1.6.0
func SearchItemIDByName ¶
SearchItemIDByName will return the id of an item (machine / challenge / user) based on its name
func SearchLastReleaseArenaMachine ¶ added in v1.5.1
func SearchProlabID ¶ added in v1.6.0
func SetRetiredStatus ¶
SetRetiredStatus determines whether an item is retired or not.
func SetTabWriterData ¶
SetTabWriterData will write the contents of each array cell
func SetTabWriterHeader ¶
SetTabWriterHeader will display the information in an array
func TruncateString ¶ added in v1.5.0
Types ¶
type ChallengeFinder ¶ added in v1.6.0
func SearchChallengeByName ¶ added in v1.6.0
func SearchChallengeByName(partialName string) (ChallengeFinder, error)
type ChallengeResponseFinder ¶ added in v1.6.0
type ChallengeResponseFinder struct {
ChallengesFinder []ChallengeFinder `json:"challenges"`
}
type Data ¶ added in v1.6.0
type Data struct {
Labs []Lab `json:"labs"`
}
Structure pour représenter la section 'data' du JSON
type DataActivity ¶ added in v1.6.0
type DataActivity struct {
Info InfoActivity `json:"info"`
}
type EndgameJsonResponse ¶ added in v1.6.0
type InfoActivity ¶ added in v1.6.0
type InfoActivity struct {
Activities []Activity `json:"activity"`
}
type JsonResponse ¶ added in v1.6.0
Structure pour représenter le JSON entier
type ProlabJsonResponse ¶ added in v1.6.0
Structure pour représenter le JSON entier