This project is a simple implementation to improve security in PHP applications. The Security class provides several basic security features, including setting security headers and filtering parameters to protect against potential attacks.
โ Disclaimer |
---|
This plugin is created solely for educational purposes and to provide an additional layer of security against cyber attacks. While it can help reduce risks, it is highly recommended to continue using a comprehensive Security Information and Event Management (SIEM) system for optimal protection. We explicitly state that we are not responsible for any illegal actions taken through the use of this plugin." |
You can use this security plugin easily by simply copying or download the code from the BandiSecurity.php and including the script into the main configuration or header file.
You can enhance the security layer of your PHP project by utilizing the 'Security' class. It offers easy integration and can be customized to meet your specific needs. Here's an example code snippet for implementation.
- Using .htaccess
php_value auto_prepend_file '/home/putunebandi/php-security-plugin/BandiSecurity.php'
- Using include_once() or require_once()
<?php
// ...
include_once('BandiSecurity.php');
// or use
require_once('BandiSecurity.php');
// ...
?>
- Adding Code to Main Configuration or Header
<?php
// Simple PHP Security Plugin
// Coded by Rizki Wahyu Pratama
// Thanks to Afrizal F.A, incrustwerush.org, @dwisiswant0, noobsec.org
if (!class_exists('Security')) {
class Security
{
// ...
// ...
}
Security::setHeaders();
Security::applySecurity();
}
?>
<?php
// Your config or header here
?>
Please see the LICENSE file for more information.
Thanks for some references and ideas for making this tool