MCPcopy Index your code
hub / github.com/pingc0y/URLFinder / JsFuzz

Function JsFuzz

crawler/jsFuzz.go:11–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9)
10
11func JsFuzz() {
12
13 paths := []string{}
14 for i := range result.ResultJs {
15 re := regexp.MustCompile("(.+/)[^/]+.js").FindAllStringSubmatch(result.ResultJs[i].Url, -1)
16 if len(re) != 0 {
17 paths = append(paths, re[0][1])
18 }
19 re2 := regexp.MustCompile("(https{0,1}://([a-z0-9\\-]+\\.)*([a-z0-9\\-]+\\.[a-z0-9\\-]+)(:[0-9]+)?/)").FindAllStringSubmatch(result.ResultJs[i].Url, -1)
20 if len(re2) != 0 {
21 paths = append(paths, re2[0][1])
22 }
23 }
24 paths = util.UniqueArr(paths)
25 for i := range paths {
26 for i2 := range config.JsFuzzPath {
27 result.ResultJs = append(result.ResultJs, mode.Link{
28 Url: paths[i] + config.JsFuzzPath[i2],
29 Source: "Fuzz",
30 })
31 }
32 }
33}

Callers 2

ValidateFFFunction · 0.85
startFunction · 0.85

Calls 1

UniqueArrFunction · 0.92

Tested by

no test coverage detected