xray
xray copied to clipboard
POC编写报错问题
我的期望是匹配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"
师傅可否给一个用代码块包裹的yaml内容,现在给出的信息无法分辨出yaml具体的缩进范围