putunebandi / php-security-plugin

This project is a simple implementation to improve security in PHP applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

php-security-plugin

made-with-PHP license issues

BandiSecurity Logo

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."

Resources

Installation

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.

Usage

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.

  1. Using .htaccess
php_value auto_prepend_file '/home/putunebandi/php-security-plugin/BandiSecurity.php'
  1. Using include_once() or require_once()
<?php
// ...
include_once('BandiSecurity.php');
// or use
require_once('BandiSecurity.php');
// ...
?>
  1. 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
?>

License

Please see the LICENSE file for more information.

Thanks

Thanks for some references and ideas for making this tool

About

This project is a simple implementation to improve security in PHP applications.

License:MIT License


Languages

Language:PHP 100.0%