zeroerr0r

Crack Zip File Using PHP

Aug 5th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.39 KB | None | 0 0
  1. <?php
  2. $zip = new ZipArchive();
  3. $zip->open("locked.zip");
  4.  
  5. $pass_file = fopen("pass.list", "rt");
  6.  
  7. while(($line = trim(fgets($pass_file))) !== false) {
  8.   if ($zip->setPassword($line) AND $zip->extractTo(__DIR__)) {
  9.     echo "\n=====================================\n";
  10.     echo "Password Matched: " . $line . "\n";
  11.     break;
  12.   } else {
  13.     echo "Trying... " . $line . "\n";
  14.   }
  15. }
Add Comment
Please, Sign In to add comment