lib

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2018 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package lib contain all the functionality needed.

Utils: for manipulating file and system.
Net: for every thing related with Network.
Logger just for pretty output.

Index

Constants

View Source
const (
	RESET       = "\033[0m"
	START       = "\033[%sm"
	ORANGE      = "33"
	GREEN       = "32"
	LIGHTGREEN  = "92"
	GREY        = "37"
	BLACK       = "30"
	RED         = "31"
	LIGHTRED    = "91"
	CYAN        = "36"
	LIGHTCYAN   = "96"
	BLUE        = "34"
	LIGHTBLUE   = "94"
	PURPLE      = "35"
	YELLOW      = "93"
	WHITE       = "97"
	LIGHTPURPLE = "95"

	INFO = "[!] "
	QUE  = "[?] "
	BAD  = "[-] "
	GOOD = "[+] "
	RUN  = "[~] "

	BG     = ";7"
	BOLD   = ";1"
	ITALIC = "3"
	UNDER  = "4"
	STRIKE = "09"
)

All the const are defined for what they do!

Variables

This section is empty.

Functions

func Bad

func Bad(message string)

Bad is a function that will show output with red color.

func ByteConverter

func ByteConverter(length int64) string

ByteConverter convert length to bytes, KB, MB, GB, TB. param int64 return string

func CheckConnectivity

func CheckConnectivity(host string) int

CheckConnectivity check if the provided host is up or not.

func CountLine

func CountLine(file string) string

CountLine Count the number of line in a wordlist to determine how much we will brutforce.

func DoRequest

func DoRequest(req *http.Request, client http.Client, i int)

DoRequest to make request param *http.Request, http.Client

func Execute

func Execute(pathExec string, args []string) (string, error)

Execute a shell command. return cmd (output) or emty string if error.

func Existe

func Existe(path string) bool

Existe check if a folder or file existe

func Fuxe

func Fuxe(netreq NetRequest)

Fuxe to brute force the web-host param NetRequest (struct)

func GetBody

func GetBody(req *http.Request) (string, error)

GetBody fetch the body

func GetListFile

func GetListFile(dir string) []string

GetListFile get the list of a file in a directory.

func GetRandLine

func GetRandLine(file string) string

GetRandLine to return random line of file

func Good

func Good(message string)

Good is a function that will show output with green color.

func Info

func Info(message string)

Info is a function that will show output with orange color.

func Printerr

func Printerr(err error, fromwhere string)

Printerr is a function that will print error message if found

func Que

func Que(message string)

Que is a function that will show output with blue color.

func ReadFromFile

func ReadFromFile(filePath string) []string

ReadFromFile this will read the content of file if -proxyfile is provided.

func ReadLine

func ReadLine(r *bufio.Reader) (string, error)

ReadLine file line per line.

func ReturnStringFile

func ReturnStringFile(filePath string) string

ReturnStringFile return the content of file

func ReturnURL

func ReturnURL(host string) (*url.URL, error)

ReturnURL to return HTTP.URL

func Run

func Run(message string)

Run is a function that will show output with white color.

func Say

func Say(color, message string)

Say is a function that will output a message with the defined color.

func SayMe

func SayMe(color, message string) string

SayMe is a function that will return a message with the defined color.

func ShowOutput

func ShowOutput(status int, length string, url string)

ShowOutput print pretty output from a request

func ShowResultsFile

func ShowResultsFile(w http.ResponseWriter, r *http.Request, path string)

ShowResultsFile see if the directory is in the data/results and show all json files in it

func StartListning

func StartListning()

StartListning start listning to the given port

func ThrowTor

func ThrowTor() proxy.Dialer

ThrowTor activate the the app to go throw Tor

func WriteToFile

func WriteToFile(filePath string, instring string)

WriteToFile to write to a file

Types

type NetRequest

type NetRequest struct {
	Host       string
	Proxyfile  string
	Wordlist   string
	UserAgent  string
	Cookie     string
	Ex         []string
	Proxy      string
	Tor        bool
	ResultFile string
}

NetRequest for Request data.

type ServeMux

type ServeMux struct {
	// contains filtered or unexported fields
}

ServeMux for concurrency

func (*ServeMux) ServeHTTP

func (mutex *ServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP hundle results route

type WebServer

type WebServer struct {
	ID     int    `json:"id"`
	URL    string `json:"url"`
	Status int    `json:"status"`
	Length string `json:"length"`
}

WebServer json format

type WebServerslice

type WebServerslice struct {
	WebServers []WebServer `json:"host"`
}

WebServerslice json format

func DecodeJSONFile

func DecodeJSONFile(path string) WebServerslice

DecodeJSONFile decode json file and return WebServerslice

Jump to

Keyboard shortcuts

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