Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > help someone fugging my site :(

Reply
Thread Tools

help someone fugging my site :(

 
 
mark r
Guest
Posts: n/a
 
      08-18-2007
i run a small big brother website www.neue.co.uk/bigbrother and every
so often someone comes in and posts something to my shoutbox that
kills the script and i get an error saying

Microsoft VBScript runtime error '800a000d'

Type mismatch: 'HTMLEncode'

/bigbrother/lesley.asp, line 120

i have a script that checks and replaces bad words and im wondering if
theyre trying to sql inject me or soemthing?

is there anything simple i can add into the 'bad words' checker that
would stop this happening? i.e. i know that to check for a quote mark
(") you can use something like """"""" but i dont know how many of
them to use lol.

my badwords checker is:

<%
Function ReplaceBadWords(InputComments)
Dim badChars, newChars, sLength, sAttachtoEnd, x, i
'create an array of bad words that should be filtered
badChars = array("rubbish", "crap", "****", "****", "****", "****ing",
"****", "dick", "*******s", "wank", "wanker", "bastard", "bitch",
[url=http://", "[/url]", "<a href="http://", "</a>", "<script", "</
script>" )
newChars = InputComments
'loop through our array of bad words
For i = 0 to uBound(badChars)
'get the length of the bad word
sLength=Len(badChars(i))
'we are going to keep the first letter of the bad word and replace all
the other
'letters with *, so we need to find out how many * to use
For x=1 to sLength-1
sAttachtoEnd=sAttachtoEnd & "*"
Next
'replace any occurences of the bad word with the first letter of it
and the
'rest of the letters replace with *
newChars = Replace(newChars, badChars(i), Left(badChars(i),1) &
sAttachtoEnd)
sAttachtoEnd=""
Next
ReplaceBadWords = newChars
End function
%>

thanks guys!

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASA 5505 site-site VPN - other site dynamic? SteveB Cisco 0 03-26-2009 01:48 PM
List of free web site design, web site backgrounds, web site layoutsresources cyber XML 1 12-25-2007 11:48 PM
Free web site design, web site backgrounds, web site layoutsresources cyber HTML 0 12-24-2007 04:26 PM
List of free web site design, web site backgrounds, web site layoutsresources cyber HTML 0 12-21-2007 03:47 PM
List of free web site design, web site backgrounds, web site layoutsweb sites cyber HTML 1 12-19-2007 09:07 AM



Advertisments