1
0
mirror of https://github.com/sairson/Yasso.git synced 2026-11-27 06:31:40 +08:00

修复ftp在爆破时未授权跑完默认字典

This commit is contained in:
sairson
2022-01-15 21:36:54 +08:00
parent 14b6b133c8
commit c5cb8e898f
5 changed files with 25 additions and 1 deletions

View File

@@ -90,6 +90,14 @@ func allRun(hostString string, portString string, jsonbool bool, runtime int, no
switch p {
case 21:
users, pass := ReadTextToDic("ftp", UserDic, PassDic)
// add ftp "" pass
flag, _ := FtpConn(config.HostIn{Host: v.IP, Port: p, TimeOut: TimeDuration}, "anonymous", "")
if flag == true {
if flag == true && jsonbool == true {
one.WeakPass = append(one.WeakPass, map[string]map[string]string{"ftp": {"anonymous": "null"}})
}
continue
}
burpTask(v.IP, "ftp", users, pass, p, runtime, TimeDuration, "", false, jsonbool, &one)
case 22:
users, pass := ReadTextToDic("ssh", UserDic, PassDic)

View File

@@ -153,7 +153,6 @@ func burpTask(host, service string, users []string, pass []string, port int, thr
if service == "mongodb" && run == true {
BurpCall(BurpModule, "unmongodb", config.HostIn{Host: host, Port: BrutePort, TimeOut: TimeDuration}, "test", "test")
}
//Println()(all,num,t)
for i := 1; i <= t; i++ {
wg.Add(1)

View File

@@ -51,6 +51,9 @@ func FtpConn(info config.HostIn, user, pass string) (bool, error) {
if err == nil {
err = conn.Login(user, pass)
if err == nil {
if pass == "" {
Println(fmt.Sprintf("ftp %v unauthorized", fmt.Sprintf("%v:%v", info.Host, info.Port)))
}
flag = true
}
}