forked from kokonior/PHP-Projects
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Bintangpe.php
62 lines (59 loc) · 1.62 KB
/
Bintangpe.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
echo "[3] Request OTP : ";
reqotp:
$url = "https://api.lunarcrush.com/v2?data=auth&action=get-code&email=$email&key=$token";
$headers = array();
$headers[] = "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0";
$headers[] = "Accept: */*";
$headers[] = "Accept-Language: id,en-US;q=0.7,en;q=0.3";
$headers[] = "Accept-Encoding: gzip, deflate";
$headers[] = "Dnt: 1";
$headers[] = "Pragma: no-cache";
$headers[] = "Cache-Control: no-cache";
$headers[] = "Te: trailers";
$reqOTP = request($url, $data=null, $headers);
if(strpos($reqOTP, 'get-code')!==false)
{
echo "Sent!\n";
$id = getstr($reqOTP, '"id":"','"');
}
else if(strpos($reqOTP, 'Internal server error')!==false)
{
goto reqotp;
}
else
{
echo "Error!\n";
echo $reqOTP;
exit();
}
echo "OTP ? ";
$otp = trim(fgets(STDIN));
echo "[5] Try to Login : ";
login:
$url = "https://api.lunarcrush.com/v2?data=auth&action=login&challenge=$id&code=$otp&share=&referral=&key=$token";
$headers = array();
$headers[] = "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0";
$headers[] = "Accept: */*";
$headers[] = "Accept-Language: id,en-US;q=0.7,en;q=0.3";
$headers[] = "Accept-Encoding: gzip, deflate";
$headers[] = "Dnt: 1";
$headers[] = "Pragma: no-cache";
$headers[] = "Cache-Control: no-cache";
$headers[] = "Te: trailers";
$login = request($url, $data=null, $headers);
if(strpos($login, '"success":true')!==false)
{
echo "Success!\n\n";
echo "Key : $token\n";
}
else if(strpos($login, 'Internal server error')!==false)
{
goto login;
}
else
{
echo "Error!\n";
echo $login;
}
?>