mirror of
https://github.com/shadow1ng/fscan.git
synced 2025-07-13 21:02:44 +08:00
加入手工gc回收,尝试节省无用内存。
-url 支持逗号隔开。 修复一个poc模块bug。
This commit is contained in:
parent
6e5642c508
commit
30df6b651f
@ -171,11 +171,6 @@ func exploit(address string, grooms int, payload []byte) error {
|
||||
|
||||
func makeKernelUserPayload(sc []byte) []byte {
|
||||
// test DoublePulsar
|
||||
// sc, err := ioutil.ReadFile("sc.bin")
|
||||
// if err != nil {
|
||||
// panic(err)
|
||||
// }
|
||||
// return sc
|
||||
buf := bytes.Buffer{}
|
||||
buf.Write(loader[:])
|
||||
// write sc size
|
||||
|
@ -72,16 +72,10 @@ func Scan(info common.HostInfo) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if common.URL != "" {
|
||||
info.Url = common.URL
|
||||
for _, url := range common.Urls {
|
||||
info.Url = url
|
||||
AddScan("1000003", info, ch, &wg)
|
||||
}
|
||||
if len(common.Urls) > 0 {
|
||||
for _, url := range common.Urls {
|
||||
info.Url = url
|
||||
AddScan("1000003", info, ch, &wg)
|
||||
}
|
||||
}
|
||||
wg.Wait()
|
||||
common.LogWG.Wait()
|
||||
close(common.Results)
|
||||
|
@ -132,7 +132,6 @@ func executePoc(oReq *http.Request, p *Poc) (bool, error, string) {
|
||||
//fmt.Println("[-] newRequest error: ",err)
|
||||
return false, err
|
||||
}
|
||||
newRequest.URL.Path = req.Url.Path
|
||||
newRequest.Header = oReq.Header.Clone()
|
||||
for k, v := range Headers {
|
||||
newRequest.Header.Set(k, v)
|
||||
|
@ -605,7 +605,7 @@ func DoRequest(req *http.Request, redirect bool) (*Response, error) {
|
||||
defer oResp.Body.Close()
|
||||
resp, err := ParseResponse(oResp)
|
||||
if err != nil {
|
||||
fmt.Println("[-]ParseResponse error: ", err)
|
||||
common.LogError("[-]ParseResponse error: " + err.Error())
|
||||
return nil, err
|
||||
}
|
||||
return resp, err
|
||||
|
@ -66,6 +66,18 @@ func ParsePass(Info *HostInfo) {
|
||||
Passwords = PwdList
|
||||
}
|
||||
}
|
||||
if URL != "" {
|
||||
urls := strings.Split(URL, ",")
|
||||
TmpUrls := make(map[string]struct{})
|
||||
for _, url := range urls {
|
||||
if _, ok := TmpUrls[url]; !ok {
|
||||
TmpUrls[url] = struct{}{}
|
||||
if url != "" {
|
||||
Urls = append(Urls, url)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if UrlFile != "" {
|
||||
urls, err := Readfile(UrlFile)
|
||||
if err == nil {
|
||||
|
@ -1,6 +1,6 @@
|
||||
package common
|
||||
|
||||
var version = "1.8.0"
|
||||
var version = "1.8.1"
|
||||
var Userdict = map[string][]string{
|
||||
"ftp": {"ftp", "admin", "www", "web", "root", "db", "wwwroot", "data"},
|
||||
"mysql": {"root", "mysql"},
|
||||
|
@ -4,6 +4,16 @@ import (
|
||||
"flag"
|
||||
)
|
||||
|
||||
func init() {
|
||||
go func() {
|
||||
for {
|
||||
runtime.GC()
|
||||
debug.FreeOSMemory()
|
||||
time.Sleep(10 * time.Second)
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
func Banner() {
|
||||
banner := `
|
||||
___ _
|
||||
|
Loading…
Reference in New Issue
Block a user