omerfdmrl/security

Security Class

v2.1.11 2021-11-06 16:32 UTC

This package is auto-updated.

Last update: 2024-04-11 20:43:23 UTC


README

Advanced Security Class for Php

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

Features

  • Secure From XSS, CSRF, SQL Injection, BASE64, RFI, LFI, Command Injection, Block Suspicious Request Methods, Block Suspicious User Agents And Requests
  • Block exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source Functions
  • Advanced Encrypte - Decrypte
  • Undecryptable Encryption
  • Advanced WAF system

Install

run the following command directly.

$ composer require omerfdmrl/security

Example Usage

include 'vendor/autoload.php';

use Omerfdmrl\Security\Security;

$security = new Security;

// Default is: AES-128-ECB
$security->set_cipher('AES-128-ECB');

// Default is: md5(your-domain)
$security->set_key('My Secure Key');

// Default is: ['jpg','png','gif'] | Default refused extensions is: ['php','bat','']
$security->set_allowedExtension(array('jpg','png','gif'));

// Default is: _token
$security->set_tokenName('_token');

// Default is: getcwd() . '/.htaccess'
$security->set_htaccessPath(__DIR__ . '.htaccess');

// Default is: True,True,True,True,True | You must call waf() function
$security->waf(True,True,True,True,True);

Docs

Documentation page: Security Docs

Licence

MIT Licence

Contributing

  1. Fork it ( https://github.com/omerfdmrl/security/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • omerfdmrl Ömer Faruk Demirel - creator, maintainer