Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /// Hashcat Converter v1.0 ///
- /// Copyright 2011 by Neo ///
- /// - www.xattack.co.nr - ///
- header("Content-Type: text/plain");
- $source = "source.txt";
- $target = "target.rule";
- echo "Initialising $source...\n";
- if ( file_exists("$source") ) {
- $file = str_replace(" ","",file_get_contents("$source"));
- $file = str_replace("\r","","$file");
- $row = explode("\n","$file");
- /// Hauptschleife ///
- echo "Converting...\n";
- for($i=0;$i<count($row);$i++) {
- $cur="$row[$i]";
- $c=strlen($cur)-1;
- while($c!=-1){
- $output .= "^$cur[$c]"; $c--;
- }
- if ( $i != count($row)-1 ) {
- $output .= "\n";
- }
- }
- /// Ausgabe in .rule Datei ///
- $h=fopen("$target","w");
- fwrite($h,"$output");
- fclose($h);
- echo "All Done...";
- } else {
- echo "Error: $source not found...";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment