简体   繁体   English

在Mac上如何进行JMeter ip欺骗?

[英]How to do JMeter ip spoofing on Mac?

Just try to figure out how to do ip spoofing in JMeter on my mac. 只需尝试找出如何在Mac上的JMeter中进行ip欺骗即可。 What is done is that I created file which contains ip addresses somewhere in my subnetwork. 完成的是我创建了包含子网中某处IP地址的文件。 When I try to run thread JMeter shows me: 当我尝试运行线程时,JMeter向我展示了:

java.net.BindException: Can't assign requested address java.net.BindException:无法分配请求的地址

Only my IP has ping. 只有我的IP可以ping通。 So, could you please advice me where I am wrong? 所以,能不能请教我哪里错了?

You can add an IP alias from Terminal application (it is under Applications -> Utilities) as 您可以从“终端”应用程序(位于“应用程序”->“实用工具”下)中添加IP别名,如下所示:

sudo ifconfig en0 alias 192.168.0.12 255.255.255.0

where: 哪里:

  • en - is Network Interface name en是网络接口名称
  • 192.168.0.12 - is the IP alias 192.168.0.12是IP别名

MacOSX IP别名

Once you set up the alias, you can use new IP address in the "Source address" input 设置别名后,可以在“源地址”输入中使用新的IP地址。

JMeter源地址

And HTTP requests will use that IP address as source one: HTTP请求将使用该IP地址作为源一:

JMeter IP欺骗

You can remove the IP alias when it is no longer required as 您可以在不再需要IP别名时将其删除,因为

sudo ifconfig en0 -alias 192.168.0.12

See Using IP Spoofing to Simulate Requests from Different IP Addresses with JMeter guide for more detailed information on the domain. 有关该域的更多详细信息,请参见使用IP欺骗通过JMeter指南模拟来自不同IP地址的请求

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

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