修改yaml解析模块,支持密码爆破,如tomcat弱口令。yaml中新增sets参数,类型为数组,用于存放密码,具体看tomcat-manager-week.yaml

This commit is contained in:
shadow1ng
2021-02-25 17:53:35 +08:00
parent db5023c4c4
commit 79ea046ed2
5 changed files with 581 additions and 60 deletions
+14 -1
View File
@@ -27,5 +27,18 @@ func ParsePort(ports string) []int {
scanPorts = append(scanPorts, i)
}
}
scanPorts = removeDuplicate(scanPorts)
return scanPorts
}
}
func removeDuplicate(old []int) []int {
result := make([]int, 0, len(old))
temp := map[int]struct{}{}
for _, item := range old {
if _, ok := temp[item]; !ok {
temp[item] = struct{}{}
result = append(result, item)
}
}
return result
}