This commit is contained in:
shadow1ng
2020-11-15 22:17:57 +08:00
parent 38fc6dd0c3
commit cdbd1aebc2
10 changed files with 101 additions and 19 deletions
+1 -1
View File
@@ -131,7 +131,7 @@ func MS17010Scan(info *common.HostInfo) {
}
} else {
result := fmt.Sprintf("%s\t \t(%s)\n", ip, os)
result := fmt.Sprintf("%s (%s)", ip, os)
common.LogSuccess(result)
}
+1 -4
View File
@@ -35,7 +35,7 @@ func IsContain(items []string, item string) bool {
}
func Scan(info *common.HostInfo) {
Hosts,_ := common.ParseIP(info.Host)
Hosts,_ := common.ParseIP(info.Host,info.HostFile)
if info.Isping == false{
Hosts = ICMPRun(Hosts)
}
@@ -72,9 +72,6 @@ func Scan(info *common.HostInfo) {
port,_:=common.PORTList[info.Scantype]
scantype = strconv.Itoa(port)
AddScan(scantype,info,ch,&wg)
//wg.Add(1)
//go scan_func(PluginList,scantype,info,ch,&wg)
//ch <- 1
}
}
wg.Wait()
-1
View File
@@ -15,7 +15,6 @@ Loop:
for _,user:=range common.Userdict["smb"]{
for _,pass:=range common.Passwords{
pass = strings.Replace(pass, "{user}", string(user), -1)
//fmt.Println(user,pass)
//flag,err := SmblConn(info,user,pass)
flag,err := doWithTimeOut(info,user,pass)
//fmt.Println(user,pass,flag,err)
+3 -3
View File
@@ -36,13 +36,13 @@ func geturl(info *common.HostInfo) (err error, result string) {
body, _ := ioutil.ReadAll(resp.Body)
re :=regexp.MustCompile("<title>(.*)</title>")
find := re.FindAllStringSubmatch(string(body),-1)
if len(find) > 1{
if len(find) > 0{
title = find[0][1]
}else {
title = "None"
}
if len(title) > 20{
title = title[:20]
if len(title) > 50{
title = title[:50]
}
if resp.StatusCode == 400 && string(url[5]) != "https"{
info.Url = strings.Replace(url, "http://", "https://", 1)