mIRC Home    About    Download    Register    News    Help

Print Thread
ASCII codes for Bold, Underline, Color, etc... #49456 14/09/03 07:29 PM
Joined: Sep 2003
Posts: 9
G
Gilthas Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Sep 2003
Posts: 9
Hi there!

We're trying to fix some holes in a language filter we have on our network.

Since the IRCd does not "know" the ASCII codes for text highlighting, it simply passes them through the filter and they can be used to evade it.

Does anyone know the specific ASCII codes for all of the various graphical highlighting methods in mIRC, that are sent to the IRCd?

We've tried a sniffer and a dump, but it all apears as "normal' text.

Any help would be appreciated!

Re: ASCII codes for Bold, Underline, Color, etc... #49457 14/09/03 07:58 PM
Joined: May 2003
Posts: 161
A
Ashkrynt Offline
Vogon poet
Offline
Vogon poet
A
Joined: May 2003
Posts: 161
Bold (ctrl-B) = $chr(2)
Color (ctrl-K) = $chr(3)
Normal (ctrl-O) = $chr(15)
Reverse (ctrl-R) = $chr(22)
Underline (ctrl-U) = $chr(31)

Re: ASCII codes for Bold, Underline, Color, etc... #49458 14/09/03 08:05 PM
Joined: Sep 2003
Posts: 9
G
Gilthas Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Sep 2003
Posts: 9
Thanks...but that's not what we're looking for. =\

We have that list already.

The ASCII should look something like "0133," or "0166," etc.

Re: ASCII codes for Bold, Underline, Color, etc... #49459 14/09/03 08:08 PM
Joined: Dec 2002
Posts: 2,809
C
codemastr Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Umm what he gave you is ASCII codes.

Bold is ASCII code 2
Color is ASCII code 3
etc.

Re: ASCII codes for Bold, Underline, Color, etc... #49460 14/09/03 08:58 PM
Joined: Sep 2003
Posts: 9
G
Gilthas Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Sep 2003
Posts: 9
None of those codes work, though, so they must not be correct.

002, bold
031, itallics
022, reverse

Nadda... frown

Re: ASCII codes for Bold, Underline, Color, etc... #49461 14/09/03 09:11 PM
Joined: Sep 2003
Posts: 9
G
Gilthas Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Sep 2003
Posts: 9
OK, we seem to have it under control with bold, but not underline or reverse, which is odd.

Also, it started to work when we combined our filter mode with +c...not sure what other alterations were made.

Still looking into it. Any ideas are welcome. =)

Re: ASCII codes for Bold, Underline, Color, etc... #49462 14/09/03 09:23 PM
Joined: Dec 2002
Posts: 2,809
C
codemastr Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
022 and 22 are not the same thing. When you use 022, you are talking about an octal number, 22 is decimal. In octal, 22 would be 026 for example.

Re: ASCII codes for Bold, Underline, Color, etc... #49463 14/09/03 10:12 PM
Joined: Sep 2003
Posts: 9
G
Gilthas Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Sep 2003
Posts: 9
I'm told it needs to be three letters/characters. 22 does not work.

I really have no idea how the IRCd looks at codes. I'm not the one programming this, I'm relaying what is said here to one of our network/server admins. =)

Re: ASCII codes for Bold, Underline, Color, etc... #49464 14/09/03 11:23 PM
Joined: Dec 2002
Posts: 2,809
C
codemastr Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Well who ever told you an ASCII code has to be 3 digits doesn't know what he is talking about.

Re: ASCII codes for Bold, Underline, Color, etc... #49465 14/09/03 11:35 PM
Joined: Sep 2003
Posts: 9
G
Gilthas Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Sep 2003
Posts: 9
Quoth I:

Quote:
No it does not, but the extended code we use for IRC does.

Re: ASCII codes for Bold, Underline, Color, etc... #49466 14/09/03 11:41 PM
Joined: Dec 2002
Posts: 2,809
C
codemastr Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Well I don't have any idea what this guy is talking about. I've been programming an IRCd for the last 3 years, those codes work perfectly for me. If they don't work for you, then talk to the people who are familiar with your particular IRCd. The codes you were given are the ASCII codes, if you want something different, then there's nothing I can do for you.

Re: ASCII codes for Bold, Underline, Color, etc... #49467 14/09/03 11:45 PM
Joined: Sep 2003
Posts: 9
G
Gilthas Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Sep 2003
Posts: 9
Would that IRCd be Unreal?

We use Bahamut.

Re: ASCII codes for Bold, Underline, Color, etc... #49468 14/09/03 11:56 PM
Joined: Dec 2002
Posts: 2,809
C
codemastr Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Yes it would be Unreal. And, I'm rather familiar with Bahamut code, and it does not have anything to the effect of "ascii codes must be 3 digits." ASCII codes are NOT required to be 3 digits, as I said, if you're going to tell me they are, then you need to go and get help from whoever is telling you this, because he is the only one who can help you.

Re: ASCII codes for Bold, Underline, Color, etc... #49469 15/09/03 12:16 AM
Joined: Sep 2003
Posts: 9
G
Gilthas Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Sep 2003
Posts: 9
We have so many blasted modifications to the IRCd and services I can't name them all. It may be some custom bit that she coded...so I don't know. I will find out.

Re: ASCII codes for Bold, Underline, Color, etc... #49470 15/09/03 01:51 AM
Joined: Sep 2003
Posts: 9
G
Gilthas Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Sep 2003
Posts: 9
I haven't a clue - I mentioned she should post here, not me, but I didn't recieve a reaction.

Quote:
ASCII by itself does not have to [have three characters], but extended characters like BOLD and them typically do.


*shrugs* confused

Re: ASCII codes for Bold, Underline, Color, etc... #49471 15/09/03 01:45 PM
Joined: Dec 2002
Posts: 2,809
C
codemastr Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Bold is NOT an extended ASCII character. Bold is ASCII code 2. Extended ASCII codes are those with codes between 128 and 255 inclusive, not ASCII code 2. This is the last I am posting on the issue, this is now pointless.

Re: ASCII codes for Bold, Underline, Color, etc... #49472 15/09/03 01:48 PM
Joined: Feb 2003
Posts: 810
C
cold Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
Anyway, just in case, if you're looking for the octal values: 002 (bold), 003 (colour), 017 (plain), 026 (reverse) and 037 (underline).


* cold edits his posts 24/7
Re: ASCII codes for Bold, Underline, Color, etc... #49473 21/09/03 02:37 AM
Joined: Aug 2003
Posts: 5
P
paultwang Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
P
Joined: Aug 2003
Posts: 5
The triple digit is the octal escape code for a character. The C compiler sees "\003" as "3" in base-8.

Re: ASCII codes for Bold, Underline, Color, etc... #49474 21/09/03 03:26 PM
Joined: Dec 2002
Posts: 2,809
C
codemastr Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
No kidding, I already said that. However it is meaningless for codes 2 and 3 because they are exactly the same value in decimal and octal.