Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cyinnove/corser
/ functions
Functions
51 in github.com/cyinnove/corser
⨍
Functions
51
◇
Types & classes
9
↓ 15 callers
Function
NetParser
NetParser parses the given URL and returns a Host object containing the subdomain, domain, and top-level domain. If an error occurs during parsing, it
pkg/corser/tester.go:13
↓ 4 callers
Method
Scan
Scan performs the scanning operation on the provided URL. It sends a preflight request and checks for any errors. If there is an error, it returns a R
pkg/corser/corser.go:106
↓ 3 callers
Function
ParseHeader
(header string)
pkg/utils/http.go:10
↓ 2 callers
Function
CookiesToString
CookiesToString formats the cookies from an HTTP request into a detailed string
pkg/utils/http.go:31
↓ 2 callers
Function
NewScanner
NewScanner creates a new instance of the Scanner struct. It initializes the HTTP client with the provided parameters and returns a pointer to the Scan
pkg/corser/corser.go:64
↓ 2 callers
Function
ParseHeaders
(methods string)
pkg/utils/http.go:25
↓ 2 callers
Function
ParseMethods
(methods string)
pkg/utils/http.go:21
↓ 2 callers
Method
Prefix
Prefix adds a prefix to the payloads based on the scanner's origin and host information.
pkg/corser/tester.go:61
↓ 2 callers
Method
Suffix
Suffix appends a payload to the Scanner's Payloads slice. It constructs a payload URL using the origin, domain, and TLD of the Scanner's Host, and app
pkg/corser/tester.go:89
↓ 2 callers
Method
Wildcard
Wildcard generates a wildcard payload based on the scanner's origin and host. It appends the generated payload to the scanner's list of payloads.
pkg/corser/tester.go:75
↓ 2 callers
Function
runScan
(options *config.Options)
cmd/corser/scan.go:11
↓ 1 callers
Function
ElementExists
(slice []string, element string)
pkg/utils/utils.go:7
↓ 1 callers
Function
GeneratePoC
GeneratePoC generates an HTML page as a string that acts as a PoC for CORS misconfigurations. GeneratePoC generates a Proof of Concept (PoC) based on
pkg/pocgen/pocgen.go:24
↓ 1 callers
Method
JoinTwoice
JoinTwoice joins the origin, host domain, and host TLD to create a payload URL. It appends the payload URL to the list of payloads in the Scanner.
pkg/corser/tester.go:45
↓ 1 callers
Function
NewRunner
NewRunner creates a new Runner instance capable of scanning multiple URLs with custom settings.
pkg/runner/runner.go:59
↓ 1 callers
Method
Null
Null appends the string "null" to the list of payloads in the Scanner.
pkg/corser/tester.go:101
↓ 1 callers
Function
OutputJSONFile
(filename string, data string)
pkg/utils/files.go:45
↓ 1 callers
Function
ReadFileLines
(fileName string)
pkg/utils/files.go:18
↓ 1 callers
Function
ReadURLsFromStdin
()
pkg/utils/files.go:59
↓ 1 callers
Function
RemoveANSICodes
(input string)
pkg/utils/utils.go:16
↓ 1 callers
Method
RequestCheck
RequestCheck performs a series of checks on the Scanner instance. It sets the Host field by parsing the URL, applies various checks such as anyOrigin,
pkg/corser/corser.go:160
↓ 1 callers
Function
SavePoCToFile
SavePoCToFile saves the generated PoC HTML to a specified file. SavePoCToFile saves the generated Proof of Concept (PoC) HTML content to a file. It ta
pkg/pocgen/pocgen.go:51
↓ 1 callers
Method
SpecialChars
SpecialChars generates payloads by appending special characters to the host URL. It removes some special characters if they will result in the same pa
pkg/corser/tester.go:115
↓ 1 callers
Method
Start
Start begins the scanning process for all provided URLs with the specified origin and headers.
pkg/runner/runner.go:79
↓ 1 callers
Function
StartProxyServer
(options config.ProxyOptions)
pkg/runner/runner.go:148
↓ 1 callers
Method
UserAtDomain
UserAtDomain appends a payload to the Scanner's Payloads slice in the format "https://<username>@<domain>".
pkg/corser/tester.go:107
↓ 1 callers
Method
anyOrigin
anyOrigin appends a payload to the Scanner's Payloads slice.
pkg/corser/tester.go:56
↓ 1 callers
Function
banner
()
cmd/corser/root.go:41
↓ 1 callers
Function
checkNullOriginAllowed
(acao string)
pkg/corser/corser.go:351
↓ 1 callers
Function
checkOriginReflected
checkOriginReflected checks if the ACAO (Access-Control-Allow-Origin) header reflects the Origin or if the ACAC (Access-Control-Allow-Credentials) hea
pkg/corser/corser.go:281
↓ 1 callers
Function
checkWildCard
checkWildCard checks if the given ACAO (Access-Control-Allow-Origin) header value is a wildcard. It returns a boolean indicating whether the ACAO head
pkg/corser/corser.go:301
↓ 1 callers
Function
createMultiCmd
(options *config.Options)
cmd/corser/multi.go:13
↓ 1 callers
Function
createProxyCmd
(options *config.ProxyOptions)
cmd/corser/proxy.go:9
↓ 1 callers
Function
createSingleCmd
(options *config.Options)
cmd/corser/single.go:11
↓ 1 callers
Function
deduplicateDetails
deduplicateDetails removes duplicate details from the given Result object. It modifies the Details field of the Result object in-place. The function u
pkg/corser/corser.go:141
↓ 1 callers
Function
evaluateResponse
evaluateResponse evaluates the response for potential security vulnerabilities. It takes in the payload, Access-Control-Allow-Origin (ACAO), and Acces
pkg/corser/corser.go:259
↓ 1 callers
Method
parseResultToJSON
()
pkg/runner/runner.go:44
↓ 1 callers
Method
performRequest
performRequest sends an HTTP request to the specified URL using the provided payload. It sets the necessary headers and handles any errors that occur
pkg/corser/corser.go:196
↓ 1 callers
Method
preflightRequest
preflightRequestCheck performs a preflight request to see how it's handled.
pkg/corser/corser.go:312
Method
PortManipulation
PortManipulation adds different ports to test origin handling PortManipulation generates payload URLs by appending different ports to the origin URL.
pkg/corser/tester.go:131
Method
SubdomainFlipping
SubdomainFlipping switches subdomain positions SubdomainFlipping generates payloads by flipping the subdomain of the origin URL. It appends the flippe
pkg/corser/tester.go:147
Function
TestCookiesToString
(t *testing.T)
test/utils_test.go:52
Function
TestElementExists
(t *testing.T)
test/utils_test.go:79
Function
TestParseHeader
(t *testing.T)
test/utils_test.go:12
Function
TestParseHeaders
(t *testing.T)
test/utils_test.go:45
Function
TestParseMethods
(t *testing.T)
test/utils_test.go:38
Function
Test_NetParser
(t *testing.T)
test/corser_test.go:73
Function
Test_Prefix
(t *testing.T)
test/corser_test.go:31
Function
Test_Suffix
(t *testing.T)
test/corser_test.go:10
Function
Test_Wildcard
(t *testing.T)
test/corser_test.go:51
Function
main
()
cmd/corser/root.go:11