mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-25 12:41:53 +08:00
支持-u url或者-uf url.txt,进行url批量扫描
This commit is contained in:
+15
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user