Kod
<?php
addslashes($_GET['ajdi']);
htmlspecialchars($_GET['ajdi']);
strip_tags($_GET['ajdi']);
addslashes($_GET['ajdi']);
stripslashes($_GET['ajdi']);
if(!isset($_GET['ajdi'])) {
include"start.php"; }
else if ($_GET['ajdi']=='1') {
include"wstaw/me.php"; }
else if($_GET['ajdi']=='2') {
include"wstaw/sikret.php"; }
else if($_GET['ajdi']=='3') {
include"wstaw/nius.php"; }
else if($_GET['ajdi']=='5') {
include"wstaw/ziomki.php"; }
else if($_GET['ajdi']=='6') {
include"wstaw/kontakt.php"; }
else if($_GET['ajdi']=='7') {
include"wstaw/prodzekt.php"; }
else if($_GET['ajdi']=='8') {
include"wstaw/artikles.php"; }
else if($_GET['ajdi']=='9') {
include"wstaw/propsy.php"; }
else if($_GET['ajdi']=='4' && $_GET['nius']=='1') {
include"nius/n1.php"; }
else if($_GET['ajdi']=='4' && $_GET['nius']=='2') {
include"nius/n2.php"; }
else if(ereg('../', $_GET['ajdi'])) {
include"lfi.php"; }
else if(ereg('../', $_GET['artikles'])) {
include"lfi.php"; }
else if(ereg('../', $_GET['nius'])) {
include"lfi.php"; }
else if(ereg('http://', $_GET['ajdi'])) {
include"lfi.php"; }
else if(ereg('http://', $_GET['artikles'])) {
include"lfi.php"; }
else if(ereg('http://', $_GET['nius'])) {
include"lfi.php"; }
else if(ereg('union', $_GET['artikles'])) {
echo 'sqlite'; }
else if(ereg('union', $_GET['nius'])) {
echo 'sqlite'; }
else if(ereg('union', $_GET['ajdi'])) {
include"sql.php"; }
else{
include"shit.php"; }
?>
addslashes($_GET['ajdi']);
htmlspecialchars($_GET['ajdi']);
strip_tags($_GET['ajdi']);
addslashes($_GET['ajdi']);
stripslashes($_GET['ajdi']);
if(!isset($_GET['ajdi'])) {
include"start.php"; }
else if ($_GET['ajdi']=='1') {
include"wstaw/me.php"; }
else if($_GET['ajdi']=='2') {
include"wstaw/sikret.php"; }
else if($_GET['ajdi']=='3') {
include"wstaw/nius.php"; }
else if($_GET['ajdi']=='5') {
include"wstaw/ziomki.php"; }
else if($_GET['ajdi']=='6') {
include"wstaw/kontakt.php"; }
else if($_GET['ajdi']=='7') {
include"wstaw/prodzekt.php"; }
else if($_GET['ajdi']=='8') {
include"wstaw/artikles.php"; }
else if($_GET['ajdi']=='9') {
include"wstaw/propsy.php"; }
else if($_GET['ajdi']=='4' && $_GET['nius']=='1') {
include"nius/n1.php"; }
else if($_GET['ajdi']=='4' && $_GET['nius']=='2') {
include"nius/n2.php"; }
else if(ereg('../', $_GET['ajdi'])) {
include"lfi.php"; }
else if(ereg('../', $_GET['artikles'])) {
include"lfi.php"; }
else if(ereg('../', $_GET['nius'])) {
include"lfi.php"; }
else if(ereg('http://', $_GET['ajdi'])) {
include"lfi.php"; }
else if(ereg('http://', $_GET['artikles'])) {
include"lfi.php"; }
else if(ereg('http://', $_GET['nius'])) {
include"lfi.php"; }
else if(ereg('union', $_GET['artikles'])) {
echo 'sqlite'; }
else if(ereg('union', $_GET['nius'])) {
echo 'sqlite'; }
else if(ereg('union', $_GET['ajdi'])) {
include"sql.php"; }
else{
include"shit.php"; }
?>
to mój skrypt, troche go połatałem, działa następująco, w indexie jest funckja include z oto tym skryptem, a odnosniki wygladaja nastepujaco : index.php?ajdi=1.
Moje pytanie : czy da sie jakos zoptymalizowac ten skrypt? bo uciążliwe jest dodawanie w tym skrypcie ciagle nowego warunku if