Jump to content

DiffGen - DiffTeam Client Diff Generator


Yommy

Recommended Posts


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  81
  • Reputation:   69
  • Joined:  11/08/11
  • Last Seen:  

I think its time to release this more public, and try to revive the whole project.

So i am asking if anyone who can code PHP and knows how to modify client ASM code wants to help

DiffGen is a small framework we wrote to generate .diff files, it uses patterns with wildcards to find the patch locations

Naturally these patterns fail when gravity significantly changes parts of the client source, but these are easy to fix up.

(except when gravity changed compiler to vc9, and broke *every* pattern /sob )

Also the core can be used for other tasks, as demonstrated with the XtractMsgStringTable and XtractPacketLength patches

When the compiler change happened, we rewrote DiffGen as DiffGen2, fixed all the patterns, and also made xDiffGen2,

which outputs the diff files using an XML format, and added the ability to use variables for some patch values.

so then the diff patcher can do things like "set custom window title" or "set chatbox text length" in the patcher.

Because of this feature, there was no diff patcher that supported the new xDiff, so LightFighter created a new patcher

and even included support for "profiles", to store your selected diff options, etc.

Anyway im drifting..

Onto the goods, Requires PHP installed (and the php path to windows)

SVN is located at : https://subversion.a....com/svn/Yommy/

The main goal of the project is to make an amazing diff generator, which can easily be extended

the core functions are simple to use, which makes the patch files easy to create.

If anyone wants to help with the project, just register an assembla account and send me a message on here explaining your intentions :)

and if anyone wants me to explain how something works, just ask :)

YomRawr <3

  • Upvote 3
  • MVP 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  70
  • Topics Per Day:  0.02
  • Content Count:  1245
  • Reputation:   392
  • Joined:  11/19/11
  • Last Seen:  

Wow Yommy. This is incredible work. Thanks a lot! In a period of 1 day, all of sudden all of these crazy useful projects are being released to the public by you. I really appreciate what you've done for us all. =)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  2244
  • Reputation:   182
  • Joined:  11/19/11
  • Last Seen:  

Finally

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  713
  • Reputation:   70
  • Joined:  11/08/11
  • Last Seen:  

hopping to see a diff to allow shared pallets soon *-*

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  2244
  • Reputation:   182
  • Joined:  11/19/11
  • Last Seen:  

and any way to increase hairstyles

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  81
  • Reputation:   69
  • Joined:  11/08/11
  • Last Seen:  

Something that the project requires..

Sometimes a pattern breaks, and we need a way to check a specific pattern against all the clients. (and something to fetch about a years worth of clients)

so we can find exactly when the pattern fails

:)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   0
  • Joined:  05/18/12
  • Last Seen:  

Something that the project requires..

Sometimes a pattern breaks, and we need a way to check a specific pattern against all the clients. (and something to fetch about a years worth of clients)

so we can find exactly when the pattern fails

:)

Something like this ?? The code only gets the binary file links and downloads them. Finding the pattern within the binary is too far above my head. I did find the link that deals with seeking through the binary which might be usefull. But, I guess you already know how to do it seeing that you have made the Packet Parser /meh

//==============================================================//
//	Using Judas's listing since it is easiest to parse	//
//==============================================================//
$url = 'http://supportmii.com/ro1/Clients/'; // replace with any source

//==============================================================//
//		Parse the HTML and get the links		//
//==============================================================//
$homepage = file_get_contents($url);

$doc = new DOMDocument;
$doc->loadHTML($homepage);
//$doc->strictErrorChecking = FALSE ; // strict checking off (sometimes necessary)

$xpath = new DOMXPath($doc);
$query = '//a'; // get all the anchors
$entries = $xpath->query($query);

$hrefs = array(); // place to store the links

foreach ($entries as $entry) {
$a = $entry->nodeValue; // the name of the link
if (strpos($a,'RagexeRE') !== false) { // only list the RagexeRE executables

	//----------------------------------------------//
	//	 Print out the list for debugging	//
	//----------------------------------------------//
	echo $a."---";
	echo $url.$entry->getAttribute("href").PHP_EOL;
	//----------------------------------------------//

	$hrefs[] = $url.$entry->getAttribute("href"); // add link to array
}
}

//==============================================================//
//		Download the binaries you need			//
//==============================================================//
// more details on dealing with binary files here:
// http://onlamp.com/pub/a/php/2002/12/12/php_foundations.html

//set_time_limit(123456); // increase the timelimit from default 30 -> for getting the binary
//$bin = getBinaryFile($hrefs[0]); // get the binary data for the particular client

function getBinaryFile($href){
$fr = fopen($href, "rb"); // readonly in binary mode

//$contents = stream_get_contents($fr); // requires PHP5 and up
					// faster when storing as string

$bytes = '';
while (!feof($fr)) {
	$bytes .= fread($fr, 1024);
}

fclose($fr);
return $bytes;
}

Edited by znromonk
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  187
  • Reputation:   35
  • Joined:  01/01/12
  • Last Seen:  

xDiffgen already have the feature to download binary files from official kRO ftp.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   0
  • Joined:  05/18/12
  • Last Seen:  

xDiffgen already have the feature to download binary files from official kRO ftp.

You are right. My Bad. I should have looked at the source before posting.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  81
  • Reputation:   69
  • Joined:  11/08/11
  • Last Seen:  

Thank you for a nice effort :D

I just spent a few minutes adding support for diffgen to download the last 150 clients into a folder which will be used for pattern testing.

i will make something to try a specific patch against all the clients in this folder, to find exactly when things break

Yom

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  81
  • Reputation:   69
  • Joined:  11/08/11
  • Last Seen:  

for anyone that is interested..

I committed some changes, added ability to test a specific patch against all clients, so we can see when a patch starts to fail

Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Uhhh.. Is there anything I can do?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Hmm I get this error message when I use DiffGen2

Fatal Error: Cannot redeclare gzdecode() in C:\DiffGen2\Core\func.php on line 80

Ohh.. After take a peek into the xdiff code, I instantly get the concept of 'Byte offset', but still have no clue about 'dword' and 'string'.

And about xDiffGen2, is it for date specific client or can it be applied for all date?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  81
  • Reputation:   69
  • Joined:  11/08/11
  • Last Seen:  

i fixed that error some days ago, do an svn update :)

xdiff was made to allow the patcher to set options at patch time, e.g CustomWindowTitle, the patcher can set the title string.

Byte = 1 Byte

Word = 2 Byte

Dword(double word) = 4 Byte

DiffGen was rewritten as DiffGen2 when gravity updated the client compiler, so all the patches are updated for newer clients, i think all 2011 and 2012 clients should work

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...