util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2022 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetAlternatives = []string{"POST", "PUT", "PATCH", "DELETE", "XXX", " "}
View Source
var HTTPHeaders = []string{"Accept: text/html", "Accept: application/xml", "Accept: text/html,application/xhtml+xml", "Accept: application/json", "Accept: xxx", "Accept-Charset: utf-8", "Accept-Charset: xxx", "Accept-Datetime: Thu, 31 May 2007 20:35:00 GMT", "Accept-Datetime: xxx", "Accept-Encoding: gzip, deflate", "Accept-Encoding: xxx", "Accept-Language: en-US", "Accept-Language: xxx", "Access-Control-Request-Method: GET", "Access-Control-Request-Method: xxx", "Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==", "Cache-Control: no-cache", "Cache-Control: xxx", "Connection: keep-alive", "Connection: xxx", "Content-Encoding: gzip", "Content-Encoding: xxx", "Content-Length: 1000", "Content-MD5: Q2hlY2sgSW50ZWdyaXR5IQ==", "Content-Type: application/x-www-form-urlencoded", "Content-Type: xxx", "Cookie: $Version=1; Skin=new;", "Cookie: xxx", "Date: Tue, 15 Nov 1994 08:12:31 GMT", "Expect: 100-continue", "Expect: xxx", "From: user@example.com", "If-Match: \"737060cd8c284d8af7ad3082f209582d\"", "If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT", "If-None-Match: \"737060cd8c284d8af7ad3082f209582d]\"", "If-Range: \"737060cd8c284d8af7ad3082f209582d\"", "If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT", "Max-Forwards: 10", "Max-Forwards: xxx", "Origin: http://www.example-xxx.com", "Pragma: no-cache", "Pragma: xxx", "Prefer: return=representation", "Prefer: xxx", "Proxy-Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==", "Range: bytes=500-999", "Referer: http://example-xxx.com", "TE: trailers, deflate", "Trailer: Max-Forwards", "Trailer: xxx", "Transfer-Encoding: chunked", "Transfer-Encoding: xxx", "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0", "User-Agent: xxx", "Upgrade: h2c, HTTPS/1.3, IRC/6.9, RTA/x11, websocket", "Upgrade: xxx", "Via: 1.0 fred, 1.1 example-xxx.com (Apache/1.1)", "Warning: 199 Miscellaneous warning", "Warning: xxx"}
View Source
var HostAlternatives = []string{"XXXX: ", "XXXX:", "Host:\r\n", "Hostwww.", "Host:www.", "HostHeader:", " "}
View Source
var HttpAlternatives = []string{"XXXX/1.1", "HTTP/11.1", "HTTP/1.12", "/11.1", "HTTP2", "HTTP3", "HTTP9", "HTTP/2", "HTTP/3", "HTTP/9", " ", "HTTPx/1.1", "HTTP /1.1", "HTTP/ 1.1", "HTTP/1.1x", "HTTP/x1.1"}
View Source
var PathAlternatives = []string{"/ ", " z ", " ? ", " ", " /", "**", " /x", "x/ "}
View Source
var Subdomains = []string{"%s|subdomain|www", "%s|subdomain|mail", "%s|subdomain|forum", "%s|subdomain|m", "%s|subdomain|blog", "%s|subdomain|shop", "%s|subdomain|forums", "%s|subdomain|wiki", "%s|subdomain|community", "%s|subdomain|ww1"}

https://securitytrails.com/blog/most-popular-subdomains-mx-records#:~:text=As%20you%20can%20see%2C%20the,forums%2C%20wiki%2C%20community).

View Source
var TLDs = []string{"%s|tld|com", "%s|tld|xyz", "%s|tld|net", "%s|tld|club", "%s|tld|me", "%s|tld|org", "%s|tld|co", "%s|tld|shop", "%s|tld|info", "%s|tld|live"}

https://azbigmedia.com/business/here-are-2021s-most-popular-tlds-and-domain-registration-trends/

Functions

func CapitalizedPermutations

func CapitalizedPermutations(ip string, op string) []string

func CreateFile

func CreateFile(path string) *os.File

func GenerateAllAlternatives

func GenerateAllAlternatives(alternatives []string) []string

func GenerateAllCapitalizedPermutations

func GenerateAllCapitalizedPermutations(word string) []string

TODO: This currently only works for ASCII characters

func GenerateAllCertificateAlternatives

func GenerateAllCertificateAlternatives() []string

func GenerateAllCipherSuiteAlternatives

func GenerateAllCipherSuiteAlternatives() []string

func GenerateAllGetAlternatives

func GenerateAllGetAlternatives() []string

func GenerateAllHeaderAlternatives

func GenerateAllHeaderAlternatives() []string

func GenerateAllHostAlternatives

func GenerateAllHostAlternatives() []string

func GenerateAllHostNameAlternatives

func GenerateAllHostNameAlternatives() []string

func GenerateAllHostNamePaddings

func GenerateAllHostNamePaddings() []string

func GenerateAllHttpAlternatives

func GenerateAllHttpAlternatives() []string

func GenerateAllPathAlternatives

func GenerateAllPathAlternatives() []string

func GenerateAllServerNameAlternatives

func GenerateAllServerNameAlternatives() []string

func GenerateAllSubdomainsAlternatives

func GenerateAllSubdomainsAlternatives() []string

func GenerateAllSubstringPermutations

func GenerateAllSubstringPermutations(word string) []string

func GenerateAllTLDAlternatives

func GenerateAllTLDAlternatives() []string

func GenerateAllVersionAlternatives

func GenerateAllVersionAlternatives() []string

func GenerateAlternatives

func GenerateAlternatives(alternatives []string) string

func GenerateCertificate

func GenerateCertificate(commonname string) ([]byte, []byte, error)

func GenerateCertificateAlternatives

func GenerateCertificateAlternatives() string

func GenerateCipherSuiteAlternatives

func GenerateCipherSuiteAlternatives() string

func GenerateGetAlternatives

func GenerateGetAlternatives() string

func GenerateHeaderAlternatives

func GenerateHeaderAlternatives() string

func GenerateHostAlternatives

func GenerateHostAlternatives() string

func GenerateHostNameAlternatives

func GenerateHostNameAlternatives() string

func GenerateHostNameRandomPadding

func GenerateHostNameRandomPadding() string

func GenerateHttpAlternatives

func GenerateHttpAlternatives() string

func GeneratePathAlternatives

func GeneratePathAlternatives() string

func GenerateRandomCapitalizedValues

func GenerateRandomCapitalizedValues(word string) string

func GenerateRandomlyRemovedWord

func GenerateRandomlyRemovedWord(word string) string

func GenerateServerNameAlternatives

func GenerateServerNameAlternatives() string

func GenerateSubdomainsAlternatives

func GenerateSubdomainsAlternatives() string

func GenerateTLDAlternatives

func GenerateTLDAlternatives() string

func GenerateVersionAlternatives

func GenerateVersionAlternatives() string

func OpenFileforRead

func OpenFileforRead(path string) *os.File

func Repeat

func Repeat(s string, n int) string

func Reverse

func Reverse(s string) string

func SaveResults

func SaveResults(Results <-chan *Result, outfile string, done chan<- bool)

func Sleep

func Sleep(err interface{}) time.Duration

Types

type FuzzerInput

type FuzzerInput struct {
	FuzzerNumber int
	All          bool
}

func ParseFuzzerInfile

func ParseFuzzerInfile(path string) []*FuzzerInput

type Input

type Input struct {
	//Vantage Point IP
	VP *VantagePoint
	//Domain or Keyword to test for censorship
	Domain string
}

func ParseInfile

func ParseInfile(path string) []*Input

type Result

type Result struct {
	IP                    string      `json:"IP"`
	Domain                string      `json:"Domain"`
	TestName              string      `json:"TestName"`
	IsNormal              bool        `json:"IsNormal"`
	MatchesNormal         bool        `json:"MatchesNormal"`
	MatchesUncensored     bool        `json:"MatchesUncensored"`
	NormalDifferences     string      `json:"NormalDifferences"`
	UncensoredDifferences string      `json:"UncensoredDifferences"`
	Request               interface{} `json:"Request"`
	Response              interface{} `json:"Response"`
	Error                 interface{} `json:"Error"`
	UncensoredRequest     interface{} `json:"UncensoredRequest"`
	UncensoredResponse    interface{} `json:"UncensoredResponse"`
	UncensoredError       interface{} `json:"UncensoredError"`
	StartTime             time.Time   `json:"StartTime"`
	EndTime               time.Time   `json:"EndTime"`
}

type TLSdata

type TLSdata struct {
	Version                    uint16
	HandshakeComplete          bool
	CipherSuite                uint16
	NegotiatedProtocol         string
	NegotiatedProtocolIsMutual bool
	PeerCertificates           []byte
	ServerName                 string
	HTTPResponse               interface{}
}

type VantagePoint

type VantagePoint struct {
	IP string
	Mu sync.Mutex
}

Jump to

Keyboard shortcuts

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