Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hello. Is there any chance to receive valid codes for old client 1.9.4? #78

Open
pynkpanther opened this issue Sep 28, 2018 · 14 comments
Open

Comments

@pynkpanther
Copy link

hi, i recently discovered a 7.7 server running the original tibia server files.

tibiaauto.net/code seems to be broken or the backend seems to be down. any chance you could provide me with valid codes? 1.9.4, 1.95 and 1.9.6 seem to work with the tibia client, but get no codes :-(

if the code server is down and theres no chance in brining it up, i'd be willing to donate you some dollars for some code so i can implement a standalone code generator for myself

greetz
klaus

@felipetnh
Copy link

Unfortunately not.
The codes were hosted ad tibiaauto.net and we had a server crash several years back and lost the files that generated the code.
You could download the project and try and make it work with that version, though.
But I'm afraid that's quite hard to do.

@pynkpanther
Copy link
Author

wow thx for fast reply!
well. its really the original tibia client used by cip in 2006. therefore i think tibiauto at around 1.9.5 should work flawlessly if there was no code check.
do you think would it be possible that i download the code and checkout at some commit back from 2006 and just try to make it work without the code?

@felipetnh
Copy link

felipetnh commented Sep 28, 2018 via email

@pynkpanther
Copy link
Author

thx dude! i'll giv it a try ;)

@felipetnh
Copy link

felipetnh commented Sep 28, 2018 via email

@pynkpanther
Copy link
Author

mh. i think even got the code part, just changed the return values (see below).
though i htink i m stuck compiling this monster. dozens of c++ files and no makefile?
and its been some years i was last working with c/c++.
if you got any clue i'd be really thankful

int CEnterCode::auth()
{
	// we calculate good sum
	int goodSum=randTab[0]*randTab[0]*11+randTab[1]*121+randTab[2]*randTab[1]*27+randTab[3]*23+randTab[4]*15+randTab[5]*randTab[6]*randTab[7]*11-randTab[3]*(randTab[5]+randTab[4]);
	goodSum%=100000000;
	// then md5 it
	char buf[128];	
	char buf3[128];
	sprintf(buf,"%d",goodSum);
	CMD5 md5;
	md5.setPlainText(buf);
	sprintf(buf2,"%s",md5.getMD5Digest());	
	m_code.GetWindowText(buf3,127);		
	if (strcmp(buf2,buf3))
	{
		return 1;
		//return 0;
	} else {
		return 0;
		//return 1;
	}
}

@felipetnh
Copy link

felipetnh commented Sep 28, 2018 via email

@pynkpanther
Copy link
Author

for anyone else finding this thread:
found this thread on how to build:
From zero to build hero

though its from 2015, so 8-9 years after the version i am trying to build.
fround a tibiaauto.dsp file and inside:
# Microsoft Developer Studio Generated Build File, Format Version 6.00

i guess i have to somehow find such a version of Visual Studio when it wasnt called Visual Studio yet???

@felipetnh
Copy link

felipetnh commented Sep 28, 2018 via email

@pynkpanther
Copy link
Author

really thanx for your help so far man!

i know its a shame but never ever really got into reverse engineering (start to think this could become a very educational thing xD).

but nevertheless. dont i need the old microsoft developer studio to build a working win32 app? or do you think any recent visual studio version will do?

@felipetnh
Copy link

felipetnh commented Sep 28, 2018 via email

@pynkpanther
Copy link
Author

yea i already have the 1.9.8 and even tried it with the tibia client in a windows xp VM. seemed to work, except the code-authentication.

i think i ll try to get into reverse engineering it. again thx for you help so far. i ll let you know how it works out.

so far wish you good evening!

@felipetnh
Copy link

felipetnh commented Sep 28, 2018 via email

@divinity76
Copy link

divinity76 commented Jan 1, 2020

where can one download the 1.9.6 .exe? could probably crack it, look for references to the string "%d" in the exe file, it shouldn't take long to find the function where you need to add a simple jmp short cleanup_and_return_zero_line; instruction

another way to crack it.. i wonder if this PHP function returns a valid answer:

<?php
     echo solve("123-123-123-123-213-123-123-123");

	function solve(string $quest):string{
		$randTab=explode("-",$quest);
		if(count($randTab)!==8){
			throw new \LogicException("not 8 randTab's (".count($randTab).")");
		}
		foreach($randTab as $i=>$wut){
			if(!is_numeric($wut)){
				throw new \LogicException("randTab {$i} is not numeric! wtf?");
			}
		}
		$goodSum=$randTab[0]*$randTab[0]*11+$randTab[1]*121+$randTab[2]*$randTab[1]*27+$randTab[3]*23+$randTab[4]*15+$randTab[5]*$randTab[6]*$randTab[7]*11-$randTab[3]*($randTab[5]+$randTab[4]);
		$goodSum%=100000000;
		$buf2=hash("md5",(string)$goodSum,false);
		return $buf2;
   }

does it? you can test here: https://3v4l.org/DALTI
like

echo solve("123-123-123-123-213-123-123-123");

prints 0a527c93d1679e7c6f877299f04dac44

ping @pynkpanther

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants