begood Posted February 7, 2010 Report Posted February 7, 2010 To script it breaks with the method hashes Distributed Brute Force ... Depending on the processes that will give the program codes will be divided and distributed in the same amount in each proccess. My pc which is a Core 2 can be opened 500 processes and work all at the same time. You also have the ability to set priority to processes that open. The max and the fastest is -20, of course I do not think you will be able to open multiple processes, all with precedence -20.I suggest from -5 to -10 protairotita not to take any hand cpu.traducere din greaca in engleza via google translate.<?phpset_time_limit(0);class dbfa { var $length = 4; var $charset = "qwertyuiopasdfghjklzxcvbnm0123456789"; var $hash = "81dc9bdb52d04dc20036dbd8313ed055"; //md5 var $processes = 15; var $proccess_priority = -9; //-20 is the fastest but will cause problems in case you open too many processesfunction start(){ $this->time_start = microtime(true); $charset_length = strlen($this->charset); //Count Charset Length $total_combinations = pow($charset_length,$this->length); //Total Passes Combinations $passwords_each_proccess = floor( $total_combinations / $this->processes ); for ( $i = 0; $i < $this->processes; $i++ ) $start_pass_combination_number[$i] = $passwords_each_proccess * $i; $start_pass_combination_number[$i] = $total_combinations; for( $i = 0; $i < $this->processes; $i++) $this->start_pass_combination[$i] = $this->get_combination_by_number($start_pass_combination_number[$i]); $this->start_pass_combination[$i] = $this->get_combination_by_number($start_pass_combination_number[$i]-1); echo "Total Pass Combinations: " . $total_combinations; echo "\nProcesses: " . $this->processes; echo "\nPasswords For Each Proccess: " . $passwords_each_proccess; echo "\nPass Length: " . $this->length; echo "\nCharset: " . $this->charset; echo "\nMD5 Hash: " . $this->hash; echo "\n\n"; print_r($this->start_pass_combination); $this->open_processes();}function open_processes(){ $this->pids = array(); for($i = 0; $i < $this->processes; $i++) { $this->pids[$i] = pcntl_fork(); if(!$this->pids[$i]) { $this->give_as_much_as_you_can(getmypid()); //MAke Proccess FAster!! echo $i + 1 . " Proccess with PID " . getmypid() . " Started!!\n"; //pcntl_setpriority(20,getmypid()); $pass = $this->start_pass_combination[$i]; while($pass != $this->start_pass_combination[$i + 1]) { if(md5($pass) == $this->hash) { echo "\n\nHash Cracked!! Pass is: " . $pass . "\n\n"; $this->count_time(); $this->kill_all_childs(); } $pass = $this->next_pass( $pass ) ; } posix_kill(getmypid(),9); } } $this->jombiec();}function kill_all_childs(){ foreach ( $this->pids as $pid ) { posix_kill( $pid, 9 ); }}function jombiec(){ for ( $i = 0; $i < $this->processes; $i++ ) //edo thetoyme enan vronxo elenxoy gia to an ena ena ola ta child termatisan epitixos kai oti den exoyme zombi pcntl_waitpid( $this->pids[$i], $status, WUNTRACED ); //edo ektelite i function poy kani ton elenxo $this->count_time(); exit();} function count_time(){ $time_end = microtime(true); $time = $time_end - $this->time_start; echo "\n\nCompleted In: " . $time." Seconds\n\n";}function get_combination_by_number($number){ $pass = ""; $charset_length = strlen($this->charset); for($i = 0; $i < $this->length; $i++) { $temp = floor($number / $charset_length); $temp1 = $number % $charset_length; $pass .= $this->charset{$temp1}; $number = $temp; } $pass_out = ""; for($i = 1; $i <= $this->length; $i++) $pass_out .= $pass{strlen($pass) - $i}; return $pass_out;}function give_as_much_as_you_can($pid){ //Make Proccess Working Really Fast... return system("sudo /usr/bin/renice ".$this->proccess_priority." -p $pid") != false;}function next_pass( $pass, $pos = 1 ){ $offset = strlen( $pass ) - $pos; if ( $offset == -1 ) { //did all passwords in current length, increasing length. $pass{$offset + 1} = substr( $this->charset, 0, 1 ); $pass .= substr( $this->charset, 0, 1 ); } else { $char = $pass{$offset}; $charset_pos = strpos( $this->charset, $char ) + 1; if ( $charset_pos == strlen($this->charset) ) { //offset char reached end of charset, moving up one. $pass{$offset} = substr( $this->charset, 0, 1 ); $pass = $this->next_pass( $pass, $pos + 1 ); } else { //incrementing offset char. $pass{$offset} = substr( $this->charset, $charset_pos, 1 ); } } return $pass;}}$crack = new dbfa;$crack->start();?>source : PHP Distributed Brute Force Attack v2 Final - p0wnBox.com | root@p0wnbox:~# Quote