libgrequest

package
v0.0.0-...-110d1f3 Latest Latest
Warning

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

Go to latest
Published: May 10, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArgBool

func ArgBool(s, p string) bool

ArgBool : Turn commandline pat into true or false

func ArgInt

func ArgInt(s, p string) int

ArgInt : Turn commandline pat into int

func ArgString

func ArgString(s, p string) string

func GetURL

func GetURL(s *State, currentloop int, cli string, pchan chan string)

GetURL : Recursive function, feeds urls for GoGet into string channel.

func GoGet

func GoGet(s *State, url, cookie, payload string) (*int, error)

GoGet : returs address of response statuscode and error

func GoPostForm

func GoPostForm(s *State, url, cookie, payload string) (*int, error)

GoPostForm :

func GoPostMultiPart

func GoPostMultiPart(s *State, url, cookie, payload string) (*int, error)

GoPostMultiPart :

func ParsePrintFilterArgs

func ParsePrintFilterArgs(s *State, fs string)

ParsePrintFilterArgs :

func ParseWordlistArgs

func ParseWordlistArgs(str string, s *State) bool

ParseWordlistArgs : set UrlFuzz Wordlists FuzzMap

func PrepareSignalHandler

func PrepareSignalHandler(s *State)

PrepareSignalHandler : Signal handler straight from gobuster to catch CTRL+C

func PrintChars

func PrintChars(s *State, r *Result)

PrintChars : probably a better way to do this

func PrintColorFn

func PrintColorFn(s *State, r *Result)

PrintColorFn : prints corized page info to stdout

func PrintHelp

func PrintHelp()

PrintHelp : cli help info

func PrintLines

func PrintLines(s *State, r *Result)

PrintLines :

func PrintNoColorFn

func PrintNoColorFn(s *State, r *Result)

PrintNoColorFn : print page into to stdout

func PrintStatus

func PrintStatus(s *State, r *Result)

PrintStatus :

func PrintTopColor

func PrintTopColor(s *State)

PrintTopColor : beginning of output

func PrintTopNoColor

func PrintTopNoColor(s *State)

PrintTopNoColor :

func PrintWords

func PrintWords(s *State, r *Result)

PrintWords :

func Processor

func Processor(s *State)

Processor : channel controlcenter

func TotalRequests

func TotalRequests(maxes []int) int

TotalRequests :

func Validate

func Validate(s *State, argstr, proxy string) bool

Validate : final input error checks before run.

func WriteToFile

func WriteToFile(output string, s *State)

WriteToFile :

Types

type Fuzz

type Fuzz struct {
	Wordlists [][]string
	Indexes   []int
	Maxes     []int
	Cmdline   []bool
}

Fuzz : struct to store info for GetUrl

func InitFuzz

func InitFuzz() *Fuzz

InitFuzz : init the Fuzz struct.

type IntSet

type IntSet struct {
	Set map[int64]bool
}

IntSet : Set value maps int64 to bool (from gobuster).

func (*IntSet) Add

func (set *IntSet) Add(i int64) bool

Add : Add int.

func (*IntSet) Contains

func (set *IntSet) Contains(i int64) bool

Contains : Contains int.

type PrintResultFunc

type PrintResultFunc func(s *State, r *Result)

PrintResultFunc : abstraction layer to handle printing different filters

type RedirectError

type RedirectError struct {
	StatusCode int
}

RedirectError : redirect err struct from gobuster

func (*RedirectError) Error

func (e *RedirectError) Error() string

type RedirectHandler

type RedirectHandler struct {
	Transport http.RoundTripper
	State     *State
}

RedirectHandler :

func (*RedirectHandler) RoundTrip

func (rh *RedirectHandler) RoundTrip(req *http.Request) (resp *http.Response, err error)

RoundTrip : roundtrip from gobuster

type RequestFunc

type RequestFunc func(s *State, url, cookie, payload string) (*int, error)

RequestFunc :

type Result

type Result struct {
	URL   string
	Body  []byte
	Chars int64
	Words int64
	Lines int64
	Code  int64
}

Result struct

func InitResult

func InitResult(fullURL string, resp *http.Response) (*Result, error)

InitResult : process http response pointer

type SafeCounter

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

SafeCounter is safe to use concurrently.

func InitSafeCounter

func InitSafeCounter() *SafeCounter

InitSafeCounter : Return intialized SafeCounter struct pointer.

func (*SafeCounter) Inc

func (c *SafeCounter) Inc()

Inc : Increment v.

type State

type State struct {
	Client         *http.Client
	UserAgent      string
	FollowRedirect bool
	Username       string
	Password       string
	IncludeLength  bool
	URL            string
	Cookies        string
	StatusCodes    IntSet
	WildcardForced bool
	UseSlash       bool
	IsWildcard     bool
	ProxyURL       *url.URL
	NoStatus       bool
	NoColor        bool
	OutputFile     *os.File
	OutputFileName string
	InsecureSSL    bool
	Payload        string
	Post           bool
	PostForm       bool
	PostMulti      bool
	Request        RequestFunc
	WildcardIps    StringSet
	Show           bool
	Printer        PrintResultFunc
	Filter         IntSet
	SignalChan     chan os.Signal
	WordListFiles  []string
	Quiet          bool
	PrintBody      bool
	Terminate      bool
	Threads        int
	Counter        *SafeCounter
	FUZZs          []string
	Fuzzer         *Fuzz
	Method         string
	Commandline    string
	Headers        map[string]string
}

State :

func InitState

func InitState() *State

InitState :

type StringSet

type StringSet struct {
	Set map[string]bool
}

StringSet : Set value maps string to bool (from gobuster).

func (*StringSet) Add

func (set *StringSet) Add(s string) bool

Add : Add string.

func (*StringSet) Contains

func (set *StringSet) Contains(s string) bool

Contains : Contains string.

Jump to

Keyboard shortcuts

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