风来风往吧 关注:8贴子:375
  • 4回复贴,共1

F点主持人绝招之一

只看楼主收藏回复

数学帝点主持人绝招之一:自动投注机器人。附源码,机器人代替本尊实战开始


IP属地:浙江1楼2013-03-05 11:51回复
    // PLU Gamble v0.01
    // Author: Logicstorm
    // Date: 2012-10-30
    // Reference: HttpGet.c from http://homepage2.nifty.com/igat/igapyon/diary/2002/ig021126.html
    // Please keep the above message if you want to use, copy, modify, publish, distribute, and/or sell copies of the Software.
    #include "stdafx.h"
    #include <windows.h>
    #include <wininet.h>
    #include <stdio.h>
    #include <stdlib.h>
    #include <time.h> #define TRYNUM 128
    #define STARTCREDIT 1
    #define BUFSIZE 400000
    int _tmain(int argc, _TCHAR* argv[])
    {
    HINTERNET hsession = 0;
    HINTERNET hconnect = 0;
    HINTERNET hrequest = 0;
    char szBuf;
    DWORD dwSize = 0;
    char hdrs[] = "Content-Type: application/x-www-form-urlencoded";
    char frmdata[1024];
    LPCSTR accept[2]={"*/*", NULL};
    int credit, winnum, lostnum, bet, randnum, oldcredit, trynum;
    time_t rawtime;
    struct tm * timeinfo;
    int i,j,k;
    credit = 0;
    oldcredit = 0;
    winnum = 0;
    lostnum = 0;
    trynum = 0;
    while (trynum < TRYNUM) {
    hsession = InternetOpen("MyAgent", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
    if (hsession == NULL) {
    printf("hsession==NULL");
    return -1;
    }
    hconnect = InternetConnect(hsession, "bet.plu.cn", 80, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 1);
    if (hconnect == NULL) {
    printf("hconnect==NULL");
    return -1;
    }
    hrequest = HttpOpenRequest(hconnect, "POST", "/chipmain.php", NULL, NULL, accept, 0, 1);
    if (hrequest == NULL) {
    printf("hrequest==NULL");
    return -1;
    }
    srand( (unsigned int)time(NULL) );
    randnum = rand() % 2;
    bet = STARTCREDIT << lostnum;
    if (credit > 0) {
    if (bet > credit)
    bet = credit;
    }
    time ( &rawtime );
    timeinfo = localtime ( &rawtime );
    if (randnum == 0)
    sprintf(frmdata, "big=%%E5%%A4%%A7&tbig=%d&tsmall=&t4=&t5=&t6=&t7=&t8=&t9=&t10=&t11=&t12=&t13=&t14=&t15=&t16=&t17=&hidd=%04d-%02d-%02d+%02d%%3A%02d%%3A%02d", bet, timeinfo->tm_year+1900, timeinfo->tm_mon+1, timeinfo->tm_mday, timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec);
    else
    sprintf(frmdata, "tbig=&small=%%E5%%B0%%8F&tsmall=%d&t4=&t5=&t6=&t7=&t8=&t9=&t10=&t11=&t12=&t13=&t14=&t15=&t16=&t17=&hidd=%04d-%02d-%02d+%02d%%3A%02d%%3A%02d", bet, timeinfo->tm_year+1900, timeinfo->tm_mon+1, timeinfo->tm_mday, timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec);
    printf("%d %4d-%02d-%02d %02d:%02d:%02d | Random=%d; Lost=%d; Win=%d; Bet=%d | Credit=%d\n", trynum, timeinfo->tm_year+1900, timeinfo->tm_mon+1, timeinfo->tm_mday, timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, randnum, lostnum, winnum, bet, credit);
    //printf(" %s\n", frmdata);
    if (HttpSendRequest(hrequest, hdrs, (DWORD)strlen(hdrs), frmdata, (DWORD)strlen(frmdata)) == FALSE) {
    printf("HttpSendRequest() failed\n");
    return -1;
    }
    szBuf[0] = 0;
    dwSize = BUFSIZE;
    if (HttpQueryInfo(hrequest, HTTP_QUERY_CONTENT_LENGTH, szBuf, &dwSize, 0)) {
    szBuf[dwSize] = 0;
    printf(" Length [%s]; ", szBuf);
    }
    dwSize = BUFSIZE;
    if (HttpQueryInfo(hrequest, HTTP_QUERY_STATUS_CODE, szBuf, &dwSize, 0)) {
    szBuf[dwSize] = 0;
    printf(" Status [%s]; ", szBuf);
    }
    dwSize = BUFSIZE;
    if (HttpQueryInfo(hrequest, HTTP_QUERY_STATUS_TEXT, szBuf, &dwSize, 0)) {
    szBuf[dwSize] = 0;
    printf(" String status [%s];\n", szBuf);
    }
    credit = 0;
    for (;;) {
    dwSize = BUFSIZE;
    if (InternetReadFile(hrequest, szBuf, dwSize, &dwSize) == FALSE) {
    break;
    }
    if (dwSize <= 0) {
    break;
    }
    szBuf[dwSize] = 0;
    //printf("%s\n", szBuf);
    // find patter ":xxx U"
    if (credit == 0) {
    for (i=0; i<dwSize; i++) {
    if (szBuf[i]==' ' && szBuf[i+1]=='U') {
    for (j=i-1; j>0; j--) {
    if (szBuf[j] == ':') {
    for (k=j+1; k<i; k++) {
    frmdata[k-j-1] = szBuf[k];
    } // for k
    frmdata[i-j-1] = 0;
    break;
    } // if :
    } // for j
    credit = atoi(frmdata);
    //printf(" read credit: %d %d\n", credit, strlen(frmdata));
    break;
    } // if " U"
    } // for i
    } // if credit
    } // for ;; InternetCloseHandle(hrequest);
    InternetCloseHandle(hconnect);
    InternetCloseHandle(hsession);
    if (credit == 0)
    return -1;
    if (credit > oldcredit) {
    winnum++;
    lostnum = 0;
    }
    else {
    winnum = 0;
    lostnum++;
    }
    oldcredit = credit;
    trynu***eep(200);
    }
    return 0;
    }


    IP属地:浙江3楼2013-03-05 11:52
    回复
      @echo off echo 正在关闭冗余进程,请稍等......
      taskkill /f /im iexplore.exe
      echo -------------程序初始化完毕,请指示!----------
      echo. & pause
      :openie set tm1=%time:~0,2% echo %tm1%
      if %tm1% leq 7 and %tm1% gtr 0 (ping 127.0.0.1 -n 200 goto openie echo. & pause) echo 正在投票,请稍等......
      start "" "C:\Program Files\Google\Chrome\Application\chrome.exe" http://bbs.plu.cn/thread-4795929-1-1.html
      echo IE打开完成!
      ping 127.0.0.1 -n 11
      start "" "C:\Program Files\Google\Chrome\Application\chrome.exe" http://bbs.plu.cn/thread-916420-461-1.html
      echo IE打开完成!
      ping 127.0.0.1 -n 23 start "" "C:\Program Files\Google\Chrome\Application\chrome.exe"
      http://bbs.plu.cn/thread-4930766-1-1.html
      echo IE打开完成!
      ping 127.0.0.1 -n 25
      start "" "C:\Program Files\Google\Chrome\Application\chrome.exe" http://bbs.plu.cn/forum-3-1.html
      ping 127.0.0.1 -n 10 taskkill /f /im chrome.exe
      echo 延时5秒关闭投票完成!
      goto openie echo. & pause


      IP属地:浙江4楼2013-03-19 09:59
      回复
        @echo off echo 正在关闭冗余进程,请稍等......
        set tmp=0
        set aa="~~~"
        echo -------------程序初始化完毕,请指示!----------
        echo. & pause
        :openie set tm1=%time:~0,2% echo %tm1% %tmp%
        if %tm1% leq 7 and %tm1% gtr 0 (ping 127.0.0.1 -n 200 goto openie echo. & pause) echo 正在投票,请稍等......
        start "" "C:\Program Files\Google\Chrome\Application\chrome.exe" http://bbs.plu.cn/thread-4941627-1-1.html
        echo IE打开完成1!
        ping 127.0.0.1 -n 11
        start "" "C:\Program Files\Google\Chrome\Application\chrome.exe" http://bbs.plu.cn/thread-4941893-1-1.html
        echo IE打开完成2!
        ping 127.0.0.1 -n 23 start "" "C:\Program Files\Google\Chrome\Application\chrome.exe" http://bbs.plu.cn/thread-4930766-1-1.html
        echo IE打开完成3!
        ping 127.0.0.1 -n 25 echo IE打开完成4!
        start "" "C:\Program Files\Google\Chrome\Application\chrome.exe" http://bbs.plu.cn/forum-3-1.html
        ping 127.0.0.1 -n 10 set /a tmp+=1
        echo %tm1% %aa% %tmp% >>"C:\Documents and Settings\818477\My Documents\Downloads\aa.txt"
        taskkill /f /im chrome.exe
        echo 延时5秒关闭投票完成!
        goto openie echo. & pause


        IP属地:浙江5楼2013-03-19 17:51
        回复
          @echo off echo 正在关闭冗余进程,请稍等......
          set tmp=0
          set aa="~~~"
          echo -------------程序初始化完毕,请指示!----------
          echo. & pause
          :openie set tm1=%time:~0,2% echo %tm1% %tmp%
          if %tm1% leq 7 and %tm1% gtr 0 (ping 127.0.0.1 -n 200 goto openie echo. & pause) echo 正在投票,请稍等......
          start "" "C:\Program Files\Google\Chrome\Application\chrome.exe" http://bbs.plu.cn/forum-3-1.html
          echo IE打开完成1!
          ping 127.0.0.1 -n 11
          start "" "C:\Program Files\Google\Chrome\Application\chrome.exe" http://bbs.plu.cn/thread-4941877-4-1.html
          echo IE打开完成2!
          ping 127.0.0.1 -n 23 start "" "C:\Program Files\Google\Chrome\Application\chrome.exe" http://bbs.plu.cn/thread-4940326-2-1.html
          echo IE打开完成3!
          ping 127.0.0.1 -n 25 echo IE打开完成4!
          start "" "C:\Program Files\Google\Chrome\Application\chrome.exe" http://bbs.plu.cn/thread-4942155-6-1.html
          ping 127.0.0.1 -n 10 set /a tmp+=1
          echo %tm1% %aa% %tmp% >"C:\Documents and Settings\818477\My Documents\Downloads\"%date:~6,4%%date:~3,2%%date:~0,2%%aa%%tm1%.txt
          taskkill /f /im chrome.exe
          echo 延时5秒关闭投票完成!
          goto openie echo. & pause


          IP属地:浙江6楼2013-03-20 17:44
          回复