-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrun.php
192 lines (171 loc) · 6.51 KB
/
run.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<?php
// Ilyasa Fathur Rahman
// SGB-Team Reborn
set_time_limit(0);
error_reporting(0);
function generateRandomString($length = 10) {
$characters = '0123456789abcdefghijklmnopqrstuvwxyz';
$charactersLength = strlen($characters);
$randomString = '';
for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, $charactersLength - 1)];
}
return $randomString;
}
function generateRandomNumber($length = 10) {
$characters = '0123456789';
$charactersLength = strlen($characters);
$randomString = '';
for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, $charactersLength - 1)];
}
return $randomString;
}
function correct($nomor){
$cek = substr($nomor,0,1);
if($cek == "1"){
$kode_negara = "1";
$nomor = substr($nomor,1,15);
}else if($cek == "6"){
$kode_negara = "62";
$nomor = substr($nomor,2,15);
}
return array($kode_negara, $nomor);
}
echo '####################################';
echo "\r\n";
echo '# Copyright : @ilyasa48 | SGB-Team #';
echo "\r\n";
echo '####################################';
echo "\r\n";
echo "\r\n";
echo 'Masukkan Kode Referral : ';
$referral = trim(fgets(STDIN));
echo 'Masukkan Jumlah : ';
$jumlah = trim(fgets(STDIN));
$i=1;
while($i <= $jumlah){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://api.yodorun.com/sport/v2/get_invite_code');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "user_id=$referral&language=id");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');
$headers = array();
$headers[] = 'Host: api.yodorun.com';
$headers[] = 'User-Agent: okhttp/3.9.1';
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
$json_data = json_decode($result);
echo "\r\n";
echo "\r\n";
echo "####################################";
echo "\r\n";
echo "Informasi Referral";
echo "\r\n";
echo "Jumlah Referral : ".$json_data->data->invite_num."";
echo "\r\n";
echo "Jumlah Hadiah : Rp ".$json_data->data->total_reward."";
echo "\r\n";
echo '####################################';
echo "\r\n";
echo "\r\n";
echo "\r\n";
echo "\r\n";
$sign = generateRandomString(27);
$device_id = generateRandomString(16);
$type = generateRandomNumber(5);
$android_id = generateRandomNumber(15);
echo 'Gunakan Kode Negara Di Awal!';
echo "\r\n";
echo 'Masukkan Nomor (62/1) : ';
$phone_number = trim(fgets(STDIN));
$phone_number = correct($phone_number);
$kode_negara = $phone_number[0];
$phone_number = $phone_number[1];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://api.yodorun.com/sport/login/phone/upload');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "screen_densityDpi=240&sdk=22&sign=$sign=&source=android_app&country_code=+$kode_negara&phone=$phone_number&screen_density=1.5&client_user_id=-1&os=5.1.1&screen_height=1280&device_id_type=1&yd_network_status=9&device_id=$device_id&xyy=&local_date=2019-03-28&language=id&screen_width=720&phone_type=samsung_sm-n$type_5.1.1&channel=channel_googleplay_abroad&ver=4.2.2.0.9&android_id=$android_id");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');
$headers = array();
$headers[] = 'Host: api.yodorun.com';
$headers[] = 'User-Agent: okhttp/3.9.1';
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
$register = json_decode($result);
if(!$register->code == "0"){
echo "[$i] [".date('h:i:s')."] Terjadi Kesalahan, $register->msg";
echo "\r\n";
exit();
}
ulang_otp:
echo 'Masukkan OTP : ';
$otp = trim(fgets(STDIN));
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://api.yodorun.com/sport/login/phone/verify');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "screen_densityDpi=240&sdk=22&sign=$sign&source=android_app&country_code=+$kode_negara&phone=$phone_number&screen_density=1.5&client_user_id=-1&os=5.1.1&code=$otp&screen_height=1280&device_id_type=1&yd_network_status=9&device_id=$device_id&xyy=&local_date=2019-03-28&language=id&screen_width=720&phone_type=samsung_sm-n$type_5.1.1&channel=channel_googleplay_abroad&ver=4.2.2.0.9&android_id=$android_id");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');
$headers = array();
$headers[] = 'Host: api.yodorun.com';
$headers[] = 'User-Agent: okhttp/3.9.1';
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
$get_otp = json_decode($result);
if($get_otp->msg == "Phone or code not correct"){
echo "[$i] [".date('h:i:s')."] Kode OTP Salah, Mengulang...";
echo "\r\n";
goto ulang_otp;
}else if(!preg_match('/code": 0/', $result)) {
echo "[$i] [".date('h:i:s')."] Terjadi Kesalahan, $get_otp->msg";
echo "\r\n";
exit();
}
$user_id = $get_otp->user_info->user_id;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://api.yodorun.com/sport/v2/upload_invite_code');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "user_id=$user_id&code=$referral&language=id");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');
$headers = array();
$headers[] = 'Host: api.yodorun.com';
$headers[] = 'User-Agent: okhttp/3.9.1';
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
$finish = json_decode($result);
if($finish->msg == "Invalid invite code"){
echo "[$i] [".date('h:i:s')."] Referral Kode Salah, Berhenti...";
exit();
}else if($finish->code == "0"){
echo "[$i] [".date('h:i:s')."] Berhasil, $finish->msg";
echo "\r\n";
}else if(!$finish->code == "0"){
echo "[$i] [".date('h:i:s')."] Terjadi Kesalahan, $finish->msg";
exit();
}
$i++;
}