|
用winsock是可生成脚本的
我录制登陆www.baidu.com 下载刘德华的一首歌,脚本如下
/*********************************************************************
* Created by Mercury Interactive Windows Sockets Recorder
*
* Created on: Thu Jul 22 09:59:41
*********************************************************************/
#include "lrs.h"
vuser_init()
{
lrs_startup(257);
lrs_create_socket("socket0", "TCP", "LocalHost=0", "RemoteHost=202.108.249.131:80", LrsLastArg);
lrs_send("socket0", "buf0", LrsLastArg);
lrs_receive("socket0", "buf1", LrsLastArg);
lrs_close_socket("socket0");
lrs_create_socket("socket1", "TCP", "LocalHost=0", "RemoteHost=218.1.65.41:80", LrsLastArg);
lrs_create_socket("socket2", "TCP", "LocalHost=0", "RemoteHost=219.133.39.11:80", LrsLastArg);
lrs_create_socket("socket3", "TCP", "LocalHost=0", "RemoteHost=218.1.65.41:80", LrsLastArg);
lrs_send("socket2", "buf2", LrsLastArg);
lrs_send("socket1", "buf3", LrsLastArg);
lrs_send("socket3", "buf4", LrsLastArg);
lrs_receive("socket2", "buf5", LrsLastArg);
lrs_close_socket("socket2");
lrs_receive("socket1", "buf6", LrsLastArg);
lrs_close_socket("socket1");
lrs_create_socket("socket4", "TCP", "LocalHost=0", "RemoteHost=218.1.65.41:80", LrsLastArg);
lrs_receive("socket3", "buf7", LrsLastArg);
lrs_close_socket("socket3");
lrs_create_socket("socket5", "TCP", "LocalHost=0", "RemoteHost=218.1.65.41:80", LrsLastArg);
lrs_send("socket4", "buf8", LrsLastArg);
lrs_send("socket5", "buf9", LrsLastArg);
lrs_receive("socket4", "buf10", LrsLastArg);
lrs_receive("socket5", "buf11", LrsLastArg);
lrs_close_socket("socket4");
lrs_close_socket("socket5");
lrs_create_socket("socket6", "TCP", "LocalHost=0", "RemoteHost=218.1.65.41:80", LrsLastArg);
lrs_create_socket("socket7", "TCP", "LocalHost=0", "RemoteHost=218.1.65.41:80", LrsLastArg);
lrs_send("socket6", "buf12", LrsLastArg);
lrs_send("socket7", "buf13", LrsLastArg);
lrs_receive("socket6", "buf14", LrsLastArg);
lrs_receive("socket7", "buf15", LrsLastArg);
lrs_close_socket("socket6");
lrs_close_socket("socket7");
lrs_create_socket("socket8", "TCP", "LocalHost=0", "RemoteHost=218.1.65.41:80", LrsLastArg);
lrs_send("socket8", "buf16", LrsLastArg);
lrs_receive("socket8", "buf17", LrsLastArg);
lrs_close_socket("socket8");
lr_think_time(21);
lrs_create_socket("socket9", "TCP", "LocalHost=0", "RemoteHost=219.150.150.161:80", LrsLastArg);
lrs_send("socket9", "buf18", LrsLastArg);
lrs_receive("socket9", "buf19", LrsLastArg);
return 0;
} |
|