Chinaunix首页 | 论坛 | 博客
  • 博客访问: 479185
  • 博文数量: 83
  • 博客积分: 2570
  • 博客等级: 少校
  • 技术积分: 901
  • 用 户 组: 普通用户
  • 注册时间: 2007-06-19 12:05
文章分类

全部博文(83)

文章存档

2012年(1)

2011年(1)

2010年(8)

2009年(14)

2008年(45)

2007年(14)

我的朋友

分类: WINDOWS

2009-04-20 16:43:51

交易测试:
系统:xp
协议选择:
web(http/html)
application tyep:Win32 Applications
 
初始化部分
vuser_init()
{
 lr_load_dll("des2.dll");
 return 0;
}
 
运行部分:
 
Action()
{
    char * downs;
 char  strs[100];
 char seq[64];
 char sqrb[100];
 int te;
    char  gu[10];
//手工关联
web_reg_save_param("downs",
       "LB=SEQ>", "RB=<STAN>", LAST);
//复制字符串到strs
strcpy(strs,lr_eval_string("{numbers}"));
//lr_message("strs=%s",strs);
//直接调用dll中的函数
ClsEncry(strs);
//保存strs为参数,以便后面直接调用
lr_save_string(strs,"sqrb");
//lr_message("the encryped data is :%s",lr_eval_string("{sqrb}"));
web_reg_save_param("mids",
  "LB=<MID>", "RB=       <DATE>", LAST);
web_reg_save_param("sns",
  "LB=<SN>", "RB=<SCR1>", LAST);

lr_start_transaction("down_parameter");
 web_custom_request("ClsTrading",
  "URL=",
  "Method=POST",
  "Resource=0",
  "RecContentType=text/xml",
  "Referer=",
  "Snapshot=t3.inf",
  "Mode=HTTP",
  "EncType=text/xml; charset=utf-8",
  "Body=",
  LAST);
lr_end_transaction("down_parameter",LR_AUTO);
    //lr_output_message("参数是: %s",lr_eval_string("{downs}"));
 te=atol(lr_eval_string("{downs}"))+1;
    itoa(te,gu,10);
 //lr_output_message("t=%s",gu);
 lr_save_string(gu,"downs");
 //lr_output_message("参数是: %s",lr_eval_string("{downs}"));
 
//strcat(pp,gu);
//strcat(pp,paraArry);
//lr_message("pp=%s",pp);

 lr_start_transaction("100journal");
 lr_think_time(15);
 
 lr_rendezvous("journal");
 web_custom_request("trading",
  "URL=",
  "Method=POST",
  "Resource=0",
  "Referer=",
  "Snapshot=t4.inf",
  "Mode=HTTP",
  "Body=100{mids}{terminal}1{downs}4000011BBBD7900{sns}{sqrb}",
  LAST);
lr_error_message("你的贴号是:%s",lr_eval_string("{numbers}"));
lr_error_message("你选的终端是:%s",lr_eval_string("{terminal}"));
 lr_end_transaction("100journal",LR_AUTO);
 return 0;
}
 
阅读(2863) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~