-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathrun.php
More file actions
161 lines (140 loc) · 5.91 KB
/
run.php
File metadata and controls
161 lines (140 loc) · 5.91 KB
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
<?php
require "func.php";
$key = "#####"; // Isi apikey kalian disini
$sms = new SMSActivate($key);
echo color('blue', "[+]")." =============================\n";
echo color('blue', "[+]")." SMS-Active.ru - By: GidhanB.A\n";
echo color('blue', "[+]")." =============================\n";
echo color('blue', "[+]")." 1. Cek Saldo\n";
echo color('blue', "[+]")." 2. Order Nomer Gojek\n";
echo color('blue', "[+]")." 3. Keluar\n";
echo color('blue', "[+]")." =============================\n";
echo color('blue', "[+]")." Silahkan pilih: ";
$tools = trim(fgets(STDIN));
echo "\n";
if ($tools == 1) {
$saldo = $sms->getBalance();
echo color('green', "[+]")." Sisa saldo: $saldo ₽\n";
} else if ($tools == 2) {
echo color('blue', "[+]")." Order Nomer Gojek (Indosat Ooredoo)\n";
Start:
$getnum = $sms->getNumber("ni",6,0,"indosat");
if (is_array($getnum)) {
$id = $getnum["id"];
$num = $getnum["number"];
echo color('green', "[+]")." Nomer Hp: 0".substr($num,2)."\n";
echo color('yellow', "[+]")." Cek Status => ";
$headers = array();
$headers[] = 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0';
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
$cek = curl('https://swappery.site/gojek/', 'phone=0'.substr($num,2).'&submit=', $headers);
if (strpos($cek[1], 'Nomor siap pakai')) {
echo color('green', "Nomor siap pakai!\n");
echo color('blue', "[+]")." Tekan enter untuk menerima otp..";
$y = trim(fgets(STDIN));
$status = $sms->setStatus($id,1);
$pin = false;
OTP:
echo color('yellow', "[+]")." Menunggu OTP ";
$aww = 0;
do {
$cek = curl('https://sms-activate.ru/stubs/handler_api.php', 'action=getCurrentActivationsDataTables&api_key='.$key.'&order=id&orderBy=asc&start=0&length=10', $headers);
$code = json_decode($cek[1])->array[0]->code;
$aww++;
if ($aww == 10) {
echo ".";
$aww = 0;
}
} while (strlen($code) !== 4);
if ($pin) $code = get_between(base64_decode(json_decode($cek[1])->array[0]->moreSms), 'OTP: ', ' gojek.com');
echo color('green', " [$code]\n");
if ($pin == false) {
echo color('blue', "[+]")." Mau setpin? (y/n): ";
$yn = trim(fgets(STDIN));
if ($yn == "n") {
$status = $sms->setStatus($id,6);
echo color('green', "[+]")." Terima kasih!\n";
} else {
$status = $sms->setStatus($id,3);
$pin = true;
goto OTP;
}
} else {
$status = $sms->setStatus($id,6);
}
} else {
echo color('red', "Nomor telah terdaftar!\n");
$status = $sms->setStatus($id,8);
goto Start;
}
} else {
die($getnum);
}
} else {
die();
}
class SMSActivate {
private $url = 'https://sms-activate.ru/stubs/handler_api.php';
private $apiKey;
public function __construct($apiKey) {
$this->apiKey = $apiKey;
}
public function getBalance() {
return $this->request(array('api_key' => $this->apiKey, 'action' => __FUNCTION__), 'GET');
}
public function getNumber($service, $country = null, $forward = 0, $operator = null, $ref = null){
$requestParam = array('api_key' => $this->apiKey,'action' => __FUNCTION__,'service' => $service,'forward'=>$forward);
if($country){
$requestParam['country']=$country;
}
if($operator &&($country==0 || $country == 1 || $country == 2)){
$requestParam['service'] = $operator;
}
if($ref){
$requestParam['ref'] = $ref;
}
return $this->request($requestParam, 'POST',null,1);
}
public function setStatus($id, $status, $forward = 0){
$requestParam = array('api_key' => $this->apiKey,'action' => __FUNCTION__,'id' => $id,'status' => $status);
if($forward){
$requestParam['forward'] = $forward;
}
return $this->request($requestParam,'POST',null,3);
}
private function request($data, $method, $parseAsJSON = null, $getNumber = null) {
$method = strtoupper($method);
if (!in_array($method, array('GET', 'POST')))
throw new InvalidArgumentException('Method can only be GET or POST');
$serializedData = http_build_query($data);
if ($method === 'GET') {
$result = file_get_contents("$this->url?$serializedData");
} else {
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => $serializedData
)
);
$context = stream_context_create($options);
$result = file_get_contents($this->url, false, $context);
}
if ($parseAsJSON)
return json_decode($result,true);
$parsedResponse = explode(':', $result);
if ($getNumber == 1) {
$returnNumber = array('id' => $parsedResponse[1], 'number' => $parsedResponse[2]);
return $returnNumber;
}
if ($getNumber == 2) {
$returnStatus = array('status' => $parsedResponse[0], 'code' => $parsedResponse[1]);
return $returnStatus;
}
if ($getNumber == 3) {
$returnStatus = array('status' => $parsedResponse[0]);
return $returnStatus;
}
return $parsedResponse[1];
}
}