修改icmp发包模式,更适合大规模探测。

修改报错提示,--debug时,如果10秒内没有LogSuccess的消息,每隔10秒就会打印一下当前进度
This commit is contained in:
shadow1ng
2021-02-05 14:43:07 +08:00
parent d468986428
commit 1a8964cc6e
15 changed files with 149 additions and 121 deletions
+10 -9
View File
@@ -28,8 +28,8 @@ func ParseUser(Info *HostInfo) {
Userdict[name] = Info.Usernames
}
}
if Info.Userfile != "" {
uesrs, err := Readfile(Info.Userfile)
if Userfile != "" {
uesrs, err := Readfile(Userfile)
if err == nil {
for _, uesr := range uesrs {
if uesr != "" {
@@ -54,8 +54,8 @@ func ParsePass(Info *HostInfo) {
}
Passwords = Info.Passwords
}
if Info.Passfile != "" {
passs, err := Readfile(Info.Passfile)
if Passfile != "" {
passs, err := Readfile(Passfile)
if err == nil {
for _, pass := range passs {
if pass != "" {
@@ -88,19 +88,20 @@ func Readfile(filename string) ([]string, error) {
}
func ParseInput(Info *HostInfo) {
if Info.Host == "" && Info.HostFile == "" {
if Info.Host == "" && HostFile == "" {
fmt.Println("Host is none")
flag.Usage()
os.Exit(0)
}
if Info.Outputfile != "" {
//LogErr = Info.Debug
if TmpOutputfile != "" {
if !strings.Contains(Outputfile, "/") && !strings.Contains(Outputfile, `\`) {
Outputfile = getpath() + Info.Outputfile
Outputfile = getpath() + TmpOutputfile
} else {
Outputfile = Info.Outputfile
Outputfile = TmpOutputfile
}
}
if Info.IsSave == true {
if TmpSave == true {
IsSave = false
}
}