Advertisement
Guest User

000webhost BruteForce

a guest
Nov 25th, 2018
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. <?php
  2. //===========CopyRight nih Tolo ajg Bangsd=============
  3. echo "Username : ";
  4. $user = trim(fgets(STDIN, 1024));
  5. echo "Password : ";
  6. $passwd = trim(fgets(STDIN, 1024));
  7. //===========CopyRight nih Tolo ajg Bangsd=============
  8.  
  9. //===========REQUEST METHOD=============
  10. $data = '{"action":"login","username":"'.$user.'","password":"'.$passwd.'"}';
  11. $ch = curl_init();
  12. curl_setopt($ch, CURLOPT_POST, true);
  13. curl_setopt($ch, CURLOPT_URL, 'https://files.000webhost.com/handler.php?action=login');
  14. curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
  15. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  16. curl_setopt($ch, CURLOPT_HEADER, 0);
  17. curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
  18. $res = curl_exec($ch);
  19. //===========REQUEST METHOD=============
  20.  
  21. //===========GET TITLE / Opsional=============
  22. $ch2 = curl_init();
  23. curl_setopt($ch2, CURLOPT_URL, 'https://files.000webhost.com/');
  24. curl_setopt($ch2, CURLOPT_RETURNTRANSFER, 1);
  25. curl_setopt($ch2, CURLOPT_HEADER, 0);
  26. $res2 = curl_exec($ch2);
  27. //===========GET TITLE / Opsional=============
  28.  
  29. //===========Info=============
  30. preg_match('/<title>(.*?)<\/title>/',$res2,$title);
  31. echo $title[1]."<br>";
  32. if (preg_match('/true/',$res)) {
  33. preg_match('/<title>(.*?)<\/title>/',$res,$f);
  34. echo "Sukses Login...<br><br>Response";
  35. echo "<br>=========================<br>";
  36. print_r($res);
  37. echo "<br>=========================<br>";
  38. } else {
  39. echo "Gagal Login Bos...<br>";
  40. }
  41. //===========Info=============
  42. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement