File-Directory-Browser

File & Directory Browser

Latest Version Maintenance Status License GitHub Issues GitHub Pull Requests Donate with PayPal Donate with Ko-fi Sponsor with GitHub GitHub Stars GitHub Forks GitHub Contributors


Bahasa Indonesia

File & Directory Browser adalah script PHP tunggal (single-file PHP script) yang aman, responsif, dan sangat ringan untuk menampilkan daftar file serta direktori. Dilengkapi dengan fitur pengurutan instan, pencarian real-time tanpa reload halaman, verifikasi hash file (CRC32, MD5, SHA-1) menggunakan sistem cache lokal, perlindungan ketat dari eksploitasi path traversal, proteksi folder berbasis password dengan bcrypt hashing, serta antarmuka modern bertema glassmorphic berbasis Bootstrap 5 dan Font Awesome 6.

English

File & Directory Browser is a security-hardened, highly responsive, and lightweight single-file PHP script designed to display file and directory lists. It features real-time search without reloading, instant sorting, file hash verification (CRC32, MD5, SHA-1) with a local caching mechanism, strict protection against path traversal attacks, bcrypt-secured password-protected folders, and a premium glassmorphic user interface built using Bootstrap 5 and Font Awesome 6.


User Interface

New

New UI

Old

Premium Glassmorphic Dark UI


Fitur Utama / Key Features

๐Ÿ‡ฎ๐Ÿ‡ฉ Bahasa Indonesia

๐Ÿ‡ฌ๐Ÿ‡ง English


Persyaratan / Requirements

Layanan / Requirement Versi Minimum / Minimum Version
PHP 8.0 atau lebih baru / or newer
PHP Extensions session, hash, json, pcre, spl
Web Server Apache (direkomendasikan / recommended), Nginx, Lighttpd, dll

Konfigurasi / Configuration

Buka file index.php untuk menyesuaikan setelan variabel berikut di bagian paling atas:

$browseDirectories      = true;                  // Mengizinkan penelusuran sub-direktori
$title                  = 'Index of ';   // Format judul halaman utama
$subtitle               = ' files';     // Format sub-judul halaman
$showDirectories        = true;                  // Menampilkan direktori
$showDirectoriesFirst   = true;                  // Mengurutkan direktori di posisi atas
$showHiddenFiles        = false;                 // Menyembunyikan/menampilkan file dot (.)
$dateFormat             = 'd-M-Y H:i';           // Format tanggal modifikasi file
$allowExternalSymlinks  = false;                 // Mengizinkan symlink ke luar root
$enableHashCache        = true;                  // Mengaktifkan penyimpanan cache hash file
$passwordSessionLifetime = 2400;                 // Durasi sesi login folder (detik)

Konfigurasi Proteksi Folder / Folder Password Configuration

// Generate bcrypt hash terlebih dahulu:
// php -r "echo password_hash('password_anda', PASSWORD_BCRYPT);"

$protectedFolders = [
    'nama-folder' => '$2y$12$hashBcryptAnda...',
];

โš ๏ธ PENTING: Jangan pernah menyimpan password plaintext. Selalu gunakan hasil password_hash().


Riwayat Perubahan / Changelog

Version 3.7 (18 Juli 2026 / July 18, 2026) โ€” Bug Fix, Security Hardening & Code Quality


Version 3.6 (18 Juli 2026 / July 18, 2026) โ€” Security Hardening, CSP Compliance & Performance Optimization


Version 3.5 (14 Juli 2026 / July 14, 2026) โ€” Premium Glassmorphic Dark Theme & Style Customization

Version 3.4 (14 Juli 2026 / July 14, 2026) โ€” URL Sanitizer, Rate-Limit, Quality Audits & UI Enhancement

Version 3.3 (13 Juli 2026 / July 13, 2026) โ€” Strict CSP Compliance, Readability Overhaul & Clean Layout

Version 3.2 (13 Juli 2026 / July 13, 2026) โ€” Security Hardening, Audit & UI Enhancement

