跑跑卡丁车卡密自动充值工具

主要为了实现将世纪天成卡号密码直接冲入用户帐户的功能,由于时间紧,没有使用线程,因此是采用的阻塞的方式来实现的,充值过程会造成系统假死;
验证码采用自动识别
  postwww := tstringlist.Create ;
  StartTag:= True;
  For i:=0 To LstViewCard.Items.Count-1 do begin
    if LstViewCard.Items.Checked then begin
      strCard:= LstViewCard.Items.Caption;
      strPass:= LstViewCard.Items.SubItems.Strings[0];
      if LstViewCard.Items.SubItems.Count<2 then
        LstViewCard.Items.SubItems.Add(EdtGameAccount.Text)  //充值帐号
      else
        LstViewCard.Items.SubItems.Strings[1]:= EdtGameAccount.Text;
      if LstViewCard.Items.SubItems.Count<3 then
        LstViewCard.Items.SubItems.Add('开始利用该卡密进行充值...')  //充值帐号
      else
        LstViewCard.Items.SubItems.Strings[2]:= '开始利用该卡密进行充值...';
      strImgUrl:= 'http://pay.tiancity.com/Modules/Validate.aspx';
      strUrl:= 'http://pay.tiancity.com/Payment/CardConfirm.aspx';
    TStm := TMemoryStream.Create();
    IdHTTP1.Get(strImgUrl,tstm);
      strRnd := GetValidCode(TStm,1081,'POPNETSOFT-CNTLIS');//通过之前的验证码识别组件来进行识别
      postwww.Text:= 'txt_userName='+ EdtGameAccount.Text
        + '&txt_userName2='+ EdtGameAccount.Text
        + '&txt_cardno='+ strCard
        + '&txt_cardpwd='+ strPass
        + '&txt_validatecode='+ strRnd
        + '&sdfdsf.x=31&sdfdsf.y=4';//要提交给充值服务器的数据
      IdHTTP1.Request.Referer:= 'http://pay.tiancity.com/Payment/CardRegistration.aspx';//服务器禁止了外部提交数据,因此要模拟Referer
     try
       strhttp:= IdHTTP1.post(strUrl,postwww);
     except
       sleep(1000);
       try
         strhttp := IdHTTP1.post(strUrl,postwww);
       except
         sleep(1000);
         try
           strhttp := IdHTTP1.post(strUrl,postwww);
         except
         end;
       end;
     end;
      strMsg:= URLDecode(MidStr(strhttp,
          pos('../Modules/Message.aspx?msg=',strhttp)+ 28,
          pos('" ;</script>',strhttp)-pos('../Modules/Message.aspx?msg=',strhttp)-28));//判定是否充值成功
      //strRedirect:= IdHTTP1.Redirecturl;
      if pos('充值成功',strMsg)>0 then begin
        if LstViewCard.Items.SubItems.Count<3 then
          LstViewCard.Items.SubItems.Add('冲值成功')  //充值帐号
        else
          LstViewCard.Items.SubItems.Strings[2]:= '冲值成功:';
        WriteLog('卡号:'+strCard+ ',密码:'+strPass+'对账户'+LstViewCard.Items.SubItems.Strings[1]
          + '充值成功;');
      end else begin
        if LstViewCard.Items.SubItems.Count<3 then
          LstViewCard.Items.SubItems.Add('冲值失败,系统返回原因:'+strMsg)  //充值帐号
        else
          LstViewCard.Items.SubItems.Strings[2]:= '冲值失败,系统返回原因:'+strMsg;
        WriteLog('卡号:'+strCard+ ',密码:'+strPass+'对账户'+LstViewCard.Items.SubItems.Strings[1]
          + '充值失败;系统返回原因:'+ strMsg);
      end;
      Delay(1000*StrToInt(EdtSecond.Text));//这个地方是由于充值服务器禁止在几秒钟之内同时充值,其实可以通过多线程来实现,这样就不用来延迟
    end;
  end;
 
应某些朋友需要,将编译以后的软件发布出来供大家下载研究
由于时间紧迫,程序非常简陋,但是不影响使用

posted on 2009-02-22 16:11  cntlis  阅读(3304)  评论(6编辑  收藏  举报

导航