It is a simple script to provide a simple login page for PHP. It is also configurable to have polymorphic features by randomizing view on client source code such as variable, spacing, capitalization and garbage code.
The code are PoC only. It is based on Zubrag.com code with extensive modification: http://www.zubrag.com/scripts/password-protect.php
NOTE: Lindung in Malay means Protect.
Just simply put the following code on top of your code:
<?php include "lindung.php"; ?>
And your page will be lock until user input a correct username/password.
The following are the settings you might change according to your needs:
/*
==============================================
Polymorphic settings
============================================== */
define('POLY_ON', true); // true=enable all features, false=disable all features
define('POLY_NEWLINE', false); // true=enable random multiline
define('POLY_SPACE', true); // true=enable random white spaces if found any single space
define('POLY_CAPITAL', true); // true=all character will be randomly in either upper or lower case
define('POLY_GARBAGE', true); // true=add multi line of random html tag, comments, etc.; Limited to newline only
NOTE: Please refer to the source code comments for more information about the usage.
- Add random spaces
- Add random capitalization
- Add random newline
- Add random hidden garbage code
- Random variable.
- Random cookie
- Minimalistic UI.
- Some browser may not support on certain types of randomization.
- Not tested on mobile phone. Expect some bugs.
- Not suitable for commercial usage. Need more secure approaches.
- Random capitalization letter may not work well on URL and hotlinks.
- Tested on PHP 5-5.6 only
- GNU General Public License v3.0
- Meh, feel free to modify and use.