|
我是新手,公司开发的项目是突防侦查工具,也就是某用户访问过境外非法网站,在
服务器端可以记录下该用户的IP.
我们的测试策略是在客户端虚拟多个IP去访问这个非法网站,然后测试服务器端产品的性能指标.
这个非法网站有一个.exe的程序,打开后弹出一个境外非法言论的网站.
在录制脚本时我选了winsocket协议,回放时就会报9017的错误,我觉得是非法网站
使用代理服务器,无法捕捉到固定的IP和端口号,所以连接超时,动态关联又不是很
熟,而且在winsocket协议下无法设置自动关联,ctrl+F8都呈不可用状态.请高手指点.
脚本如下
Action()
{
lrs_create_socket("socket0", "TCP", "RemoteHost=125-230-242-229.dynamic.hinet.net:443", LrsLastArg);
lrs_create_socket("socket1", "TCP", "RemoteHost=122-120-193-158.dynamic.hinet.net:443", LrsLastArg);
lrs_send("socket0", "buf0", LrsLastArg);
lrs_receive("socket0", "buf1", LrsLastArg);
lrs_close_socket("socket0");
lrs_create_socket("socket2", "TCP", "RemoteHost=218-174-37-233.dynamic.hinet.net:443", LrsLastArg);
lrs_create_socket("socket3", "TCP", "RemoteHost=122-127-64-235.dynamic.hinet.net:443", LrsLastArg);
lrs_create_socket("socket4", "TCP", "RemoteHost=118-160-33-234.dynamic.hinet.net:443", LrsLastArg);
lrs_create_socket("socket5", "TCP", "RemoteHost=65.49.2.221:443", LrsLastArg);
lrs_create_socket("socket6", "TCP", "RemoteHost=218-167-162-235.dynamic.hinet.net:443", LrsLastArg);
lrs_create_socket("socket7", "TCP", "RemoteHost=125-230-242-229.dynamic.hinet.net:443", LrsLastArg);
lrs_send("socket7", "buf2", LrsLastArg);
lrs_receive("socket7", "buf3", LrsLastArg);
lrs_receive("socket7", "buf4", LrsLastArg);
lrs_create_socket("socket8", "TCP", "RemoteHost=bas1-toronto61-1279436292.dsl.bell.ca:443", LrsLastArg);
lrs_create_socket("socket9", "TCP", "RemoteHost=118-160-44-202.dynamic.hinet.net:443", LrsLastArg);
lrs_create_socket("socket10", "TCP", "RemoteHost=61-62-56-24-adsl-tan.dynamic.so-net.net.tw:443", LrsLastArg);
lrs_create_socket("socket11", "TCP", "RemoteHost=114-40-163-226.dynamic.hinet.net:443", LrsLastArg);
lrs_create_socket("socket12", "TCP", "RemoteHost=vh10234.v1.moc.gbahn.net:443", LrsLastArg);
lrs_close_socket("socket1");
lrs_send("socket8", "buf5", LrsLastArg);
lrs_create_socket("socket13", "TCP", "RemoteHost=59-115-154-137.dynamic.hinet.net:443", LrsLastArg);
lrs_send("socket8", "buf6", LrsLastArg);
lrs_create_socket("socket14", "TCP", "RemoteHost=59-115-200-243.dynamic.hinet.net:443", LrsLastArg);
lrs_create_socket("socket15", "TCP", "RemoteHost=71-133-209-20.ded.pacbell.net:443", LrsLastArg);
lrs_receive("socket8", "buf7", LrsLastArg);
lrs_close_socket("socket8");
lrs_send("socket15", "buf8", LrsLastArg);
lrs_close_socket("socket2");
lrs_close_socket("socket3");
lrs_close_socket("socket4");
lrs_close_socket("socket15");
lrs_receive("socket7", "buf9", LrsLastArg);
lrs_close_socket("socket5");
lrs_close_socket("socket6");
lrs_disable_socket("socket7", DISABLE_SEND_RECV);
lrs_close_socket("socket7");
lrs_close_socket("socket9");
lrs_close_socket("socket10");
lrs_close_socket("socket11");
lrs_close_socket("socket12");
lrs_close_socket("socket13");
lrs_close_socket("socket14");
return 0;
}
[ 本帖最后由 bobdog520 于 2008-12-10 15:45 编辑 ] |
|