Protection against SQL Injection Attack

Category: ASP.NET - Miscellaneous

Below is a simple function that will give you some protection against an SQL Injection attempt. The sample script retrieves the form values entered into the textboxes 'txtUsername' and 'txtPassword' and assigns them to variables 'sUsername' and 'sPassword'. The next line of code calls the function IllegalChars and passes in the variables as parameters.The function IllegalChars holds an array of illegal characters and words, it loops through these checking for their presence against our variables using the InStr function. If any are present in either of our variables then IllegalChars returns False. In that scenario the visitor will be redirected to the file 'no_access.asp'. Date: 07 February, 2012


Sql Injection - Injection Attack - Asp Snippets - Sql - Injection - Attack

Homepage: http://www.codefixer.com

Developer: codefixer.com

License: Freeware

Operating System: Windows

Add a Comment

all are required fields

     
What do you think of this resource?

Select Your Rate:

Votes:0

 

Related Scripts Download

4guysfromrolla is Macintosh compatible.

developer Developer: http://www.4guysfromroll...
license License: Freeware
operating systems Operating System: Mac


Anti SQL Injection - XSS attacks script tries to prevent SQL Code injection and Cross Site Scripting attacks.

developer Developer: phpbuilder.com
license License: Freeware
operating systems Operating System: All


SQLIer takes an SQL Injection vulnerable URL and attempts to determine all the necessary information to build and exploit an SQL Injection hole by itself, requiring no user interaction at all (unless it can't guess the table/field names correctly).

developer Developer: bcable.net
license License: Freeware
operating systems Operating System: All


SQL injection digger is a program that looks for sql injections and common errors in websites.

developer Developer: files.rubyforge.vm.bytemark.co.uk
license License: Artistic License, GNU General Public License (GPL)
operating systems Operating System: Windows, Linux, Mac OS, BSD, Solaris


MembersPro allows you to easily create a secure password protected members area within your website.

developer Developer: codefixersoftware.com
license License: Freeware
operating systems Operating System: All


The VBScript Timer function returns the number of seconds that have elapsed since 12:00 AM (midnight).

developer Developer: codefixer.com
license License: Freeware
operating systems Operating System: All


Feedback form asp script is a basic feedback form script.

developer Developer: codefixer.com
license License: Freeware
operating systems Operating System: All


This is a very simple function that will return the number of words in a sentence.

developer Developer: codefixer.com
license License: Freeware
operating systems Operating System: Windows


The code will display the results from a database in alternate table row colors.

developer Developer: codefixer.com
license License: Freeware
operating systems Operating System: Windows