Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Dekaron > Dekaron Private Server
You last visited: Today at 00:13

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



How I can checksum Lager file !

Discussion on How I can checksum Lager file ! within the Dekaron Private Server forum part of the Dekaron category.

Reply
 
Old   #1
 
kokamentos's Avatar
 
elite*gold: 0
Join Date: Jun 2012
Posts: 116
Received Thanks: 24
How I can checksum Lager file !

this code anti hack skill by winhex for PR Sv!

Quote:
#include <iostream.h>
#include "stdafx.h"
#include "Antihack.h"
#include <tlhelp32.h>
#include <windows.h>
#include <stdlib.h>
#include "crc.h"

void CheckCRC32() {

CCRC32 MyCRC32;
MyCRC32.Initialize();

unsigned long ulCRC2 = MyCRC32.FileCRC("../Data/data.pak");

if(ulCRC2 != 0x9ebad964)
{
ExitProcess(0);
}

}

void Return()
{
again:
CheckCRC32();
Sleep(10000);
goto again;
}

extern "C" __declspec(dllexport) void DekaronChecksum() {
CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(Retu rn),NULL,0,0);

CheckCRC32();

}
this crc.cpp
Quote:

#ifndef _CCRC32_CPP
#define _CCRC32_CPP

#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <iostream>

#include "crc.h"


void CCRC32::Initialize(void)
{
memset(&this->ulTable, 0, sizeof(this->ulTable));

// 256 values representing ASCII character codes.
for(int iCodes = 0; iCodes <= 0xFF; iCodes++)
{
this->ulTable[iCodes] = this->Reflect(iCodes, 8) << 24;

for(int iPos = 0; iPos < 8; iPos++)
{
this->ulTable[iCodes] = (this->ulTable[iCodes] << 1) ^
(this->ulTable[iCodes] & (1 << 31) ? CRC32_POLYNOMIAL : 0);
}

this->ulTable[iCodes] = this->Reflect(this->ulTable[iCodes], 32);
}
}

// Reflection is a requirement for the official CRC-32 standard.
// You can create CRCs without it, but they won't conform to the standard.

unsigned long CCRC32::Reflect(unsigned long ulReflect, char cChar)
{
unsigned long ulValue = 0;

// Swap bit 0 for bit 7 bit 1 For bit 6, etc....
for(int iPos = 1; iPos < (cChar + 1); iPos++)
{
if(ulReflect & 1) ulValue |= 1 << (cChar - iPos);
ulReflect >>= 1;
}

return ulValue;
}


unsigned long CCRC32::FileCRC(const char *sFileName)
{
unsigned long ulCRC = 0xffffffff;

FILE *fSource = NULL;
unsigned char sBuf[CRC32BUFSZ];
int iBytesRead = 0;

if( (fSource = fopen(sFileName, "rb")) == NULL)
{
return 0xffffffff;
}

do{
iBytesRead = fread(sBuf, sizeof(char), CRC32BUFSZ, fSource);
this->PartialCRC(&ulCRC, sBuf, iBytesRead);
}while(iBytesRead == CRC32BUFSZ);

fclose(fSource);

return(ulCRC ^ 0xffffffff);
}


unsigned long CCRC32::FullCRC(unsigned char *sData, unsigned long ulLength)
{
unsigned long ulCRC = 0xffffffff;
this->PartialCRC(&ulCRC, sData, ulLength);
return ulCRC ^ 0xffffffff;
}


//For Example usage example, see FileCRC().
void CCRC32::PartialCRC(unsigned long *ulInCRC, unsigned char *sData, unsigned long ulLength)
{
while(ulLength--)
{
*ulInCRC = (*ulInCRC >> 8) ^ this->ulTable[(*ulInCRC & 0xFF) ^ *sData++];
}
}

#endif
Using 32BitGen checksum data.pak!
But it's can't check data.pak lager ! > 3.5GB
What can i do it can check file lager !
Please help me !
kokamentos is offline  
Old 07/17/2012, 10:30   #2
 
freeskier4lif3's Avatar
 
elite*gold: 0
Join Date: Sep 2008
Posts: 231
Received Thanks: 151
change the variables to the 64bit 'unsigned long long' ~3.5GB is the max a 32bit variable can address.
freeskier4lif3 is offline  
Thanks
2 Users
Old 07/17/2012, 10:52   #3
 
kokamentos's Avatar
 
elite*gold: 0
Join Date: Jun 2012
Posts: 116
Received Thanks: 24
Quote:
Originally Posted by freeskier4lif3 View Post
change the variables to the 64bit 'unsigned long long' ~3.5GB is the max a 32bit variable can address.
Thanks !
But in VS C++ can using "long long"?
kokamentos is offline  
Old 07/17/2012, 17:50   #4
 
freeskier4lif3's Avatar
 
elite*gold: 0
Join Date: Sep 2008
Posts: 231
Received Thanks: 151
Yes.
freeskier4lif3 is offline  
Reply


Similar Threads Similar Threads
Checksum ?
06/15/2011 - S4 League - 7 Replies
How long alaplaya/burda checks the resource files with a checksum ? Since wich year /date alaplaya/burda checks the resource files with a checksum ?
Item-Shop Lager Button Zum Normalen lager button machen? DE
01/12/2011 - Metin2 - 6 Replies
Moin, seid heute gib es ja im inventar den IS button wo man mit sein lager öffnen kann,könnte man den auch zu einem Normalen lager Button Machen?
need help with checksum
12/28/2009 - 9Dragons - 3 Replies
Saweet a long time ago posted this on the forum http://www.elitepvpers.com/forum/9dragons/319988-h owto-create-packet-checksums.html#post3072681 now,im an old fashion guy.it's a lot easer for me to calculate hex numbers with a pen&paper(and claculetor if needed) then using C+ or VB.(i never wrote a single file in them..mybe 1 or 2). so if any1 can just explain to me .what is the mathematical fonction he used to find the checksum in his post.ill be greatfull.(i couldn't follow his command...
Q:about CRC checksum
11/26/2009 - Grand Chase Philippines - 0 Replies
anyone have the right checksum extractor for GCPH??? please anyone?? im having a hardtime searching for it... Please if you do have one please PM me..THANKS!:)
Client File Checksum
08/29/2006 - General Gaming Discussion - 2 Replies
Hello, How do I edit the Client.exe file so I can get around the file checker ?



All times are GMT +1. The time now is 00:14.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.