mirror of
https://github.com/shadow1ng/fscan.git
synced 2025-07-13 21:02:44 +08:00
减少pocinfo结构体大小
This commit is contained in:
parent
b9b5eb9ce4
commit
f2239b6c9f
@ -105,7 +105,7 @@ func geturl(info *common.HostInfo, flag int, CheckData []WebScan.CheckDatas) (er
|
|||||||
req.Header.Set("User-agent", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36")
|
req.Header.Set("User-agent", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36")
|
||||||
req.Header.Set("Accept", "*/*")
|
req.Header.Set("Accept", "*/*")
|
||||||
req.Header.Set("Accept-Language", "zh-CN,zh;q=0.9")
|
req.Header.Set("Accept-Language", "zh-CN,zh;q=0.9")
|
||||||
req.Header.Set("Cookie", common.Pocinfo.Cookie)
|
req.Header.Set("Cookie", common.Cookie)
|
||||||
//if common.Pocinfo.Cookie != "" {
|
//if common.Pocinfo.Cookie != "" {
|
||||||
// req.Header.Set("Cookie", "rememberMe=1;"+common.Pocinfo.Cookie)
|
// req.Header.Set("Cookie", "rememberMe=1;"+common.Pocinfo.Cookie)
|
||||||
//} else {
|
//} else {
|
||||||
|
@ -41,11 +41,11 @@ func Execute(PocInfo common.PocInfo) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
req.Header.Set("User-agent", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36")
|
req.Header.Set("User-agent", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36")
|
||||||
if PocInfo.Cookie != "" {
|
if common.Cookie != "" {
|
||||||
req.Header.Set("Cookie", PocInfo.Cookie)
|
req.Header.Set("Cookie", common.Cookie)
|
||||||
}
|
}
|
||||||
pocs := filterPoc(PocInfo.PocName)
|
pocs := filterPoc(PocInfo.PocName)
|
||||||
lib.CheckMultiPoc(req, pocs, PocInfo.Num)
|
lib.CheckMultiPoc(req, pocs, common.PocNum)
|
||||||
}
|
}
|
||||||
|
|
||||||
func initpoc() {
|
func initpoc() {
|
||||||
|
@ -23,7 +23,7 @@ var (
|
|||||||
|
|
||||||
func Inithttp(PocInfo common.PocInfo) {
|
func Inithttp(PocInfo common.PocInfo) {
|
||||||
//PocInfo.Proxy = "http://127.0.0.1:8080"
|
//PocInfo.Proxy = "http://127.0.0.1:8080"
|
||||||
err := InitHttpClient(PocInfo.Num, common.Proxy, time.Duration(common.WebTimeout)*time.Second)
|
err := InitHttpClient(common.PocNum, common.Proxy, time.Duration(common.WebTimeout)*time.Second)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
@ -52,17 +52,8 @@ type HostInfo struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type PocInfo struct {
|
type PocInfo struct {
|
||||||
Num int
|
Target string
|
||||||
Rate int
|
PocName string
|
||||||
PocName string
|
|
||||||
PocDir string
|
|
||||||
Target string
|
|
||||||
TargetFile string
|
|
||||||
RawFile string
|
|
||||||
Cookie string
|
|
||||||
ForceSSL bool
|
|
||||||
ApiKey string
|
|
||||||
CeyeDomain string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -103,5 +94,12 @@ var (
|
|||||||
BruteThread int
|
BruteThread int
|
||||||
LiveTop int
|
LiveTop int
|
||||||
Socks5Proxy string
|
Socks5Proxy string
|
||||||
PocFull bool
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
PocNum int
|
||||||
|
PocFull bool
|
||||||
|
CeyeDomain string
|
||||||
|
ApiKey string
|
||||||
|
Cookie string
|
||||||
)
|
)
|
||||||
|
@ -57,9 +57,9 @@ func Flag(Info *HostInfo) {
|
|||||||
flag.StringVar(&Pocinfo.PocName, "pocname", "", "use the pocs these contain pocname, -pocname weblogic")
|
flag.StringVar(&Pocinfo.PocName, "pocname", "", "use the pocs these contain pocname, -pocname weblogic")
|
||||||
flag.StringVar(&Proxy, "proxy", "", "set poc proxy, -proxy http://127.0.0.1:8080")
|
flag.StringVar(&Proxy, "proxy", "", "set poc proxy, -proxy http://127.0.0.1:8080")
|
||||||
flag.StringVar(&Socks5Proxy, "socks5", "", "set socks5 proxy, will be used in tcp connection, timeout setting will not work")
|
flag.StringVar(&Socks5Proxy, "socks5", "", "set socks5 proxy, will be used in tcp connection, timeout setting will not work")
|
||||||
flag.StringVar(&Pocinfo.Cookie, "cookie", "", "set poc cookie,-cookie rememberMe=login")
|
flag.StringVar(&Cookie, "cookie", "", "set poc cookie,-cookie rememberMe=login")
|
||||||
flag.Int64Var(&WebTimeout, "wt", 5, "Set web timeout")
|
flag.Int64Var(&WebTimeout, "wt", 5, "Set web timeout")
|
||||||
flag.IntVar(&Pocinfo.Num, "num", 20, "poc rate")
|
flag.IntVar(&PocNum, "num", 20, "poc rate")
|
||||||
flag.StringVar(&SC, "sc", "", "ms17 shellcode,as -sc add")
|
flag.StringVar(&SC, "sc", "", "ms17 shellcode,as -sc add")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user