• 大小: 9.53M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-08-23
  • 语言: 其他
  • 标签: 其他  

资源简介

春彩SSC源码带后台和开奖.zip

资源截图

代码片段和文件信息

#include 
#include 
#include 

#define SCRAMBLE_LENGTH_323 8

typedef unsigned long ulong;
typedef unsigned int uint;
typedef unsigned char uchar;

struct rand_struct {
  unsigned long seed1seed2max_value;
  double max_value_dbl;
};

void hash_password(ulong *result const char *password uint password_len)
{
  register ulong nr=1345345333L add=7 nr2=0x12345671L;
  ulong tmp;
  const char *password_end= password + password_len;
  for (; password < password_end; password++)
  {
    if (*password == ‘ ‘ || *password == ‘\t‘)
      continue;                                 /* skip space in password */
    tmp= (ulong) (uchar) *password;
    nr^= (((nr & 63)+add)*tmp)+ (nr << 8);
    nr2+=(nr2 << 8) ^ nr;
    add+=tmp;
  }
  result[0]=nr & (((ulong) 1L << 31) -1L); /* Don‘t use sign bit (str2int) */;
  result[1]=nr2 & (((ulong) 1L << 31) -1L);
}

void randominit(struct rand_struct *rand_st ulong seed1 ulong seed2)
{                                               /* For mysql 3.21.# */
#ifdef HAVE_purify
  bzero((char*) rand_stsizeof(*rand_st));      /* Avoid UMC varnings */
#endif
  rand_st->max_value= 0x3FFFFFFFL;
  rand_st->max_value_dbl=(double) rand_st->max_value;
  rand_st->seed1=seed1%rand_st->max_value ;
  rand_st->seed2=seed2%rand_st->max_value;
}

double my_rnd(struct rand_struct *rand_st)
{
  rand_st->seed1=(rand_st->seed1*3+rand_st->seed2) % rand_st->max_value;
  rand_st->seed2=(rand_st->seed1+rand_st->seed2+33) % rand_st->max_value;
  return (((double) rand_st->seed1)/rand_st->max_value_dbl);
}

void scramble_323(char *to const char *message const char *password)
{
  struct rand_struct rand_st;
  ulong hash_pass[2] hash_message[2];

  if (password && password[0])
  {
    char extra *to_start=to;
    const char *message_end= message + SCRAMBLE_LENGTH_323;
    hash_password(hash_passpassword (uint) strlen(password));
    hash_password(hash_message message SCRAMBLE_LENGTH_323);
    randominit(&rand_sthash_pass[0] ^ hash_message[0]
               hash_pass[1] ^ hash_message[1]);
    for (; message < message_end; message++)
      *to++= (char) (floor(my_rnd(&rand_st)*31)+64);
    extra=(char) (floor(my_rnd(&rand_st)*31));
    while (to_start != to)
      *(to_start++)^=extra;
  }
  *to= 0;
}

int main() {
  const char password1[] = “root“;
  const char password2[] = “long password test“;
  const char password3[] = “saf789yasfbsd89f“;
  ulong result[2];
  char scrm[9]; // SCRAMBLE_LENGTH_323+1
  struct rand_struct rand_st;
  int i;

  // test hash_password
  hash_password((ulong*)result password1 strlen(password1));
  printf(“hash_password(\“%s\“) = %08x%08x\n“ password1 result[0] result[1]);

  hash_password((ulong*)result password2 strlen(password2));
  printf(“hash_password(\“%s\“) = %08x%08x\n“ password2 result[0] result[1]);

  hash_password((ulong*)result password3 strlen(password3));
  printf(“hash_password(\“%s\“) = %08x%08x\n“ password3 result[0] result[1]);


  // test randomin

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-11-17 10:25  admin\
     文件        4873  2015-06-18 02:45  admin\admin778899.php
     文件        1016  2015-10-19 12:03  admin\config.admin.php
     目录           0  2015-10-19 12:01  admin\lib\
     目录           0  2015-10-19 12:01  admin\lib\classes\
     文件        1912  2015-06-18 02:45  admin\lib\classes\CImage.class
     目录           0  2015-10-19 12:01  admin\lib\classes\fonts\
     文件       27096  2015-06-18 02:45  admin\lib\classes\fonts\F2FOCRBczykLTStd-Regular.otf
     目录           0  2015-10-19 12:01  admin\lib\classes\googleChart\
     文件       55288  2015-06-18 02:45  admin\lib\classes\googleChart\GoogleBarChart.php
     文件       53994  2015-06-18 02:45  admin\lib\classes\googleChart\GoogleChart.php
     文件        5528  2015-06-18 02:45  admin\lib\classes\googleChart\GoogleChartApi.php
     文件        6161  2015-06-18 02:45  admin\lib\classes\googleChart\GoogleChartAxis.php
     文件       14777  2015-06-18 02:45  admin\lib\classes\googleChart\GoogleChartData.php
     文件        1422  2015-06-18 02:45  admin\lib\classes\googleChart\GoogleChartIcon.php
     文件        2319  2015-06-18 02:45  admin\lib\classes\googleChart\GoogleChartMarker.php
     文件        3985  2015-06-18 02:45  admin\lib\classes\googleChart\GoogleMapChart.php
     文件        1405  2015-06-18 02:45  admin\lib\classes\googleChart\GooglePieChart.php
     文件        2541  2015-06-18 02:45  admin\lib\classes\googleChart\GoogleQRCode.php
     目录           0  2015-10-19 12:01  admin\lib\classes\googleChart\icons\
     文件        2051  2015-06-18 02:45  admin\lib\classes\googleChart\icons\GoogleChartIconNote.php
     目录           0  2015-10-19 12:01  admin\lib\classes\googleChart\markers\
     文件         857  2015-06-18 02:45  admin\lib\classes\googleChart\markers\GoogleChartCandlestickMarker.php
     文件        2079  2015-06-18 02:45  admin\lib\classes\googleChart\markers\GoogleChartLineMarker.php
     文件        7038  2015-06-18 02:45  admin\lib\classes\googleChart\markers\GoogleChartMapMarker.php
     文件         832  2015-06-18 02:45  admin\lib\classes\googleChart\markers\GoogleChartRangeMarker.php
     文件        5419  2015-06-18 02:45  admin\lib\classes\googleChart\markers\GoogleChartShapeMarker.php
     文件        7049  2015-06-18 02:45  admin\lib\classes\googleChart\markers\GoogleChartTextMarker.php
     文件        2660  2015-06-18 02:45  admin\lib\classes\Xxtea.class
     目录           0  2015-10-19 12:01  admin\lib\core\
     文件       10086  2015-06-18 02:45  admin\lib\core\DBAccess.class
............此处省略1435个文件信息

评论

共有 条评论