2020-04-10 08:39:48 +00:00
|
|
|
package hunter
|
|
|
|
|
|
|
|
import (
|
2020-04-17 05:15:23 +00:00
|
|
|
gcurl "github.com/474420502/gcurl"
|
2020-04-10 08:39:48 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// PreCurlUrl Task的 curl bash 预处理组件
|
|
|
|
type PreCurlUrl string
|
|
|
|
|
|
|
|
func (h PreCurlUrl) Before(ctx *TaskContext) {
|
|
|
|
gurl := gcurl.ParseRawCURL(string(h))
|
|
|
|
ctx.GetHunter().SetSession(gurl.CreateSession())
|
|
|
|
ctx.SetWorkflow(gurl.CreateWorkflow(ctx.Session()))
|
|
|
|
}
|