mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-26 21:21:53 +08:00
refactor: 规范化文件命名
This commit is contained in:
@@ -6,7 +6,7 @@ import (
|
||||
"github.com/shadow1ng/fscan/Config"
|
||||
"time"
|
||||
|
||||
"github.com/shadow1ng/fscan/common"
|
||||
"github.com/shadow1ng/fscan/Common"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -96,7 +96,7 @@ const (
|
||||
)
|
||||
|
||||
func SmbGhost(info *Config.HostInfo) error {
|
||||
if common.IsBrute {
|
||||
if Common.IsBrute {
|
||||
return nil
|
||||
}
|
||||
err := SmbGhostScan(info)
|
||||
@@ -104,9 +104,9 @@ func SmbGhost(info *Config.HostInfo) error {
|
||||
}
|
||||
|
||||
func SmbGhostScan(info *Config.HostInfo) error {
|
||||
ip, port, timeout := info.Host, 445, time.Duration(common.Timeout)*time.Second
|
||||
ip, port, timeout := info.Host, 445, time.Duration(Common.Timeout)*time.Second
|
||||
addr := fmt.Sprintf("%s:%v", info.Host, port)
|
||||
conn, err := common.WrapperTcpWithTimeout("tcp", addr, timeout)
|
||||
conn, err := Common.WrapperTcpWithTimeout("tcp", addr, timeout)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -123,7 +123,7 @@ func SmbGhostScan(info *Config.HostInfo) error {
|
||||
}
|
||||
if bytes.Contains(buff[:n], []byte("Public")) == true && len(buff[:n]) >= 76 && bytes.Equal(buff[72:74], []byte{0x11, 0x03}) && bytes.Equal(buff[74:76], []byte{0x02, 0x00}) {
|
||||
result := fmt.Sprintf("[+] %v CVE-2020-0796 SmbGhost Vulnerable", ip)
|
||||
common.LogSuccess(result)
|
||||
Common.LogSuccess(result)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user