Skip to content

Commit aaf4b50

Browse files
committed
x 2022-10-06
1 parent 7740374 commit aaf4b50

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

brute/filefuzz.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ func FileFuzz(u string, indexStatusCode int, indexContentLength int, indexbody s
237237
}
238238
}()
239239
log.Printf("wait for file fuzz(dicts:%d) %s \r", len(filedic), u)
240+
var lst200 *util.Response
240241
for _, payload := range filedic {
241242
// 接收到停止信号
242243
if atomic.LoadInt32(&errorTimes) >= MaxErrorTimes {
@@ -279,9 +280,14 @@ func FileFuzz(u string, indexStatusCode int, indexContentLength int, indexbody s
279280
client.ErrLimit = 999999
280281
}
281282
if fuzzPage, req, err := reqPage(szUrl); err == nil && nil != req && 0 < len(req.Body) {
282-
//if 200 == req.StatusCode {
283-
//log.Printf("%d : %s \n", req.StatusCode, szUrl)
284-
//}
283+
if 200 == req.StatusCode {
284+
if nil == lst200 {
285+
lst200 = req
286+
} else if lst200.Body == req.Body { // 无意义的 200
287+
continue
288+
}
289+
//log.Printf("%d : %s \n", req.StatusCode, szUrl)
290+
}
285291
go util.CheckHeader(req.Header, u)
286292
// 02-状态码和req1相同,且与req1相似度>9.5,关闭所有fuzz
287293
fXsd := strsim.Compare(url404req.Body, req.Body)

main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"log"
99
"net/http"
1010
_ "net/http/pprof"
11-
"os"
1211
"runtime"
1312
"runtime/debug"
1413
)
@@ -23,7 +22,7 @@ var Version string
2322

2423
func main() {
2524
//os.Args = []string{"", "-host", "http://192.168.0.109", "-v"}
26-
os.Args = []string{"", "-host", "http://127.0.0.1", "-v"}
25+
//os.Args = []string{"", "-host", "http://127.0.0.1", "-v"}
2726
runtime.GOMAXPROCS(runtime.NumCPU())
2827
util.DoInit(&config)
2928
// set version

0 commit comments

Comments
 (0)