Skip to content

Commit 058e81b

Browse files
committed
fix 模版重复;增强文件泄露功能 2022-07-06 13:38:1657085934
1 parent b7d2bce commit 058e81b

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

.github/up.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cat ./go.mod|grep projectdiscovery|grep -E "subfinder|nuclei|wappalyzergo"|awk '{print $1}'|xargs -I % go get -u %
22

3-
myrsync ../nuclei-templates ./config
3+
myrsync ../nuclei-templates/ ./config/
44
go mod vendor
55

66

brute/filefuzz.go

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,19 @@ var bakSuffix string
3434
//go:embed dicts/fuzzContentType1.txt
3535
var fuzzct string
3636

37+
var ret = []string{}
38+
39+
func InitGeneral() int {
40+
prefix := []string{"index", "site", "db", "archive", "auth", "website", "backup", "test", "sql", "2016", "com", "dump", "master", "sales", "1", "2013", "members", "wwwroot", "clients", "back", "php", "localhost", "local", "127.0.0.1", "2019", "joomla", "wp", "html", "home", "tar", "vb", "database", "2012", "2020", "engine", "error_log", "mysql", "2018", "my", "new", "wordpress", "user", "2015", "customers", "dat", "media", "2014", "users", "2011", "2021", "old", "code", "jsp", "js", "store", "www", "2017", "web", "orders", "admin", "forum", "aspx", "data", "2010", "backups", "files", "bin"}
41+
suffix := []string{".zip", ".rar", ".tar.gz", ".tgz", ".tar.bz2", ".tar", ".jar", ".war", ".7z", ".bak", ".sql"}
42+
43+
for i := 0; i < len(prefix); i++ {
44+
for j := 0; j < len(suffix); j++ {
45+
ret = append(ret, "/"+prefix[i]+suffix[j])
46+
}
47+
}
48+
return len(ret)
49+
}
3750
func reqPage(u string) (*page, *pkg.Response, error) {
3851
page := &page{}
3952
var backUpSuffixList = strings.Split(strings.TrimSpace(bakSuffix), "\n")
@@ -54,6 +67,8 @@ func reqPage(u string) (*page, *pkg.Response, error) {
5467
page.title = gettitle(req.Body)
5568
page.locationUrl = req.Location
5669
regs := strings.Split(strings.TrimSpace(fuzzct), "\n")
70+
InitGeneral()
71+
regs = append(regs, ret...)
5772
for _, reg := range regs {
5873
matched, _ := regexp.Match(reg, []byte(req.Header.Get("Content-Type")))
5974
if matched {
@@ -137,8 +152,8 @@ func FileFuzz(u string, indexStatusCode int, indexContentLength int, indexbody s
137152
go func(payload string) {
138153
if url, req, err := reqPage(u + payload); err == nil {
139154
// 403 by pass
140-
if url.is403{
141-
a11:=ByPass403(&u,&payload)
155+
if url.is403 {
156+
a11 := ByPass403(&u, &payload)
142157
path = append(path, a11...)
143158
}
144159
if url.is403 && (pkg.SliceInString(url.title, page403title) || pkg.SliceInString(req.Body, page403Content)) && !skip403 {

0 commit comments

Comments
 (0)