sherlocks

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SherlocksURL            = config.BaseHackTheBoxAPIURL + "/sherlocks?state=active"
	RetiredSherlocksURL     = config.BaseHackTheBoxAPIURL + "/sherlocks?state=retired"
	ScheduledSherlocksURL   = config.BaseHackTheBoxAPIURL + "/sherlocks?state=unreleased"
	ActiveSherlocksTitle    = "Active"
	RetiredSherlocksTitle   = "Retired"
	ScheduledSherlocksTitle = "Scheduled"
	SherlocksCheckMark      = "\U00002705"
	SherlocksCrossMark      = "\U0000274C"
	SPenguin                = "\U0001F427"
	SComputer               = "\U0001F5A5 "
)

Variables

This section is empty.

Functions

func CreateFlex

func CreateFlex(info interface{}, title string, isScheduled bool) (*tview.Flex, error)

CreateFlex creates and returns a Flex view with machine information

func GetColorFromDifficultyText

func GetColorFromDifficultyText(difficultyText string) string

GetColorFromDifficultyText returns the color corresponding to the given difficulty.

func GetGeneralInformations

func GetGeneralInformations(sherlockID string, sherlockDownloadPath string) error

GetGeneralInformations retrieves and prints general information about a Sherlock challenge.

func GetTaskByID

func GetTaskByID(sherlockID string, sherlockTaskID int, sherlockHint bool) error

GetTaskByID retrieves and prints the description of a specific task of a Sherlock challenge.

func SearchIDByName

func SearchIDByName(sherlockSearch string) (string, error)

SearchIDByName searches for a Sherlock challenge by name and returns its ID.

Types

type DownloadFile added in v1.4.1

type DownloadFile struct {
	URL       string `json:"url"`
	ExpiresIn int    `json:"expires_in"`
}

type SherlockData

type SherlockData struct {
	Data []SherlockElement `json:"data"`
}

type SherlockDataTasks

type SherlockDataTasks struct {
	Tasks []SherlockTask `json:"data"`
}

func GetTasks

func GetTasks(sherlockID string) (*SherlockDataTasks, error)

GetTasks retrieves all tasks for a specific Sherlock challenge.

type SherlockElement

type SherlockElement struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

type SherlockNameID

type SherlockNameID struct {
	Name string
	ID   int
}

type SherlockTask

type SherlockTask struct {
	ID          int    `json:"id"`
	Title       string `json:"title"`
	Description string `json:"description"`
	MaskedFlag  string `json:"masked_flag"`
	Hint        string `json:"hint"`
	Completed   bool   `json:"completed"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL