Programalama > C#

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
public string KillSqlInjectionWords(string WithBadChars)
{
      string [] SqlInjectionKeywords = {    "select",
                                                                   "drop",
                                                                   ";",
                                                                   "--",
                                                                   "insert",
                                                                   "delete",
                                                                    "xp_",
                                                                    "sp_",
                                                                    "exec",
                                                                     "'"
                                          };           
     string WithoutBadChars = "" ;
     for (int i = 0; i < SqlInjectionKeywords.Length; i++)
        {
WithoutBadChars = WithBadChars.Replace(SqlInjectionKeywords[i],"");
WithBadChars = WithoutBadChars ;
        }
    return WithoutBadChars;
}


Yorumlar                 Yorum Yaz
Bu hazır kod'a ilk yorumu siz yapın!
KATEGORİLER
ASP - 240
ASP.NET - 24
C# - 75
C++ - 174
CGI - 8
DELPHI - 247
FLASH - 49
HTML - 536
PASCAL - 246
PERL - 11
PHP - 160
WML - 9
XML - 2
Copyright © 2002 - 2025 Hazır Kod - Tüm Hakları Saklıdır.
Siteden yararlanırken gizlilik ilkelerini okumanızı tavsiye ederiz.
hazirkod.com bir İSOBİL projesidir.