X-Attack

Hashcat Converter v1.0

Apr 29th, 2011
382
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.81 KB | None | 0 0
  1. <?php
  2. /// Hashcat Converter v1.0 ///
  3. /// Copyright 2011 by Neo  ///
  4. /// - www.xattack.co.nr -  ///
  5.  
  6. header("Content-Type: text/plain");
  7.  
  8. $source =   "source.txt";
  9. $target =   "target.rule";
  10.  
  11. echo "Initialising $source...\n";
  12. if ( file_exists("$source") ) {
  13.     $file = str_replace(" ","",file_get_contents("$source"));
  14.     $file = str_replace("\r","","$file");
  15.     $row = explode("\n","$file");
  16.  
  17.     /// Hauptschleife ///
  18.     echo "Converting...\n";
  19.     for($i=0;$i<count($row);$i++) {
  20.         $cur="$row[$i]";
  21.         $c=strlen($cur)-1;
  22.             while($c!=-1){
  23.                 $output .= "^$cur[$c]"; $c--;
  24.             }
  25.             if ( $i != count($row)-1 ) {
  26.                 $output .= "\n";
  27.             }
  28.     }
  29.  
  30.     /// Ausgabe in .rule Datei ///
  31.     $h=fopen("$target","w");
  32.     fwrite($h,"$output");
  33.     fclose($h);
  34.     echo "All Done...";
  35. } else {
  36.     echo "Error: $source not found...";
  37. }
  38. ?>
Advertisement
Add Comment
Please, Sign In to add comment