Version 3.1 (13 Juli 2026 / July 13, 2026)

Version 3.0 (08 Juli 2026 / July 8, 2026)


Catatan Penting / Documentation Notes

[!IMPORTANT]

๐Ÿ‡ฎ๐Ÿ‡ฉ Bahasa Indonesia (DocNote)

  1. Hak Akses Direktori Cache: Pastikan direktori tempat script dijalankan memiliki izin tulis (write permission) agar script dapat membuat direktori .cache otomatis. Jika hak akses tidak tersedia, fitur penyimpanan cache hash akan dinonaktifkan demi keselamatan runtime.
  2. Dukungan SSL/HTTPS: Untuk keamanan optimal, jalankan script ini di lingkungan yang didukung HTTPS untuk menjamin enkripsi cookie sesi CSRF dan token transit.
  3. Pemblokiran File Sensitif: Secara bawaan, script memblokir file berekstensi seperti .php, .bat, .env, .sql, dan sejenisnya untuk mencegah eksekusi kode berbahaya serta kebocoran informasi kredensial.
  4. Password Folder โ€” Wajib Hash: Password untuk fitur proteksi folder TIDAK BOLEH disimpan dalam bentuk teks biasa (plaintext). Gunakan selalu hasil dari password_hash('password_anda', PASSWORD_BCRYPT). Jalankan perintah berikut untuk generate hash: php -r "echo password_hash('password_anda', PASSWORD_BCRYPT);".
  5. CSP & Inline Event Handler: Script ini menggunakan Content-Security-Policy berbasis nonce. Inline onclick="" attribute pada HTML akan diblokir oleh CSP โ€” semua event listener harus didaftarkan dalam <script nonce="..."> block.

๐Ÿ‡ฌ๐Ÿ‡ง English (DocNote)

  1. Cache Folder Permissions: Ensure that the directory where the script executes has write permissions so it can spawn the .cache folder automatically. If permissions are missing, hash caching will be bypassed gracefully to ensure execution.
  2. HTTPS/SSL Deployment: It is highly recommended to host this script under an SSL/HTTPS enabled domain to guarantee safe transit of session cookies and browser tokens.
  3. Exclusion of Sensitive Files: By default, critical file formats including .php, .bat, .env, .sql, and others are locked from being displayed or hashed to prevent unauthorized code execution and credential leakage.
  4. Folder Passwords โ€” Must Be Hashed: Folder protection passwords MUST NOT be stored as plaintext. Always use the output of password_hash('your_password', PASSWORD_BCRYPT). Generate a hash with: php -r "echo password_hash('your_password', PASSWORD_BCRYPT);".
  5. CSP & Inline Event Handlers: This script uses a nonce-based Content-Security-Policy. Inline onclick="" HTML attributes will be blocked by CSP โ€” all event listeners must be registered inside a <script nonce="..."> block.

Donation

Anda bebas untuk mengubah, mendistribusikan script ini untuk keperluan anda.

If you find this project helpful and would like to support it, please consider donating via https://www.paypal.me/alsyundawy or https://ko-fi.com/alsyundawy. Thank you for your support!

Jika Anda merasa terbantu dan ingin mendukung proyek ini, pertimbangkan untuk berdonasi melalui https://www.paypal.me/alsyundawy atau https://ko-fi.com/alsyundawy. Terima kasih atas dukungannya!

Jika Anda merasa terbantu dan ingin mendukung proyek ini, pertimbangkan untuk berdonasi melalui QRIS. Terima kasih atas dukungannya!

QRIS Donation

License

MIT License โ€” Copyright ยฉ 2026 HARRY DS ALSYUNDAWY โ€” ALSYUNDAWY IT SOLUTION

Note: Please retain credit to the original author (HARRY DS ALSYUNDAWY โ€” ALSYUNDAWY IT SOLUTION) if you use or modify this script. Attribution is appreciated but not legally required under the MIT License.


Alt