In #utah on Freenode, there has been some active discussion lately about Dvorak vs. Qwerty. As such, ibot, a channel bot, has the ability to display text when someone enters a channel. Some of the chatters, including myself, have a join that is "encrypted". Well, not really, per se, but rather, just Dvorak text that was typed using the QWERTY layout. One such join is as follows:

>>> vontrapp
Dr, co yd. Ekrpat jrmcbiZ

Not exactly intuitive as to what is trying to be said. The only way to figure it out, is set your keyboard layout to Dvorak, and type the letters as they would appear on a QWERTY keyboard. Doing so would produce:

>>> vontrapp
How is the Dvorak coming?

As we began discussing in the channel, we thought that it would be great if we could have ibot do the decoding for us. Well, I'm not familiar with blootbot or it's scripting capabilities, so I wrote a script for Irssi that can convert any "Dvorak text" to QWERTY and vice versa. The commands to run are '/dv some text here' and '/qw some text here'. When ran, it just puts the the result in the channel in a single line, as to not flood or annoy the channel. The script does not utilize color, but that could be added easily to help identify the difference between the input and output text.

Here is the code below (no syntax highligting. Sorry). Save it as 'dvoark-qwerty.pl' in your ~/irssi/scripts/ directory, and run "/script load dvorak-qwerty.pl" in Irssi.

 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 # dvorak-qwerty.pl # Aaron Toponce (aaron .toponce@gmail.com) # Decodes dvorak to qwerty and qwerty to dvorak # # qwerty layout (from left to right, top to bottom): _+QWERTYUIOP{}ASDFGHJKL:\"ZXCVBNM<>?-=qwertyuiop[]asdfghjkl;'zxcvbnm,./ # dvorak layout  (from left to right, top to bottom): {}\"<>PYFGCRL?+AOEUIDHTNS_:QJKXBMWVZ[]',.pyfgcrl/=aoeuidhtns-;qjkxbmwvz use Irssi; use strict; use vars qw($VERSION %IRSSI);$VERSION = "0.1"; %IRSSI = (         authors     =>  "Aaron Toponce",         contact     =>  "aaron.toponce\@gmail.com",         name        =>  "dvorak-qwerty",         decscription    =>  "Decodes dvorak-to-qwerty and reverse",         license     =>  "GPLv2",         changed     =>  "$VERSION", commands => "dvorak qwerty" ); sub qwerty2dvorak($) {         my ($text) = @_;$text =~ y/\_\+QWERTYUIOP\{\}ASDFGHJKL\:\"ZXCVBNM\<\>\?\-\=qwertyuiopasdfghjkl\;\'zxcvbnm\,\.\//\{\}\"\<\>PYFGCRL\?\+AOEUIDHTNS\_\:QJKXBMWVZ\'\,\.pyfgcrl\/\=aoeuidhtns\-\;qjkxbmwvz/; # "         return "'@_' to dvorak: " . $text; } sub dvorak2qwerty($) {         my ($text) = @_;$text =~ y/\{\}\"\<\>PYFGCRL\?\+AOEUIDHTNS\_\:QJKXBMWVZ\'\,\.pyfgcrl\/\=aoeuidhtns\-\;qjkxbmwvz/\_\+QWERTYUIOP\{\}ASDFGHJKL\:\"ZXCVBNM\<\>\?\-\=qwertyuiopasdfghjkl\;\'zxcvbnm\,\.\//; # "         return "'@_' to qwerty: " . $text; } sub dvorak_decode( { my ($server, $target,$text) = @_;         return;         my $witem =$server->window_item_find($target); return;$witem->print(dvorak2qwerty($1), MSGLEVEL_CLIENTCRAP); } sub cmd_dvorak(" />$) { my (server, target, text) = @_; return; my witem = server->window_item_find(target); return; witem->print(dvorak2qwerty(1), MSGLEVEL_CLIENTCRAP); } sub cmd_dvorak($$) {         my ($arg,$server, $witem) = @_; if($witem && ($witem->{type} eq 'CHANNEL' ||$witem->{type} eq 'QUERY'))         {                 $witem->command('MSG ' .$witem->{name} . ' ' . qwerty2dvorak($arg)); } else { print qwerty2dvorak($arg);         } } sub cmd_qwerty($) { my ($arg, $server,$witem) = @_;         if($witem && ($witem->{type} eq 'CHANNEL' || $witem->{type} eq 'QUERY')) {$witem->command('MSG ' . $witem->{name} . ' ' . dvorak2qwerty($arg));         }         else         {                 print dvorak2qwerty($arg); } } Irssi::command_bind('dv',\&cmd_dvorak); Irssi::command_bind('qw',\&cmd_qwerty); Irssi::signal_add('message public', sub {dvorak_decode($_[0], $_[4],$_[1]);} ); Irssi::signal_add('message own_public', sub {dvorak_decode($_[0],$_[2], $_[1]);} ); print "%B>>%n " .$IRSSI{name} . " " . \$VERSION . " loaded";

1. Pat O'Hooligan | December 23, 2006 at 8:25 am | Permalink

Why not to use Chinese or Russian keyboard instead? It would make the application even more useless ðŸ™‚

2. Pat O'Hooligan | December 23, 2006 at 8:28 am | Permalink

To be more specific: combine a Chinese keyboard with Dvorak and perhaps with a Russian as well. That would make it slightly more difficult to decypher.

3. Pat O'Hooligan | December 23, 2006 at 9:15 am | Permalink

I just got this when I sent my 3rd comment. Very clever way to do the DOS attack of the Dvorak-Qwerty type on yourself. Congratulations:-) (See below)

Sorry, but your comment has been flagged by the spam filter running on this blog: this might be an error, in which case all apologies. Your comment will be presented to the blog admin who will be able to restore it immediately.
You may want to contact the blog admin via e-mail to notify him.

Your email is never published nor shared.