refactor: 重构涉及文件更新

This commit is contained in:
ZacharyZcR
2024-12-18 21:56:08 +08:00
parent cae98e7d90
commit ab14b15864
27 changed files with 260 additions and 235 deletions
+3 -2
View File
@@ -3,12 +3,13 @@ package Plugins
import (
"fmt"
"github.com/jlaffaye/ftp"
"github.com/shadow1ng/fscan/Config"
"github.com/shadow1ng/fscan/common"
"strings"
"time"
)
func FtpScan(info *common.HostInfo) (tmperr error) {
func FtpScan(info *Config.HostInfo) (tmperr error) {
if common.IsBrute {
return
}
@@ -47,7 +48,7 @@ func FtpScan(info *common.HostInfo) (tmperr error) {
return tmperr
}
func FtpConn(info *common.HostInfo, user string, pass string) (flag bool, err error) {
func FtpConn(info *Config.HostInfo, user string, pass string) (flag bool, err error) {
flag = false
Host, Port, Username, Password := info.Host, info.Ports, user, pass
conn, err := ftp.DialTimeout(fmt.Sprintf("%v:%v", Host, Port), time.Duration(common.Timeout)*time.Second)