AcasaCalendarFAQMembriGrupuriInregistrareConectare

Distribuiţi | 
 

 Anti SQL Injection SCRIPT

Vezi subiectul anterior Vezi subiectul urmator In jos 
AutorMesaj
windows.XP
Senior
Senior
avatar

Sex : masculin
Mesaje Mesaje : 279
Data de inscriere Data de inscriere : 25/02/2011
Varsta Varsta : 20
Localizare Localizare : md/Cricova
Distractii Distractii : fotball!

MesajSubiect: Anti SQL Injection SCRIPT   Dum Feb 27, 2011 6:07 pm

Cod:
[color=#000000][color=#FF8000]// Anti-SQL Injection

[/color][color=#007700]function [/color][color=#0000BB]check_inject[/color][color=#007700]()

  {

    [/color][color=#0000BB]$badchars [/color][color=#007700]= array([/color][color=#DD0000]";"[/color][color=#007700], [/color][color=#DD0000]"'"[/color][color=#007700], [/color][color=#DD0000]"""[/color][color=#007700], [/color][color=#DD0000]"*"[/color][color=#007700], [/color][color=#DD0000]"DROP"[/color][color=#007700], [/color][color=#DD0000]"SELECT"[/color][color=#007700], [/color][color=#DD0000]"UPDATE"[/color][color=#007700], [/color][color=#DD0000]"DELETE"[/color][color=#007700], [/color][color=#DD0000]"-"[/color][color=#007700]);

 

    foreach([/color][color=#0000BB]$_POST [/color][color=#007700]as [/color][color=#0000BB]$value[/color][color=#007700])

    {

      if([/color][color=#0000BB]in_array[/color][color=#007700]([/color][color=#0000BB]$value[/color][color=#007700], [/color][color=#0000BB]$badchars[/color][color=#007700]))

      {

        die([/color][color=#DD0000]"SQL Injection Detected\n<br />\nIP: "[/color][color=#007700].[/color][color=#0000BB]$_SERVER[/color][color=#007700][[/color][color=#DD0000]'REMOTE_ADDR'[/color][color=#007700]]);

      **

      else

      {

        [/color][color=#0000BB]$check [/color][color=#007700]= [/color][color=#0000BB]preg_split[/color][color=#007700]([/color][color=#DD0000]"//"[/color][color=#007700], [/color][color=#0000BB]$value[/color][color=#007700], -[/color][color=#0000BB]1[/color][color=#007700], [/color][color=#0000BB]PREG_SPLIT_OFFSET_CAPTURE[/color][color=#007700]);

        foreach([/color][color=#0000BB]$check [/color][color=#007700]as [/color][color=#0000BB]$char[/color][color=#007700])

        {

          if([/color][color=#0000BB]in_array[/color][color=#007700]([/color][color=#0000BB]$char[/color][color=#007700], [/color][color=#0000BB]$badchars[/color][color=#007700]))

          {

            die([/color][color=#DD0000]"SQL Injection Detected\n<br />\nIP: "[/color][color=#007700].[/color][color=#0000BB]$_SERVER[/color][color=#007700][[/color][color=#DD0000]'REMOTE_ADDR'[/color][color=#007700]]);

          **

        **

      **

    **

  **
[/color][/color]
Sus In jos
Vezi profilul utilizatorului
Avatar Robotel
Doresti Reclama Ta Aici? Apasa aici la cel mai mic pret!
 

Anti SQL Injection SCRIPT

Vezi subiectul anterior Vezi subiectul urmator Sus 
Pagina 1 din 1

Permisiunile acestui forum:Nu puteti raspunde la subiectele acestui forum
 ::  ::   :: Scripturi-

xDmGPROAIMImage hosted by servimg.comUnrealGamers.orghttp://fg-z.ace.stShareImageDjTorinoCsGlobal4um, un forum despre orice
Comunitatea FreakCs.CoM4en3rgYIstetii
Creati un forum | © phpBB | Forum gratuit de suport | Contact | Semnaleaza un abuz | Poti avea un blog