Documentation
¶
Index ¶
- Constants
- func AddSeparator(num string, format int, separator string) string
- func ArgsHaveTimes(args ...string) int
- func AttackRunner(attemptHandle AttemptHander, estimateDuration time.Duration) error
- func CanLog(messageLevel int) bool
- func CheckHostState(url string) (state, httpCode int)
- func CheckURI(testUrl string) (err error)
- func CheckURL(testUrl string) (err error)
- func CompareSubdomains(a, b string) int
- func Digits(n int) int
- func FileRead(filePath string) (data []byte, err error)
- func FileWrite(filePath string, data []byte) (err error)
- func FindPos[T string](needle T, haystack []T) int
- func GeneraApellidosCol() string
- func GeneraCelColombia() string
- func GeneraCiudadDeptoColombia() (string, string)
- func GeneraIP() string
- func GeneraNIPcolombia() string
- func GeneraNombresApellidosPersonaCol(noAccents bool) (nombres, apellidos string)
- func GeneraNombresApellidosPersonaCombinadosCol(noAccents bool) (s string)
- func GeneraNombresHombreCol() (s string)
- func GeneraNombresMujerCol() (s string)
- func GeneraPin(digitos int) string
- func GetAllCmds(t TargetInterface) (opts []menu.CommandOption)
- func JoinSlices[T any](slices ...[]T) []T
- func LogLevelsHelp() (s string)
- func MergeDicts(source StorageDict, target TargetDict, state bool)
- func MinInt(a, b int) int
- func PickRand[T any](options []T) T
- func RandDelayRange(min, max time.Duration)
- func RandDelayWindowed(duration, window time.Duration)
- func RandEmail(names string, year int) string
- func RandPass1(min, max int) string
- func RandUserAgent() string
- func RandUserName(p *gofakeit.PersonInfo) string
- func ReadYamlFile(filePath string, v any) (err error)
- func RemoveAccents(s *string)
- func RunJS(jsCode string, result interface{}) (err error)
- func SetMockServer(serverUrl string) (err error)
- func SortMirrors(stDict StorageDict)
- func TimedCall(each, limit time.Duration, handler func() (iterateAgain bool))
- func WriteYamlFile(filePath string, v any) (err error)
- func YamlParse(data []byte, v any) error
- func YamlSerialize(v any) (out []byte, err error)
- type AttemptHander
- type Config
- type CustErr
- type Discord
- type DummyType
- type HookData
- type MenuManager_t
- type MirrorOptions
- type ReqHandler
- func (r *ReqHandler) InitClient()
- func (r *ReqHandler) PrintCookies(u *url.URL)
- func (r *ReqHandler) SendGet(getUrl string, urlParams, additionalHeaders []SimpleTerm, filler interface{}) (err error, lastStep uint8)
- func (r *ReqHandler) SendJSON(target string, payload interface{}, additionalHeaders []SimpleTerm, ...) (err error, lastStep uint8)
- func (r *ReqHandler) SendMultipart(targetURL string, values map[string]io.Reader, additionalHeaders []SimpleTerm, ...) (err error, lastStep uint8)
- func (r *ReqHandler) SendPostEncoded(postUrl string, params, additionalHeaders []SimpleTerm, filler interface{}) (err error, lastStep uint8)
- func (r *ReqHandler) UseJar(use bool)
- type SafeCounter
- type SimpleTerm
- type StorageDict
- type TargetBase
- type TargetDict
- type TargetInterface
- type TargetSimple
- type TargetWithParams
- type Telegram
- type TgMsg
Constants ¶
const ( DEFAULT_TIMES = 4 DEFAULT_MOCK = "http://localhost:1080" DEFAULT_PROCESSES = 1 DEFAULT_LOGLEVEL = LOG_NORMAL )
const ( LOG_VERBOSE = iota // Verbose and/or debug LOG_NORMAL // Moderate LOG_QUIET // Severe only )
const ( // Host states HostUp = iota HostDown HostUnknown )
Variables ¶
This section is empty.
Functions ¶
func AddSeparator ¶
Adds a separator S in middle, according to given format
Formats:
- 0: NNNSNNNSNNNN - Example: phone number
- 1: NNNNSNNNNSNNNNSNNNN - Example: credit card
Another format will return the string untouched
func ArgsHaveTimes ¶
func AttackRunner ¶
func AttackRunner(attemptHandle AttemptHander, estimateDuration time.Duration) error
func CheckHostState ¶
func CompareSubdomains ¶
func GeneraApellidosCol ¶
func GeneraApellidosCol() string
func GeneraCelColombia ¶
func GeneraCelColombia() string
func GeneraNIPcolombia ¶
func GeneraNIPcolombia() string
func GeneraNombresHombreCol ¶
func GeneraNombresHombreCol() (s string)
func GeneraNombresMujerCol ¶
func GeneraNombresMujerCol() (s string)
func GetAllCmds ¶
func GetAllCmds(t TargetInterface) (opts []menu.CommandOption)
func JoinSlices ¶
func JoinSlices[T any](slices ...[]T) []T
func LogLevelsHelp ¶
func LogLevelsHelp() (s string)
func MergeDicts ¶
func MergeDicts(source StorageDict, target TargetDict, state bool)
mergeDicts merges the source dictionary into the target dictionary, with a preset state for each entry.
func RandDelayRange ¶
Random delay in a range of time Duration. If min > max, values will be considered swapped!
Example:
RandDelayRange(3*time.Second, 5*time.Second)
is a random delay ranging from 3 to 5 seconds
Previous example is equivalent to:
RandDelayWindowed(4*time.Second, 2*time.Second)
func RandDelayWindowed ¶
Delay within a random window of duration. The 'duration' is the middle/average delay of a 'window' of allowed deviations against the specified duration. If half of the window (the peak) exceeds the duration, the window will be trimmed to twice the duration
Example:
RandDelayWindowed(10*time.Second, 2*time.Second)
would be equivalent to a delay of 10 seconds, in average. The 2 seconds window, will give a range of +/- 1 second in which the final delay will be randomly ranging
Previous example, in other words, is equivalent to:
RandDelayRange(9*time.Second, 11*time.Second)
func RandUserAgent ¶
func RandUserAgent() string
func RandUserName ¶
func RandUserName(p *gofakeit.PersonInfo) string
func ReadYamlFile ¶
func RemoveAccents ¶
func RemoveAccents(s *string)
func RunJS ¶
Runs a JS snippet. The snippet should only print to console a json serialized object. Uses installed nodejs to run the code.
func SetMockServer ¶
func SortMirrors ¶
func SortMirrors(stDict StorageDict)
func TimedCall ¶
Calls a handler repeatedly in a limit time and if handler needs it.
The handler function will be called at most "limit"/"each" times while it returns true
func WriteYamlFile ¶
func YamlSerialize ¶
Types ¶
type AttemptHander ¶
type AttemptHander func()
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) ClearFlags ¶
func (c *Config) ClearFlags()
func (*Config) GetThreads ¶
func (*Config) ParseFlags ¶
func (c *Config) ParseFlags()
type Discord ¶
type Discord struct { ReqHandler Webhook string // contains filtered or unexported fields }
func (*Discord) DetectHookFromString ¶
func (*Discord) DetectHookFromURL ¶
func (*Discord) ResetAltHook ¶
func (m *Discord) ResetAltHook()
func (*Discord) SendDiscord ¶
func (*Discord) SetAltHook ¶
type MenuManager_t ¶
type MenuManager_t struct {
// contains filtered or unexported fields
}
var MainMenu MenuManager_t
func (*MenuManager_t) Add ¶
func (mm *MenuManager_t) Add(entry menu.CommandOption)
func (*MenuManager_t) Created ¶
func (mm *MenuManager_t) Created(name string) bool
func (*MenuManager_t) GetAll ¶
func (mm *MenuManager_t) GetAll() []menu.CommandOption
func (*MenuManager_t) Register ¶
func (mm *MenuManager_t) Register(target TargetInterface)
type MirrorOptions ¶
type MirrorOptions struct {
// contains filtered or unexported fields
}
func (*MirrorOptions) HasOption ¶
func (m *MirrorOptions) HasOption(opt string) bool
func (*MirrorOptions) ParseOptions ¶
func (m *MirrorOptions) ParseOptions(opts string)
type ReqHandler ¶
type ReqHandler struct { // Request object of the last HTTP request Request *http.Request // Response object of the last HTTP request Response *http.Response // contains filtered or unexported fields }
func (*ReqHandler) PrintCookies ¶
func (r *ReqHandler) PrintCookies(u *url.URL)
func (*ReqHandler) SendGet ¶
func (r *ReqHandler) SendGet(getUrl string, urlParams, additionalHeaders []SimpleTerm, filler interface{}) (err error, lastStep uint8)
func (*ReqHandler) SendJSON ¶
func (r *ReqHandler) SendJSON(target string, payload interface{}, additionalHeaders []SimpleTerm, filler interface{}) (err error, lastStep uint8)
func (*ReqHandler) SendMultipart ¶
func (r *ReqHandler) SendMultipart(targetURL string, values map[string]io.Reader, additionalHeaders []SimpleTerm, filler interface{}) (err error, lastStep uint8)
To send multipart/form-data
func (*ReqHandler) SendPostEncoded ¶
func (r *ReqHandler) SendPostEncoded(postUrl string, params, additionalHeaders []SimpleTerm, filler interface{}) (err error, lastStep uint8)
func (*ReqHandler) UseJar ¶
func (r *ReqHandler) UseJar(use bool)
Defines if a cookie jar will be used in subsequent requests. Also calls InitClient()
type SafeCounter ¶
type SafeCounter struct {
// contains filtered or unexported fields
}
func NewSafeCounter ¶
func NewSafeCounter(init int) *SafeCounter
func (*SafeCounter) Add ¶
func (c *SafeCounter) Add() int
func (*SafeCounter) Read ¶
func (c *SafeCounter) Read() int
type SimpleTerm ¶
type StorageDict ¶
func SplitDicts ¶
func SplitDicts(dict TargetDict) (alive, down StorageDict)
splitDicts splits the target dictionary into two separate dictionaries: one for alive hosts and one for down hosts.
type TargetBase ¶
type TargetBase struct {
Prefix, Description string
}
func (*TargetBase) GetProps ¶
func (t *TargetBase) GetProps() TargetBase
type TargetDict ¶
type TargetInterface ¶
type TargetSimple ¶
type TargetSimple struct { TargetBase // contains filtered or unexported fields }
func (*TargetSimple) GetMirrors ¶
func (t *TargetSimple) GetMirrors() []string
func (*TargetSimple) SetMirrors ¶
func (t *TargetSimple) SetMirrors(m *[]string)
type TargetWithParams ¶
type TargetWithParams struct { TargetBase // contains filtered or unexported fields }
func (*TargetWithParams) GetMirrorParams ¶
func (t *TargetWithParams) GetMirrorParams(mirror string) []string
func (*TargetWithParams) GetMirrors ¶
func (t *TargetWithParams) GetMirrors() (names []string)
func (*TargetWithParams) SetMirrors ¶
func (t *TargetWithParams) SetMirrors(m *[][]string)
type Telegram ¶
type Telegram struct { ReqHandler Token string Chat string ParseMode string // contains filtered or unexported fields }
func (*Telegram) ResetAltChat ¶
func (m *Telegram) ResetAltChat()
func (*Telegram) ResetAltToken ¶
func (m *Telegram) ResetAltToken()
func (*Telegram) SendToTelegram ¶
Send Message to a Telegram Chat
Please take care of not exceeding Telegram fair usage: - https://rollout.com/integration-guides/telegram-bot-api/api-essentials - https://core.telegram.org/bots/faq#my-bot-is-hitting-limits-how-do-i-avoid-this