Guest User

login.php

a guest
Dec 5th, 2019
2,126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.54 KB | None | 0 0
  1. <?php
  2. error_reporting(1);
  3. echo "Auto Login Wifi ID\n";
  4. echo "Get Ip Dulu ...\n";
  5. echo "[1] Windows\n";
  6. echo "[2] Linux / Android\n";
  7. echo "Kamu Pake apa ? : ";
  8. $w = trim(fgets(STDIN));
  9. if ( $w == 1) {
  10. echo shell_exec("ipconfig");
  11. } else if($w == 2 ){
  12. echo shell_exec("ifconfig");
  13. }else {
  14. echo "heuhhh... Ngetik yg bner euyy";
  15. }
  16. echo "\nCopy Ip mu ksni : ";
  17. $myip = trim(fgets(STDIN));
  18. echo "\nMasukin List Wifi ID mu : ";
  19. $filenya = trim(fgets(STDIN));
  20. $makan = file_get_contents("http://www.msftconnecttest.com/redirect");
  21. $gw_id = preg_match_all('/gw_id=(.*?)&/', $makan, $hasilgw);
  22. $mac = preg_match_all('/client_mac=(.*?)&/', $makan, $hasilmac);
  23. $device = preg_match_all('/wlan=(.*?)&s/', $makan, $hasildevice);
  24. echo $makan;
  25. $gw = $hasilgw[1][0];
  26. $macc = $hasilmac[1][0];
  27. $devicee = $hasildevice[1][0];
  28. echo "\nGett Info....\n";
  29. sleep(3);
  30. $fn = fopen($filenya,"r");
  31.  
  32. while(! feof($fn)) {
  33.  
  34. $result = fgets($fn);
  35. $data = explode("|" , $result);
  36. $usernameku = $data[0];
  37. $passwordku = $data[1];
  38. // echo $usernameku." - ".$passwordku;
  39.  
  40. $ch = curl_init();
  41. $headers = [
  42. 'Content-Type: application/x-www-form-urlencoded; charset=utf-8',
  43. 'Host: welcome2.wifi.id',
  44. 'Referer: welcome2.wifi.id',
  45. 'User-Agent: PostmanRuntime/7.20.1'
  46. ];
  47. curl_setopt($ch, CURLOPT_URL,"https://welcome2.wifi.id/authnew/login/check_login.php?ipc=".$myip."&gw_id=".$gw."&mac=".$macc."&redirect=http://www.msftconnecttest.com/redirect&wlan=".$devicee."");
  48. curl_setopt($ch, CURLOPT_POST, 1);
  49. curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  50. curl_setopt($ch, CURLOPT_POSTFIELDS,
  51. 'username='.$usernameku.'@spin2&password='.$passwordku);
  52.  
  53. // curl_setopt($ch, CURLOPT_POSTFIELDS,
  54. // http_build_query(array('postvar1' => 'value1')));
  55. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  56.  
  57. $server_output = curl_exec($ch);
  58. echo $server_output;
  59. curl_close ($ch);
  60. $hasil = json_decode($server_output);
  61. if ($hasil->{"message"} == "Login Sukses") {
  62. echo "Get Akun......\n";
  63. sleep(3);
  64. echo "Sukses Login \n";
  65. break;
  66. } elseif ($hasil->{"message"} == "Invalid"){
  67. echo "Get Akun......\n";
  68. sleep(3);
  69. echo "Masukin password yg bner paokkk \n";
  70. } elseif ($hasil->{"message"} == "Login Gagal...[Silahkan lakukan koneksi kembali]l"){
  71. echo "Get Akun......\n";
  72. sleep(3);
  73. echo "Gagal Login , Periksa Koneksi Pastikan uda login eaaa \n";
  74. } else {
  75. echo "Get Akun......\n";
  76. sleep(3);
  77. $hasil;
  78. }
  79. }
  80. fclose($fn);
  81. ?>
Add Comment
Please, Sign In to add comment