Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新增SetURL接口 #145

Closed
guonaihong opened this issue Dec 23, 2019 · 0 comments
Closed

新增SetURL接口 #145

guonaihong opened this issue Dec 23, 2019 · 0 comments

Comments

@guonaihong
Copy link
Owner

guonaihong commented Dec 23, 2019

出发点

#139 里面打算支持裸http数据的导入和发送。对于抓包这种情况,数据可能是不变的,但是URL可能是常变的,那修改URL就是一个很必要的功能。伪代码如下

s := `
GET / HTTP/1.1
Host: www.baidu.com
Authorization: Basic cmw6
User-Agent: curl/7.58.0
Accept: */*
Content-Length: 235
Content-Type: multipart/form-data; boundary=------------------------477bd959b7aecd68

--------------------------477bd959b7aecd68
Content-Disposition: form-data; name="text"

a
--------------------------477bd959b7aecd68
Content-Disposition: form-data; name="voice"

b
--------------------------477bd959b7aecd68--
`

err := gout.NewImport().RawText(s).SetURL("www.qq.com").Do()
if err != nil {
}

需要考虑的点

通过函数解析出裸http请求得到http.Request 结构体。如何设置到DataFlow结构体中?
想要的效果,使用DataFlow 中有值的request替换 解析出来的http.Request结构体。

This was referenced Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant