mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-26 21:21:53 +08:00
增加爆破关闭参数 -nobr
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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")
|
||||||
|
|||||||
Reference in New Issue
Block a user