支持-u url或者-uf url.txt,进行url批量扫描

This commit is contained in:
shadow1ng
2021-03-04 14:42:10 +08:00
parent 423c0bebea
commit 5e7def5085
16 changed files with 65 additions and 26 deletions
+15 -2
View File
@@ -63,7 +63,20 @@ func ParsePass(Info *HostInfo) {
}
}
Passwords = Info.Passwords
}
}
if UrlFile != "" {
urls, err := Readfile(UrlFile)
if err == nil {
TmpUrls := make(map[string]struct{})
for _, url := range urls {
if _, ok := TmpUrls[url]; !ok {
TmpUrls[url] = struct{}{}
if url != "" {
Urls = append(Urls, url)
}
}
}
}
}
}
@@ -88,7 +101,7 @@ func Readfile(filename string) ([]string, error) {
}
func ParseInput(Info *HostInfo) {
if Info.Host == "" && HostFile == "" {
if Info.Host == "" && HostFile == "" && URL == "" && UrlFile == "" {
fmt.Println("Host is none")
flag.Usage()
os.Exit(0)