Skip to content

Commit

Permalink
v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardottt committed May 12, 2024
1 parent 50452c7 commit c543b48
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions pkg/csprecon/csp.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,26 +60,6 @@ func CheckCSP(url, ua string, rCSP *regexp.Regexp, client *http.Client) ([]strin
func ParseCSP(input string, r *regexp.Regexp) []string {
result := []string{}

/*
splitted := strings.Split(input, ";")
for _, elem := range splitted {
spaceSplit := strings.Split(elem, " ")
for _, spaceElem := range spaceSplit {
if r.Match([]byte(spaceElem)) {
if strings.Contains(spaceElem, "://") {
spaceElem, err = golazy.GetHost(spaceElem)
if err != nil {
continue
}
}
result = append(result, spaceElem)
}
}
}
*/

matches := r.FindAllStringSubmatch(input, -1)
for _, match := range matches {
result = append(result, match...)
Expand Down

0 comments on commit c543b48

Please sign in to comment.