?
Solved

Replace in sql injection script

Posted on 2011-09-20
3
Medium Priority
?
292 Views
Last Modified: 2012-05-12
Hi! I have an sql injection script that works fine. But if i want to replace one whole word by nothing and i write like this:

txtNew = replace(txtNew, "CAST", "")

Then the word CAST is replaced but you can still write cast or cAst for an example. How do i do if i want to relace the word and the relace should not care if it is a big or small letter?
0
Comment
Question by:MickeC
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 15

Expert Comment

by:pateljitu
ID: 36567127
Try this, uCase will convert string to UPPERCASE which will help replace function:

txtNew = replace(uCase(txtNew), "CAST", "")
0
 

Author Comment

by:MickeC
ID: 36567329
Thanks, but the the rest of the string also be in uppercase not just the word CAST.
0
 
LVL 15

Accepted Solution

by:
pateljitu earned 2000 total points
ID: 36567964
That is correct, try this please:

txtNew = replace(txtNew, "CAST", "", 1, -1, 1)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question