Hi, people, this my first post in this forum. Like you can see, my English is not perfect, but I will try to explain what I want.
Recently I started studies with PHP Curl and Game Hacking to have some advantages in PHp MMORPG's.
I decided to test with Gladiatus and in few minutes I got some usefull things.
With an unustructured code (terrible, but it's just a test) I spent trough the login system.
Code:
class SDK
{
protected $cookiepath = 'C:\\Documents and Settings\\Bruno\\Dados de aplicativos\\Mozilla\\Firefox\\Profiles\\cqsv1lh9.Imaggens\\cookies.txt'; // This is incorrect, I know
public function loadGame()
{
$cURL = curl_init( 'https://s4.gladiatus.com/game/index.php?mod=overview&sh=a832576fee1c59868bec8140f0b3215d' );
curl_setopt( $cURL, CURLOPT_REFERER, 'https://s4.gladiatus.com/index.php?mod=login' );
curl_setopt( $cURL, CURLOPT_RETURNTRANSFER, TRUE );
curl_setopt( $cURL, CURLOPT_COOKIEFILE, $this -> cookiepath );
curl_setopt( $cURL, CURLOPT_COOKIEJAR, $this -> cookiepath );
$data = curl_exec ( $cURL );
// Gold Hack
$data = preg_replace( '@<span class="charvaluesSub" id="sstat_gold_val">[0-9]+\.[0-9]{3}</span>@', '<span class="charvaluesSub" id="sstat_gold_val">1.000.000</span>', $data );
// Show the Game
print '<base href="https://s4.gladiatus.com/game/" />';
print $data;
curl_close ( $cURL );
}
}
The session ID are the same even you close your browser. But if you try bypass the login system with Curl, the session ID is not stored, because it changes repeatedly.
So, I put the SID value directly in the URL.
Next on, I made a simple hack to change gold amount of my player. It were a success, and in main screen, I see Gold: 1.00.00
But (always has a BUT), even if I do a lot of hacks with preg_replace() I don't know how can I use the routines.
Because, the links are setted to original game and exist a normal checker routines to verify the, for example, gold amount.
I made the first step. If someone could teach me how can I continue...
Thanks