refactor: 规范化文件命名

This commit is contained in:
ZacharyZcR
2024-12-18 22:00:18 +08:00
parent ab14b15864
commit 5d9bcaaadc
42 changed files with 334 additions and 334 deletions
+5 -5
View File
@@ -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
}