We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我的期望是匹配GET请求URI中的参数,并遍历每次删除一个后发起请求与原请求的响应比对,但是使用模版进行循环的时候导入xrayh会报错,看看谁能给我debug一下。
name: poc-yaml-FuzzDeleteParam manual: false transport: http set: inputPath: request.url.path inputQuery: request.url.query params: ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"] rules: r0: request: cache: true method: GET # 获取原始路径并删除所有参数 path: '{{inputPath}}' expression: "true" output: response: response.raw {{#params}} r{{@Index}}: request: cache: true method: GET # 逐个删除参数并比对返回包内容是否一致 path: '{{inputPath}}?{{inputQuery}}' | replace('(.)([?&]){{this}}=[^&](?:&|$)', '$1') | replace('&$', '') expression: "diff(r0.response, response.raw) == ''" output: diff: diff(r0.response, response.raw) {{/params}} expression: "{{#rules}} {{.}}() && {{/rules}} true"
The text was updated successfully, but these errors were encountered:
师傅可否给一个用代码块包裹的yaml内容,现在给出的信息无法分辨出yaml具体的缩进范围
Sorry, something went wrong.
No branches or pull requests
我的期望是匹配GET请求URI中的参数,并遍历每次删除一个后发起请求与原请求的响应比对,但是使用模版进行循环的时候导入xrayh会报错,看看谁能给我debug一下。
name: poc-yaml-FuzzDeleteParam
manual: false
transport: http
set:
inputPath: request.url.path
inputQuery: request.url.query
params: ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"]
rules:
r0:
request:
cache: true
method: GET
# 获取原始路径并删除所有参数
path: '{{inputPath}}'
expression: "true"
output:
response: response.raw
{{#params}}
r{{@Index}}:
request:
cache: true
method: GET
# 逐个删除参数并比对返回包内容是否一致
path: '{{inputPath}}?{{inputQuery}}' | replace('(.)([?&]){{this}}=[^&](?:&|$)', '$1') | replace('&$', '')
expression: "diff(r0.response, response.raw) == ''"
output:
diff: diff(r0.response, response.raw)
{{/params}}
expression: "{{#rules}} {{.}}() && {{/rules}} true"
The text was updated successfully, but these errors were encountered: