增加爆破关闭参数 -nobr

This commit is contained in:
影舞者
2021-11-25 10:16:39 +08:00
parent dd00ec7bac
commit e49e6dd433
8 changed files with 29 additions and 9 deletions
+3
View File
@@ -9,6 +9,9 @@ import (
) )
func FtpScan(info *common.HostInfo) (tmperr error) { func FtpScan(info *common.HostInfo) (tmperr error) {
if common.IsBrute {
return
}
starttime := time.Now().Unix() starttime := time.Now().Unix()
flag, err := FtpConn(info, "anonymous", "") flag, err := FtpConn(info, "anonymous", "")
if flag == true && err == nil { if flag == true && err == nil {
+3
View File
@@ -10,6 +10,9 @@ import (
) )
func MssqlScan(info *common.HostInfo) (tmperr error) { func MssqlScan(info *common.HostInfo) (tmperr error) {
if common.IsBrute {
return
}
starttime := time.Now().Unix() starttime := time.Now().Unix()
for _, user := range common.Userdict["mssql"] { for _, user := range common.Userdict["mssql"] {
for _, pass := range common.Passwords { for _, pass := range common.Passwords {
+3
View File
@@ -10,6 +10,9 @@ import (
) )
func MysqlScan(info *common.HostInfo) (tmperr error) { func MysqlScan(info *common.HostInfo) (tmperr error) {
if common.IsBrute {
return
}
starttime := time.Now().Unix() starttime := time.Now().Unix()
for _, user := range common.Userdict["mysql"] { for _, user := range common.Userdict["mysql"] {
for _, pass := range common.Passwords { for _, pass := range common.Passwords {
+3
View File
@@ -10,6 +10,9 @@ import (
) )
func PostgresScan(info *common.HostInfo) (tmperr error) { func PostgresScan(info *common.HostInfo) (tmperr error) {
if common.IsBrute {
return
}
starttime := time.Now().Unix() starttime := time.Now().Unix()
for _, user := range common.Userdict["postgresql"] { for _, user := range common.Userdict["postgresql"] {
for _, pass := range common.Passwords { for _, pass := range common.Passwords {
+3
View File
@@ -21,6 +21,9 @@ func RedisScan(info *common.HostInfo) (tmperr error) {
if flag == true && err == nil { if flag == true && err == nil {
return err return err
} }
if common.IsBrute {
return
}
for _, pass := range common.Passwords { for _, pass := range common.Passwords {
pass = strings.Replace(pass, "{user}", "redis", -1) pass = strings.Replace(pass, "{user}", "redis", -1)
flag, err := RedisConn(info, pass) flag, err := RedisConn(info, pass)
+3
View File
@@ -12,6 +12,9 @@ import (
) )
func SshScan(info *common.HostInfo) (tmperr error) { func SshScan(info *common.HostInfo) (tmperr error) {
if common.IsBrute {
return
}
starttime := time.Now().Unix() starttime := time.Now().Unix()
for _, user := range common.Userdict["ssh"] { for _, user := range common.Userdict["ssh"] {
for _, pass := range common.Passwords { for _, pass := range common.Passwords {
+1
View File
@@ -80,6 +80,7 @@ var (
Ping bool Ping bool
Pocinfo PocInfo Pocinfo PocInfo
IsWebCan bool IsWebCan bool
IsBrute bool
RedisFile string RedisFile string
RedisShell string RedisShell string
Userfile string Userfile string
+1
View File
@@ -37,6 +37,7 @@ func Flag(Info *HostInfo) {
flag.StringVar(&RedisFile, "rf", "", "redis file to write sshkey file (as: -rf id_rsa.pub) ") flag.StringVar(&RedisFile, "rf", "", "redis file to write sshkey file (as: -rf id_rsa.pub) ")
flag.StringVar(&RedisShell, "rs", "", "redis shell to write cron file (as: -rs 192.168.1.1:6666) ") flag.StringVar(&RedisShell, "rs", "", "redis shell to write cron file (as: -rs 192.168.1.1:6666) ")
flag.BoolVar(&IsWebCan, "nopoc", false, "not to scan web vul") flag.BoolVar(&IsWebCan, "nopoc", false, "not to scan web vul")
flag.BoolVar(&IsBrute, "nobr", false, "not to Brute password")
flag.BoolVar(&IsPing, "np", false, "not to ping") flag.BoolVar(&IsPing, "np", false, "not to ping")
flag.BoolVar(&Ping, "ping", false, "using ping replace icmp") flag.BoolVar(&Ping, "ping", false, "using ping replace icmp")
flag.StringVar(&TmpOutputfile, "o", "result.txt", "Outputfile") flag.StringVar(&TmpOutputfile, "o", "result.txt", "Outputfile")