Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Barabajagal on November 01, 2007, 07:42 PM

Title: How To: Beat the Censor
Post by: Barabajagal on November 01, 2007, 07:42 PM
Since everyone thought my last how to was useless, here's a more useless one. How to beat the BNet public channel censor:

Public Function DeCensor(ByVal strMessage As String) As String
Dim Caps As Boolean
    If strMessage = UCase$(strMessage) Then Caps = True
    If strMessage = LCase$(strMessage) Then Caps = False
    strMessage = Replace$(strMessage, "!&$%@", "pussy")
    strMessage = Replace$(strMessage, "!&$%", "fuck")
    strMessage = Replace$(strMessage, "$!@%", "shit")
    strMessage = Replace$(strMessage, "@$%!@%&", "asshole")
    strMessage = Replace$(strMessage, "@$%!@!&", "asswipe")
    strMessage = Replace$(strMessage, "$%$", "kkk")
    strMessage = Replace$(strMessage, "#@%$!", "bitch")
    strMessage = Replace$(strMessage, "!@!#&", "whore")
    strMessage = Replace$(strMessage, "!@!@%&", "nipple")
    strMessage = Replace$(strMessage, "!&!@$", "penis")
    strMessage = Replace$(strMessage, "$!$%", "cock")
    strMessage = Replace$(strMessage, "!@!@&#", "nigger")
    strMessage = Replace$(strMessage, "!@!@#", "nigga")
    strMessage = Replace$(strMessage, "$%&%", "slut")
    strMessage = Replace$(strMessage, "!@!@!@", "vagina")
    strMessage = Replace$(strMessage, "$&!%", "cunt")
    strMessage = Replace$(strMessage, "$%@%", "clit")
    strMessage = Replace$(strMessage, "&#&$%", "erect")
    strMessage = Replace$(strMessage, "%@$%", "dick")
    strMessage = Replace$(strMessage, "!#!@$&", "orgasm")
    strMessage = Replace$(strMessage, "$!@!$", "chink")
    strMessage = Replace$(strMessage, "!@!$", "gook")
    strMessage = Replace$(strMessage, "&@$%&#$@%", "masturbat")
    strMessage = Replace$(strMessage, "!@!@!%", "faggot")
    strMessage = Replace$(strMessage, "$%&!", "klux")
    strMessage = Replace$(strMessage, "$@$&", "kyke")
    strMessage = Replace$(strMessage, "%&$#@#!", "lesbian")
    strMessage = Replace$(strMessage, "%@%&!", "dildo")
    If Caps Then
        DeCensor = UCase$(strMessage)
    Else
        DeCensor = strMessage
    End If
End Function
Title: Re: How To: Beat the Censor
Post by: Yegg on November 01, 2007, 07:49 PM
Correct me if I'm wrong, but hasn't this been done a million times before? I think I even remember seeing this in VaporBot source.
Title: Re: How To: Beat the Censor
Post by: Barabajagal on November 01, 2007, 08:01 PM
Quite possibly. I went through and found them all myself manually, though (didn't have asswipe for two years, either! Didn't realize it was censored cause nobody says it). Also, the way I detect caps could probably improved by using a method other than replace and detecting what the case of the letters around the censored word are.
Title: Re: How To: Beat the Censor
Post by: Barabajagal on November 01, 2007, 09:25 PM
Apparently an alternate spelling of Kike. They both become the same censor.
Title: Re: How To: Beat the Censor
Post by: Barabajagal on November 01, 2007, 09:50 PM
It's pretty much an obscure slander word for a Jew.
Title: Re: How To: Beat the Censor
Post by: iNsaNe on November 01, 2007, 09:55 PM
why don't u just set strMessage to upper or lower so you avoid case sensitivity all together?

--edit:

lol @ nipple censor
Title: Re: How To: Beat the Censor
Post by: Yegg on November 01, 2007, 10:02 PM
Looking through the list, I noticed that "erect" is a censored word... lol.
Title: Re: How To: Beat the Censor
Post by: Barabajagal on November 02, 2007, 12:31 AM
uh... you mean set all incoming messages to lowercase always? That's not correct emulation at all, now is it?

And ya, Erect is stupid, and so is Dick and Cock. Every time I try to play Led Zeppelin's Moby Dick,  I get Moby %@$%. And poor Joe Cocker and Bruce Cockburn both get defaced :(
Title: Re: How To: Beat the Censor
Post by: Chriso on November 02, 2007, 12:34 AM
Haha @ Moby Dick, good little function I suppose, could be a nice feature.. :)
Title: Re: How To: Beat the Censor
Post by: iNsaNe on November 02, 2007, 12:39 AM
Quote from: Hands of a Government Man on November 02, 2007, 12:31 AM
uh... you mean set all incoming messages to lowercase always? That's not correct emulation at all, now is it?

