1
0
mirror of https://github.com/sairson/Yasso.git synced 2026-10-31 20:54:54 +08:00

修复爆破是调用爆破call的bug,并完善空密码和空用户名抛出的panic

This commit is contained in:
sairson
2022-01-28 21:39:43 +08:00
parent c4994fb6e2
commit 6800b705cf
2 changed files with 9 additions and 5 deletions

View File

@@ -164,8 +164,12 @@ func burpTask(host, service string, users []string, pass []string, port int, thr
if strings.Contains(p, "{user}") {
p = strings.ReplaceAll(p, "{user}", p)
}
result := BurpCall(BurpModule, service, config.HostIn{Host: host, Port: port, TimeOut: time.Duration(timeout), Domain: Domain}, u, p)
burpStatus(result, service, host, Domain, u, p, jsonbool, out)
if u == "" || p == "" {
continue
} else {
result := BurpCall(BurpModule, service, config.HostIn{Host: host, Port: port, TimeOut: time.Duration(timeout), Domain: Domain}, u, p)
burpStatus(result, service, host, Domain, u, p, jsonbool, out)
}
}
}
wg.Done()
@@ -226,10 +230,10 @@ func ReadTextToDic(service, user, pass string) ([]string, []string) {
passdic = config.Passwords
)
// 入过不包含.txt的话,按照用户名和密码来算。其中
if !strings.Contains(user, ".txt") {
if user != "" && !strings.Contains(user, ".txt") {
userdic = strings.Split(user, ",")
}
if !strings.Contains(pass, ".txt") {
if pass != "" && !strings.Contains(pass, ".txt") {
passdic = strings.Split(pass, ",")
}

View File

@@ -48,7 +48,7 @@ func BruteSshByUser() {
}
if BruteFlag == true {
users, pass := ReadTextToDic("ssh", UserDic, PassDic)
fmt.Println(users, pass)
//fmt.Println(users, pass)
Println(Clearln + "[*] Brute Module [ssh]")
Println(fmt.Sprintf(Clearln+"[*] Have [user:%v] [pass:%v] [request:%v]", len(users), len(pass), len(users)*len(pass)*len(ips)))
SwitchBurp("ssh", users, pass, ips, BrutePort, Runtime, TimeDuration, "")