mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-24 12:11:52 +08:00
合并dev。变动太大吗,又得重新优化输出,进度50%。rpc服务冲突,暂时删除
This commit is contained in:
+1
-1
@@ -224,6 +224,6 @@ func read(text []byte, host string) error {
|
||||
}
|
||||
}
|
||||
|
||||
Common.LogSuccess(output.String())
|
||||
Common.LogInfo(output.String())
|
||||
return nil
|
||||
}
|
||||
|
||||
+1
-1
@@ -267,7 +267,7 @@ func MS17010Scan(info *Common.HostInfo) error {
|
||||
defer MS17010EXP(info)
|
||||
}
|
||||
} else if os != "" {
|
||||
Common.LogInfo(fmt.Sprintf("系统信息 %s [%s]", ip, os))
|
||||
Common.LogBase(fmt.Sprintf("系统信息 %s [%s]", ip, os))
|
||||
|
||||
// 保存系统信息
|
||||
sysResult := &Common.ScanResult{
|
||||
|
||||
+1
-1
@@ -488,5 +488,5 @@ func logShareInfo(info *Common.HostInfo, user string, pass string, hash []byte,
|
||||
msg += fmt.Sprintf(" Pass:%s", pass)
|
||||
}
|
||||
msg += fmt.Sprintf(" 共享:%v", shares)
|
||||
Common.LogInfo(msg)
|
||||
Common.LogBase(msg)
|
||||
}
|
||||
|
||||
+6
-6
@@ -537,9 +537,9 @@ func (c *TelnetClient) Login() error {
|
||||
case UnauthorizedAccess:
|
||||
return nil
|
||||
case OnlyPassword:
|
||||
return c.loginForOnlyPassword()
|
||||
return c.LogBaserOnlyPassword()
|
||||
case UsernameAndPassword:
|
||||
return c.loginForUsernameAndPassword()
|
||||
return c.LogBaserUsernameAndPassword()
|
||||
default:
|
||||
return errors.New("unknown server type")
|
||||
}
|
||||
@@ -605,8 +605,8 @@ func isNoAuthRequired(line string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// loginForOnlyPassword 处理只需密码的登录
|
||||
func (c *TelnetClient) loginForOnlyPassword() error {
|
||||
// LogBaserOnlyPassword 处理只需密码的登录
|
||||
func (c *TelnetClient) LogBaserOnlyPassword() error {
|
||||
c.Clear() // 清空之前的响应
|
||||
|
||||
// 发送密码并等待响应
|
||||
@@ -625,8 +625,8 @@ func (c *TelnetClient) loginForOnlyPassword() error {
|
||||
return errors.New("login failed")
|
||||
}
|
||||
|
||||
// loginForUsernameAndPassword 处理需要用户名和密码的登录
|
||||
func (c *TelnetClient) loginForUsernameAndPassword() error {
|
||||
// LogBaserUsernameAndPassword 处理需要用户名和密码的登录
|
||||
func (c *TelnetClient) LogBaserUsernameAndPassword() error {
|
||||
// 发送用户名
|
||||
c.WriteContext(c.UserName)
|
||||
time.Sleep(time.Second * 2)
|
||||
|
||||
+2
-2
@@ -89,7 +89,7 @@ func WebTitle(info *Common.HostInfo) error {
|
||||
// 检查是否为打印机,避免意外打印
|
||||
for _, v := range info.Infostr {
|
||||
if v == printerFingerPrint {
|
||||
Common.LogInfo("检测到打印机,停止扫描")
|
||||
Common.LogBase("检测到打印机,停止扫描")
|
||||
return nil
|
||||
}
|
||||
}
|
||||
@@ -406,7 +406,7 @@ func saveWebResult(info *Common.HostInfo, resp *WebResponse) {
|
||||
logMsg += fmt.Sprintf(" 指纹:%v", fingerprints)
|
||||
}
|
||||
|
||||
Common.LogSuccess(logMsg)
|
||||
Common.LogInfo(logMsg)
|
||||
}
|
||||
|
||||
// 检测目标主机的协议类型(HTTP/HTTPS)
|
||||
|
||||
Reference in New Issue
Block a user