mirror of
https://github.com/shadow1ng/fscan.git
synced 2025-07-13 21:02:44 +08:00
update
This commit is contained in:
parent
513bb93e1b
commit
d01df95dba
@ -66,6 +66,21 @@ func ParsePass(Info *HostInfo) {
|
||||
Passwords = PwdList
|
||||
}
|
||||
}
|
||||
if Hashfile != "" {
|
||||
hashs, err := Readfile(Hashfile)
|
||||
if err == nil {
|
||||
for _, line := range hashs {
|
||||
if line == "" {
|
||||
continue
|
||||
}
|
||||
if len(line) == 32 {
|
||||
Hashs = append(Hashs, line)
|
||||
} else {
|
||||
fmt.Println("[-] len(hash) != 32 " + line)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if URL != "" {
|
||||
urls := strings.Split(URL, ",")
|
||||
TmpUrls := make(map[string]struct{})
|
||||
@ -205,13 +220,19 @@ func ParseInput(Info *HostInfo) {
|
||||
fmt.Println("[-] Hash is error,len(hash) must be 32")
|
||||
os.Exit(0)
|
||||
} else {
|
||||
var err error
|
||||
HashBytes, err = hex.DecodeString(Hash)
|
||||
Hashs = append(Hashs, Hash)
|
||||
}
|
||||
Hashs = RemoveDuplicate(Hashs)
|
||||
for _, hash := range Hashs {
|
||||
hashbyte, err := hex.DecodeString(Hash)
|
||||
if err != nil {
|
||||
fmt.Println("[-] Hash is error,hex decode error")
|
||||
os.Exit(0)
|
||||
fmt.Println("[-] Hash is error,hex decode error ", hash)
|
||||
continue
|
||||
} else {
|
||||
HashBytes = append(HashBytes, hashbyte)
|
||||
}
|
||||
}
|
||||
Hashs = []string{}
|
||||
}
|
||||
|
||||
func ParseScantype(Info *HostInfo) {
|
||||
|
@ -103,6 +103,7 @@ var (
|
||||
RedisShell string
|
||||
Userfile string
|
||||
Passfile string
|
||||
Hashfile string
|
||||
HostFile string
|
||||
PortFile string
|
||||
PocPath string
|
||||
@ -120,7 +121,8 @@ var (
|
||||
LiveTop int
|
||||
Socks5Proxy string
|
||||
Hash string
|
||||
HashBytes []byte
|
||||
Hashs []string
|
||||
HashBytes [][]byte
|
||||
HostPort []string
|
||||
IsWmi bool
|
||||
Noredistest bool
|
||||
|
@ -38,6 +38,7 @@ func Flag(Info *HostInfo) {
|
||||
flag.StringVar(&HostFile, "hf", "", "host file, -hf ip.txt")
|
||||
flag.StringVar(&Userfile, "userf", "", "username file")
|
||||
flag.StringVar(&Passfile, "pwdf", "", "password file")
|
||||
flag.StringVar(&Hashfile, "hashf", "", "hash file")
|
||||
flag.StringVar(&PortFile, "portf", "", "Port File")
|
||||
flag.StringVar(&PocPath, "pocpath", "", "poc file path")
|
||||
flag.StringVar(&RedisFile, "rf", "", "redis file to write sshkey file (as: -rf id_rsa.pub)")
|
||||
|
Loading…
Reference in New Issue
Block a user