no you interpreted it wrong, set the variable to lowercase to avoid case sensitivty in the function when comparing the 2 strings. you would need 2 different variables

the way his function is written is  ???

edit:

now that i think of it, the best way (i can think of) is to split strMessage by the space character. After doing so, loop through each dimension of the array. If the current dimension (in upper or lower case) equals the "bad word" (in upper or lower case), then replace it with the filter. After going through the array, join all the dimensions back together with the space between.

it's not great, but it works
Title: Re: How To: Beat the Censor
Post by: Chriso on November 02, 2007, 01:04 AM
Splitting it by space wouldn't work, what if someone said cockfag instead of just "cock" or "fag" nothing would happen...
Title: Re: How To: Beat the Censor
Post by: Barabajagal on November 02, 2007, 01:31 AM
The best way to get cases correctly is to go through the entire string in a loop, look for Mid$(strMessage, I, 4) = "!&$%", check what case Mid$(strMessage, I - 1, 1) and Mid$(strMessage, I  + 5, 1) are (checking to make sure they're not spaces, and going one step further if they are, repeated), and set the case to that.

Also, if I recall, Chriso, I posted all these on Brutalnet and you added it to Mirage chat as well ;D
Title: Re: How To: Beat the Censor
Post by: rabbit on November 02, 2007, 08:09 AM
Also note that if a message is ONLY a censored word, your function will assume it's uppercase.
Title: Re: How To: Beat the Censor
Post by: Spht on November 02, 2007, 10:38 AM
Quote from: iNsaNe on November 01, 2007, 09:55 PM
why don't u just set strMessage to upper or lower so you avoid case sensitivity all together?

It's not an issue of case sensitivity. He's trying to determine the caps of the censored word to begin with, which is not only impossible, but rather redundant to even guess
Title: Re: How To: Beat the Censor
Post by: Barabajagal on November 02, 2007, 02:20 PM
Rabbit, the current function I wrote does NOT assume it's upper case. Try it.
Title: Re: How To: Beat the Censor
Post by: Leaky on November 02, 2007, 06:43 PM
is it just me being blind... as far as i can tell that function will ALWAYS assume lowercase.... really it's completly pointless to do the caps o.O especially since it's not used.. anywhere (i might be blind iuno)
Title: Re: How To: Beat the Censor
Post by: Barabajagal on November 02, 2007, 06:57 PM
It only capitalizes the censored words if the entire rest of the text in the variable is capitalized.
Title: Re: How To: Beat the Censor
Post by: UserLoser on November 03, 2007, 04:35 AM
Thanks but not really.  Please contribute useful things
Title: Re: How To: Beat the Censor
Post by: Barabajagal on November 03, 2007, 04:41 AM
Why? Nobody else does.
Title: Re: How To: Beat the Censor
Post by: rabbit on November 03, 2007, 09:35 AM
You didn't even read what I said.  VB treats ~!@#$%^&*()_+ as uppercase characters, thus
Quote from: rabbit on November 02, 2007, 08:09 AM
if a message is ONLY a censored word, your function will assume it's uppercase.
Title: Re: How To: Beat the Censor
Post by: Barabajagal on November 03, 2007, 04:08 PM
Try it yourself if you don't believe me.
Title: Re: How To: Beat the Censor
Post by: iNsaNe on November 03, 2007, 04:56 PM
Quote from: Chriso.de on November 02, 2007, 01:04 AM
Splitting it by space wouldn't work, what if someone said cockfag instead of just "cock" or "fag" nothing would happen...

cockfag wouldnt be censored by battle net
Title: Re: How To: Beat the Censor
Post by: Mystical on November 03, 2007, 05:06 PM
It's not cencsored but you can't make the account :D
Title: Re: How To: Beat the Censor
Post by: Barabajagal on November 03, 2007, 05:08 PM
Uh... it'd be $!$%fag.
Title: Re: How To: Beat the Censor
Post by: Mystical on November 03, 2007, 05:37 PM
hmm...?

(http://i54.photobucket.com/albums/g116/siklife/cockfag.jpg)
Title: Re: How To: Beat the Censor
Post by: Leaky on November 03, 2007, 05:44 PM
Quote from: MyStiCaL on November 03, 2007, 05:37 PM
hmm...?

(http://i54.photobucket.com/albums/g116/siklife/cockfag.jpg)


hmmm bnet trivia

do private channels have censoring?
answer: no

also you don't see the censoring your self everyone else does
Title: Re: How To: Beat the Censor
Post by: Barabajagal on November 03, 2007, 06:31 PM
Perfect for this forum, isn't it?
Title: Re: How To: Beat the Censor
Post by: Chriso on November 03, 2007, 06:33 PM
Haha yeah, say it in a public channel and view it on another bot (or have a bot say it)... I can't remember if whispers are censored or not, someone want to test that out?
Title: Re: How To: Beat the Censor
Post by: Barabajagal on November 03, 2007, 06:40 PM
Whispers are not censored. I know all about this stuff, since I've always been in public channels :P
Title: Re: How To: Beat the Censor
Post by: Chriso on November 03, 2007, 07:46 PM
Ahh true, perhaps bad design by Battle.Net? Since you can still swear at others regardless of if you are in a public channel or not?
Title: Re: How To: Beat the Censor
Post by: l2k-Shadow on November 03, 2007, 07:56 PM
Quote from: Chriso.de on November 03, 2007, 07:46 PM
Ahh true, perhaps bad design by Battle.Net? Since you can still swear at others regardless of if you are in a public channel or not?

/ignore fixes that problem.
Title: Re: How To: Beat the Censor
Post by: Barabajagal on November 03, 2007, 08:28 PM
or /o igwhis... Nobody uses the option features, though. And no, Chriso, it was intentional.
Title: Re: How To: Beat the Censor
Post by: Chriso on November 03, 2007, 10:39 PM
Just seems odd that swearing is only blocked in public channels though, I mean children could stumble into a private channel and get e-molested (in #sex) or e-abused.
Title: Re: How To: Beat the Censor
Post by: UserLoser on November 04, 2007, 01:38 AM
Quote from: Chriso.de on November 03, 2007, 10:39 PM
Just seems odd that swearing is only blocked in public channels though, I mean children could stumble into a private channel and get e-molested (in #sex) or e-abused.

#sex isn't/wasn't ever a channel on battle.net
Title: Re: How To: Beat the Censor
Post by: Kp on November 04, 2007, 11:04 AM
Censoring was not present in the original version of the software.  It was added after I had been on battle.net for several years.  I presume the decision to censor only public channels was driven by the fact that public channels are a landing zone and have no operator.  If someone is swearing in a private channel, the operator can remove that person.  If the operator refuses, the offended parties can move to a different private channel, and /whois will not allow you to follow them.  On the other hand, if you change public channels, the cursing entity can follow you easily.
Title: Re: How To: Beat the Censor
Post by: l2k-Shadow on November 04, 2007, 11:09 AM
Quote from: UserLoser on November 04, 2007, 01:38 AM
Quote from: Chriso.de on November 03, 2007, 10:39 PM
Just seems odd that swearing is only blocked in public channels though, I mean children could stumble into a private channel and get e-molested (in #sex) or e-abused.

#sex isn't/wasn't ever a channel on battle.net

perhaps not but

/j #sex
Title: Re: How To: Beat the Censor
Post by: Leaky on November 04, 2007, 01:49 PM
Quote from: l2k-Shadow on November 04, 2007, 11:09 AM
Quote from: UserLoser on November 04, 2007, 01:38 AM
Quote from: Chriso.de on November 03, 2007, 10:39 PM
Just seems odd that swearing is only blocked in public channels though, I mean children could stumble into a private channel and get e-molested (in #sex) or e-abused.

#sex isn't/wasn't ever a channel on battle.net

perhaps not but

/j #sex


LuLz he didn't say it was an invalid channel he meant it's not an actively used channel
Title: Re: How To: Beat the Censor
Post by: l2k-Shadow on November 04, 2007, 01:51 PM
Quote from: Leaky on November 04, 2007, 01:49 PM
Quote from: l2k-Shadow on November 04, 2007, 11:09 AM
Quote from: UserLoser on November 04, 2007, 01:38 AM
Quote from: Chriso.de on November 03, 2007, 10:39 PM
Just seems odd that swearing is only blocked in public channels though, I mean children could stumble into a private channel and get e-molested (in #sex) or e-abused.

#sex isn't/wasn't ever a channel on battle.net

perhaps not but

/j #sex


LuLz he didn't say it was an invalid channel he meant it's not an actively used channel

you might want to double check that information. it's full almost all the time on east.
Title: Re: How To: Beat the Censor
Post by: UserLoser on November 04, 2007, 02:59 PM
#sex isn't valid channel
Title: Re: How To: Beat the Censor
Post by: Leaky on November 04, 2007, 03:06 PM
Quote from: l2k-Shadow on November 04, 2007, 01:51 PM
Quote from: Leaky on November 04, 2007, 01:49 PM
Quote from: l2k-Shadow on November 04, 2007, 11:09 AM
Quote from: UserLoser on November 04, 2007, 01:38 AM
Quote from: Chriso.de on November 03, 2007, 10:39 PM
Just seems odd that swearing is only blocked in public channels though, I mean children could stumble into a private channel and get e-molested (in #sex) or e-abused.

#sex isn't/wasn't ever a channel on battle.net

perhaps not but

/j #sex


LuLz he didn't say it was an invalid channel he meant it's not an actively used channel

you might want to double check that information. it's full almost all the time on east.
i did double check it see /\ userlosers' post # is filtered out of the channel name :P invalid channel name it is it is
Title: Re: How To: Beat the Censor
Post by: l2k-Shadow on November 04, 2007, 03:10 PM
i was merely pointing out with my first post that /j #sex and /j sex are the same thing.
Title: Re: How To: Beat the Censor
Post by: Chriso on November 04, 2007, 07:05 PM
Sorry habit from IRC, yeah I meant /j sex
Title: Re: How To: Beat the Censor
Post by: Barabajagal on November 04, 2007, 10:14 PM
Sex on both west and east has always been popular, east often having 3 or more channels, with the first two often totally full. It's a bunch of idlers, with random quiet chat occasionally.
Title: Re: How To: Beat the Censor
Post by: UserLoser on November 05, 2007, 02:18 AM
Quote from: l2k-Shadow on November 04, 2007, 03:10 PM
i was merely pointing out with my first post that /j #sex and /j sex are the same thing.

Not on Battle.net
Title: Re: How To: Beat the Censor
Post by: Mystical on November 05, 2007, 02:21 AM
Quote from: UserLoser on November 05, 2007, 02:18 AM
Quote from: l2k-Shadow on November 04, 2007, 03:10 PM
i was merely pointing out with my first post that /j #sex and /j sex are the same thing.

Not on Battle.net

If you use "/join #sex" or "/join sex" on starcraft client they work the same.
Title: Re: How To: Beat the Censor
Post by: Yegg on November 05, 2007, 09:45 AM
Quote from: Hands of a Government Man on November 04, 2007, 10:14 PM
Sex on both west and east has always been popular, east often having 3 or more channels, with the first two often totally full. It's a bunch of idlers, with random quiet chat occasionally.

Last time I went in there (quite recently), it was packed with people actively chatting. So it's not always just idlers.
Title: Re: How To: Beat the Censor
Post by: UserLoser on November 05, 2007, 11:03 AM
Quote from: MyStiCaL on November 05, 2007, 02:21 AM
Quote from: UserLoser on November 05, 2007, 02:18 AM
Quote from: l2k-Shadow on November 04, 2007, 03:10 PM
i was merely pointing out with my first post that /j #sex and /j sex are the same thing.

Not on Battle.net

If you use "/join #sex" or "/join sex" on starcraft client they work the same.


Must be the client removing it, not Battle.net
Title: Re: How To: Beat the Censor
Post by: brew on November 05, 2007, 02:52 PM
Quote from: UserLoser on November 05, 2007, 11:03 AM
Quote from: MyStiCaL on November 05, 2007, 02:21 AM
Quote from: UserLoser on November 05, 2007, 02:18 AM
Quote from: l2k-Shadow on November 04, 2007, 03:10 PM
i was merely pointing out with my first post that /j #sex and /j sex are the same thing.

Not on Battle.net

If you use "/join #sex" or "/join sex" on starcraft client they work the same.


Must be the client removing it, not Battle.net

Battle.net filters out the # if it's the first character of the channel name. Go check yourself.
Title: Re: How To: Beat the Censor
Post by: Barabajagal on November 05, 2007, 03:23 PM
Quote from: Yegg on November 05, 2007, 09:45 AM
Quote from: Hands of a Government Man on November 04, 2007, 10:14 PM
Sex on both west and east has always been popular, east often having 3 or more channels, with the first two often totally full. It's a bunch of idlers, with random quiet chat occasionally.

Last time I went in there (quite recently), it was packed with people actively chatting. So it's not always just idlers.
Really? I haven't seen active chat in Sex on west or east in about 4 months. I don't check all that often, though.
Title: Re: How To: Beat the Censor
Post by: Mystical on November 05, 2007, 03:26 PM
Quote from: Hands of a Government Man on November 05, 2007, 03:23 PM
Quote from: Yegg on November 05, 2007, 09:45 AM
Quote from: Hands of a Government Man on November 04, 2007, 10:14 PM
Sex on both west and east has always been popular, east often having 3 or more channels, with the first two often totally full. It's a bunch of idlers, with random quiet chat occasionally.

Last time I went in there (quite recently), it was packed with people actively chatting. So it's not always just idlers.
Really? I haven't seen active chat in Sex on west or east in about 4 months. I don't check all that often, though.

I've never seen east channel sex dead since i've been on battle.net maybe when you get in the channel around 3-4 am its quite dead except Denial sittin in there callin every girl a man unless they send him pictures or call him LOL. other than that the channels ussally maxed out with a bunch of spam,
Title: Re: How To: Beat the Censor
Post by: Dale on November 05, 2007, 03:56 PM
Quote from: MyStiCaL on November 05, 2007, 03:26 PM
Quote from: Hands of a Government Man on November 05, 2007, 03:23 PM
Quote from: Yegg on November 05, 2007, 09:45 AM
Quote from: Hands of a Government Man on November 04, 2007, 10:14 PM
Sex on both west and east has always been popular, east often having 3 or more channels, with the first two often totally full. It's a bunch of idlers, with random quiet chat occasionally.

Last time I went in there (quite recently), it was packed with people actively chatting. So it's not always just idlers.
Really? I haven't seen active chat in Sex on west or east in about 4 months. I don't check all that often, though.

I've never seen east channel sex dead since i've been on battle.net maybe when you get in the channel around 3-4 am its quite dead except Denial sittin in there callin every girl a man unless they send him pictures or call him LOL. other than that the channels ussally maxed out with a bunch of spam,

lol
Title: Re: How To: Beat the Censor
Post by: Barabajagal on November 05, 2007, 04:18 PM
Quote from: MyStiCaL on November 05, 2007, 03:26 PM
Quote from: Hands of a Government Man on November 05, 2007, 03:23 PM
Quote from: Yegg on November 05, 2007, 09:45 AM
Quote from: Hands of a Government Man on November 04, 2007, 10:14 PM
Sex on both west and east has always been popular, east often having 3 or more channels, with the first two often totally full. It's a bunch of idlers, with random quiet chat occasionally.

Last time I went in there (quite recently), it was packed with people actively chatting. So it's not always just idlers.
Really? I haven't seen active chat in Sex on west or east in about 4 months. I don't check all that often, though.

I've never seen east channel sex dead since i've been on battle.net maybe when you get in the channel around 3-4 am its quite dead except Denial sittin in there callin every girl a man unless they send him pictures or call him LOL. other than that the channels ussally maxed out with a bunch of spam,

Ya, they're usually maxed out, but nobody's talking. Just bots and shit.
Title: Re: How To: Beat the Censor
Post by: UserLoser on November 05, 2007, 09:15 PM
Quote from: Hands of a Government Man on November 05, 2007, 04:18 PM
Quote from: MyStiCaL on November 05, 2007, 03:26 PM
Quote from: Hands of a Government Man on November 05, 2007, 03:23 PM
Quote from: Yegg on November 05, 2007, 09:45 AM
Quote from: Hands of a Government Man on November 04, 2007, 10:14 PM
Sex on both west and east has always been popular, east often having 3 or more channels, with the first two often totally full. It's a bunch of idlers, with random quiet chat occasionally.

Last time I went in there (quite recently), it was packed with people actively chatting. So it's not always just idlers.
Really? I haven't seen active chat in Sex on west or east in about 4 months. I don't check all that often, though.

I've never seen east channel sex dead since i've been on battle.net maybe when you get in the channel around 3-4 am its quite dead except Denial sittin in there callin every girl a man unless they send him pictures or call him LOL. other than that the channels ussally maxed out with a bunch of spam,

Ya, they're usually maxed out, but nobody's talking. Just bots and shit.

Usually you'll see Denial in there

edit: Just realized someone already said that, oops.
Title: Re: How To: Beat the Censor
Post by: moh.vze.com on November 13, 2007, 09:17 PM
It use to be "Ken" and "yoda" and chewbacca in there :(