Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # maf.class.php
- <?php
- class LolMafiacore
- {
- public $user = ''; #fill this out
- public $pass = ''; #fill this out
- public $xp = 0;
- public $prof;
- public function login()
- {
- $c = curl_init('http://mafiacore.net/index.mc');
- curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($c, CURLOPT_COOKIEJAR, '/var/www/mafcor/c.j');
- curl_setopt($c, CURLOPT_COOKIEFILE, '/var/www/mafcor/c.j');
- curl_setopt($c, CURLOPT_POSTFIELDS, "user={$this->user}&pass={$this->pass}&submit=Submit");
- curl_setopt($c, CURLOPT_FOLLOWLOCATION, true);
- $cx = curl_exec($c);
- return true;
- }
- public function commitCrime($crime)
- {
- $cr = curl_init('http://mafiacore.net/crime.mc');
- curl_setopt($cr, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($cr, CURLOPT_COOKIEJAR, '/var/www/mafcor/c.j');
- curl_setopt($cr, CURLOPT_COOKIEFILE, '/var/www/mafcor/c.j');
- curl_setopt($cr, CURLOPT_FOLLOWLOCATION, true);
- switch($crime)
- {
- case 'mug':
- curl_setopt($cr, CURLOPT_POSTFIELDS, "crime=1&submit=Commit+the+crime");
- break;
- }
- $crx = curl_exec($cr);
- preg_match("'<div class=\'success\'>.+</div>'", $crx, $status);
- preg_match("'<div class=\'error\'>.+</div>'", $crx, $fail);
- preg_match("'<div class=\'warning\'>.+</div>'", $crx, $warn);
- if($status)
- {
- preg_match("/\£\d+/", $status[0], $money);
- preg_match('/\d{1,}\s(XP)/', $status[0], $exp);
- }
- if($status) { $this->xp += str_replace(" XP", "", $exp[0]); $this->prof += str_replace("£", "", $money[0]);
- return "Success! Loot: ". $money[0] . ", XP: ". $exp[0] . " Total this session: {$this->xp} xp, {$this->prof} money.\n"; }
- elseif($fail) { return strip_tags($fail[0]) ."\n"; }
- else { return strip_tags($warn[0]) ."\n"; }
- }
- }
- ?>
- # bot.php
- <?php
- include('maf.class.php');
- $bot = new LolMafiacore;
- $i = 1;
- if($bot->login())
- {
- while($i)
- {
- echo $bot->commitCrime('mug');
- sleep(12);
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement