Advertisement
Guest User

Untitled

a guest
Jun 8th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. <?php
  2. $dbhost = 'localhost';
  3. $dbuser = 'root';
  4. $dbpass = '';
  5.  
  6. $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
  7.  
  8. $dbname = 'cracking';
  9. mysql_select_db($dbname);
  10.  
  11. $try = "";
  12. $file = fopen("filtered.txt", "r") or exit("Unable to open file!");
  13.  
  14. while(!feof($file))
  15. {
  16. $try = fgets($file);
  17. $try = str_replace("\n","",$try);
  18. $hash = hash("SHA256", $try);
  19. $try = mysql_real_escape_string($try);
  20. $q = mysql_query("INSERT INTO sha256 (hash,password) VALUES ('$hash' , '$try' )");
  21. }
  22. fclose($file);
  23. echo "Done.";
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement