toplib

package
v0.0.0-...-acb60fe Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: Unlicense Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AccountRegex     = "^[a-zA-Z0-9]{3,20}:[a-zA-Z0-9]{3,20}$"
	ProxyRegex       = `((http|https|socks4|socks5):\/\/)?([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?`
	HitsNumber   int = 0
	FailsNumber  int = 0
	CPM          int = 0
	Retries      int = 0
	AccountList  []Account
	HitList      []*Account
	ProxyList    []*Proxy
	OnCheck          = make(chan int)
	BotCount     int = 50
	WaitGroup        = sync.WaitGroup{}
	Semaphore    chan int
)

All global variables are defined here and can be accessed from any package.

Functions

func Base64Decode

func Base64Decode(str string) string

Base64Decode function to decode base64 string to string

func Base64DecodeBytes

func Base64DecodeBytes(str string) []byte

Base64DecodeBytes function to decode base64 string to byte array

func Base64Encode

func Base64Encode(str string) string

Base64Encode function to encode string to base64

func Base64EncodeBytes

func Base64EncodeBytes(data []byte) string

Base64EncodeBytes function to encode byte array to base64

func BasicAuth

func BasicAuth(username, password string) string

BasicAuth is a helper function to create a basic auth header

func CheckProxyHttp

func CheckProxyHttp(proxy string) bool

CheckProxyHttp checks if a proxy is alive and working by pinging it and checking the response code of the response it gets back. If the response code is 200, the proxy is alive and working.

func CheckProxySocks4

func CheckProxySocks4(proxy string) bool

CheckProxySocks4 checks if a proxy is alive and working by pinging it and checking the response code of the response it gets back. If the response code is 200, the proxy is alive and working.

func CheckProxySocks5

func CheckProxySocks5(proxy string) bool

CheckProxySocks5 checks if a proxy is alive and working by pinging it and checking the response code of the response it gets back. If the response code is 200, the proxy is alive and working.

func GetUserPass

func GetUserPass(i int) string

GetUserPass returns the username and password of an account in the list

func LeftParse

func LeftParse(str string, leftDelimiter string) string

LeftParse function to parse string given left delimiter

func LoadCombos

func LoadCombos(file string) (int, error)

LoadCombos is a function to load each line of a file into a map of usernames and passwords defined by the Combo struct

func MD5Hash

func MD5Hash(str string) string

The MD5Hash function returns the MD5 hash of the string

func MD5HashBytes

func MD5HashBytes(data []byte) string

MD5HashBytes hashes the data of the byte array

func MidParse

func MidParse(str string, leftDelimiter string, rightDelimiter string) string

MidParse function to parse string given left and right delimiter

func RandomUserAgent

func RandomUserAgent() string

RandomUserAgent function to generate random user agent

func RightParse

func RightParse(str string, rightDelimiter string) string

RightParse function to parse string given right delimiter

func SHA1Hash

func SHA1Hash(str string) string

The SHA1Hash function returns the SHA1 hash of the string

func SHA1HashBytes

func SHA1HashBytes(data []byte) string

The SHA1HashBytes function returns the SHA1 hash of the byte array

func SHA256Hash

func SHA256Hash(str string) string

The SHA256Hash function returns the SHA256 hash of the string

func SHA256HashBytes

func SHA256HashBytes(data []byte) string

The SHA256HashBytes function returns the SHA256 hash of the byte array

func SetConsoleTitle

func SetConsoleTitle(title string) error

SetConsoleTitle function sets the console title of the current console window. (No support for linux)

func StartUI

func StartUI()

StartUI function starts the UI for the program.

Types

type Account

type Account struct {
	Username string
	Password string
	Capture  []string
}

func (*Account) AddCaptureBool

func (a *Account) AddCaptureBool(name string, data bool)

AddCaptureBool adds a bool to the capture list

func (*Account) AddCaptureInt

func (a *Account) AddCaptureInt(name string, data int)

AddCaptureInt adds an int to the capture list

func (*Account) AddCaptureString

func (a *Account) AddCaptureString(name string, data string)

AddCaptureString adds a string to the capture list

func (*Account) AddFail

func (a *Account) AddFail(verbose bool)

AddFail Concatenates the username and password into a single string

func (*Account) AddHit

func (a *Account) AddHit(verbose bool)

AddHit Concatenates the username and password into a single string for use in the Hit-list Prints the hit to console using the default hits format if verbose is true

type Proxy

type Proxy struct {
	Address string
	InUse   bool
	Banned  bool
}

func (*Proxy) HttpProxyType

func (p *Proxy) HttpProxyType() *http.Client

HttpProxyType returns a http proxy client

type Worker

type Worker struct {
	Work func()
}

func NewWorker

func NewWorker() Worker

NewWorker returns a new Worker

func (*Worker) AddWork

func (w *Worker) AddWork(f func())

AddWork function adds a new work item to the worker's work queue

func (*Worker) StartWorker

func (w *Worker) StartWorker()

StartWorker starts the worker and performs the work assigned to it

func (*Worker) WorkerFunc

func (w *Worker) WorkerFunc(id int)

WorkerFunc is the function that the worker will perform

Jump to

Keyboard shortcuts

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