diff --git a/cmd/brute.go b/cmd/brute.go index e99bf0f..7f3326e 100644 --- a/cmd/brute.go +++ b/cmd/brute.go @@ -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, ",") } diff --git a/cmd/ssh.go b/cmd/ssh.go index 6b41ca9..d3f4761 100644 --- a/cmd/ssh.go +++ b/cmd/ssh.go @@ -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, "")