简体   繁体   English

如何在记录时跳过Apache Jmeter中CSRF感染的网页

[英]How to skip CSRF inmpemented webpages in apache jmeter while recording

I have implemented CSRF (corss site request forgery) in login page of my application. 我已经在我的应用程序的登录页面中实现了CSRF(对站点请求进行伪造)。 when i try to do load test using apache jmeter, i am getting (login time exceeded) error. 当我尝试使用apache jmeter进行负载测试时,出现了(超出登录时间)错误。 if i create custom debug.jar to remove csrf it is working fine. 如果我创建自定义debug.jar来删除csrf,它工作正常。 it is getting very tedious for each time to load the debug.jar while doing load test. 每次在进行负载测试时加载debug.jar变得非常繁琐。 I am new to jmeter can any one help me out with this. 我是jmeter的新手,任何人都可以帮我这个忙。

Thanks. 谢谢。

CSRF usually results in mandatory either header or cookie which needs to exist elsewise the request won't be served. CSRF通常会导致强制性的标头或cookie,否则该标头或cookie必须存在,否则将无法满足该请求。 CSRF token usually lives in every response so it's "classic" correlation example. CSRF令牌通常存在于每个响应中,因此它是“经典”关联示例。 So the flow should look as follows: 因此,流程应如下所示:

  1. GET first page 获取首页
  2. Extract CSRF token using one of the following: 使用以下方法之一提取CSRF令牌:
  3. GET next page 获取下一页
  4. Send CSRF header or cookie using 使用发送CSRF标头或cookie

These "managers" should be added as a child of "next" request. 这些“经理”应作为“下一个”请求的子项添加。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM