mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-26 05:01:53 +08:00
fix: 修复 POC Cookie/变量提取的两个问题
- poc_adapter: xray/afrog 的 output.search 转换为 Search 字段,多步POC变量传递不再丢失 - poc_executor: Set-Cookie 提取优化不再要求捕获组名含 cookie,sessid/token等命名均生效
This commit is contained in:
@@ -399,6 +399,11 @@ func (x *XrayPocAdapter) ToFscanPoc() (*Poc, error) {
|
||||
Expression: rule.Expression,
|
||||
}
|
||||
|
||||
// 转换 output 字段为 Search — 多步POC中从响应提取变量供后续步骤使用
|
||||
if searchVal, ok := rule.Output["search"]; ok {
|
||||
fscanRule.Search = fmt.Sprintf("%v", searchVal)
|
||||
}
|
||||
|
||||
// 如果expression为空,默认检查200状态码
|
||||
if fscanRule.Expression == "" {
|
||||
fscanRule.Expression = "response.status == 200"
|
||||
@@ -500,6 +505,11 @@ func (a *AfrogPocAdapter) ToFscanPoc() (*Poc, error) {
|
||||
Expression: rule.Expression,
|
||||
}
|
||||
|
||||
// 转换 output 字段为 Search — 多步POC中从响应提取变量供后续步骤使用
|
||||
if searchVal, ok := rule.Output["search"]; ok {
|
||||
fscanRule.Search = fmt.Sprintf("%v", searchVal)
|
||||
}
|
||||
|
||||
// 如果expression为空,默认检查200状态码
|
||||
if fscanRule.Expression == "" {
|
||||
fscanRule.Expression = "response.status == 200"
|
||||
|
||||
Reference in New Issue
Block a user