// md5 算法略
Action()
{
int i;
int rc ;
char sing_pwd_q[500];
char sign_name[50];
char *_appSignSecret= "iaiyo.com#aibuyu#?!@#$123456";
char time_hami[50];
char vervsion_v[100];
char vervsion_v_v[100];
char clintId_v[100];
char clintId_v_v[100];
char sign_new_v[200];
char sign_new_v_v[200];
char sing_pwd_q_two[200];
char sing_pwd_q_two_result[200];
char time_new_v[50];
char time_new_v_v[50];
char *do_1="getList";
char *mod="Friend_Self";
char sign_md5[40];
char sign_md5_v[40];
// clientId 不加密!
char *clientId="08f1a84d59bb9758a475daf3f167faeb";
// hashKey 不加密!
char *hashKey="YmNlNGR2cEVlYVR3eXh6V01RNDd5ZjR3TEFuQjc0MWxCeWhhMlFUSEovYXYvVTM1R1NPb0d3eUI0RUVieXlLd01ob0FBcXJRb292ZEhTRXE2SWszejBYazdXVDVkNHUvZEJGYklHdzNnem9MbG1tVHVjWEJ1TkhUb09CRXFlZTBPaEpad1J3RFE1ZlVBd2dSTXhzYlRiUzhkQVZHV0xBaXlKeUdEd1QwOHVXMEMyRUtxOXR3azhwZ1lsYUp6V3hSMGY3bU1qMUNzOEFsRDk1MVVtaEU0NWVVbHd5ektHUVhnckIxcXo1em1qSmczNk9ZazR1L3dkcGloVlBEY29uTkZTaEcxa2xsbXNuTkpnQ3JSN1crOFVQOFdxVkdaUFB2MDY5TmJ2RjlvYXBYa29ieFhyTHE3VENDd21weTg5L1lRWU5LOHVVUWxldmFuT0wzVUNVaVdLWVlSRDk1ZGUxMjRIcUdqRWc1TEZ3UklMclg2dC9nMVo5UlZmbXoxcnJUYmtUa3RPNDdQTkhoTFE0NzZiMTVieDhWTHVaallLTlltUUhpMnVsMXloamgweUkwQXkwUWV1LzZhakVxbjAxODhNenhGUkt4TlI2UHp0dFJqNVVLWkViS0tPYmxxVUY2b1ErZ0dLYk5kOG4yYk1RRjlxQmYwMWllMko4MlZidllPdDZjVWc3RE4raXNIK0ZOOVJOck9YVklQdnVoZnFpd0F2RHd2Vnl4aEpMQW5BRWIxcTQ3ME1B";
// version 不加密!
char *version="8280a0a64c7205c17474996131e73afd";
// sign 加密!
// char *sign="8175393ff673fd47c783a455a493b90f";
char *sign_new="495c1ce79693bcf2ee79a5fcb9eb3a1c";
char *time_new="1313992549064";
typedef long time_t;
struct _timeb {
time_t time;
unsigned short millitm;
short timezone;
short dstflag;
};
struct _timeb t;
_tzset();
_ftime( &t );
lr_message( "===> 当前系统时间毫秒数: %u%u", t.time,t.millitm );
sprintf(time_hami, "%u%u",t.time,t.millitm);
lr_save_string(time_hami,"time_hami_restul");
sprintf(sing_pwd_q,"%s%s%s%s%s%s%s%s%s%s","clintId=",lr_eval_string("{clientId_p}"),"do=getInfo","hashKey=",lr_eval_string("{hashKey_p}"),"mod=User_Self","time=",lr_eval_string("{time_hami_restul}"),"version=",lr_eval_string("{version_v}"));
lr_save_string(sing_pwd_q,"sing_pwd_q_v");
sprintf(sing_pwd_q_two,"%s%s",lr_eval_string("{sing_pwd_q_v}"),"iaiyo.com#aibuyu#?!@#$123456");
lr_save_string(sing_pwd_q_two,"sing_pwd_q_two_result");
GetMd5FromString(lr_eval_string("{sing_pwd_q_two_result}"),sign_md5);
sprintf(sign_md5_v,"%s",sign_md5);
lr_save_string(sign_md5_v,"sign_md5_v_v");
lr_save_string(lr_eval_string("{hashKey_p}"),"hashkey_v_v");
sprintf(vervsion_v,"%s","8280a0a64c7205c17474996131e73afd");
lr_save_string(vervsion_v,"vervsion_v_v");
sprintf(clintId_v,"%s","08f1a84d59bb9758a475daf3f167faeb");
lr_save_string(clintId_v,"clintId_v_v");
lr_save_string(lr_eval_string("{version_v}"),"version_p");
amf_set_version("3");
amf_define_header_set("Id=amf_header_set",
HEADER,
"Name=param",
"MustUnderstand=false",
"Data=",
LAST);
lr_start_transaction("获取用户信息");
amf_call("aaa",
"Gateway=",
"AMFHeaderSetId=amf_header_set",
"Snapshot=t5.inf",
"ResponseParameter=rsp",
MESSAGE,
"Method=User_Self.getInfo", //Friend_Self.getList
"TargetObjectId=User_Self.getInfo", //Friend_Self.getList
BEGIN_ARGUMENTS,
"",
END_ARGUMENTS,
LAST );
if ((rc = strspn(lr_eval_string("{rsp}"), lr_eval_string("{strcmp}"))) == 0)
{
lr_end_transaction("获取用户信息", LR_FAIL);
lr_error_message(lr_eval_string("{rsp}"));
}
else
{
lr_end_transaction("获取用户信息", LR_PASS);
}
return 0;
}
阅读(3210) | 评论(0) | 转发(0) |