Return to Unfiction unforum
 a.r.g.b.b 
 Calendar Calendar   FAQ FAQ   Search Search   Memberlist Memberlist   Usergroups Usergroups 
 Register Register   Log in Log in 
 
Welcome!
New users, PLEASE read these forum guidelines. New posters, SEARCH before posting and read these rules before posting your killer new campaign. New players may also wish to peruse the ARG Player Tutorial.

All users must abide by the Terms of Service.
This week sponsored by:

You?

Why do we need your help?
Announcements
Got a jones for some uF swag?
Visit Ye Olde Tradin' Post!
 
The time now is Wed Jun 19, 2013 9:03 am
All times are UTC - 6
View posts in this forum since last visit
View unanswered posts in this forum
Calendar
 Forum index » Archive » Archive: The Haunted Apiary (Let Op!) » The Haunted Apiary (Let Op!): Puzzles
[META] Decoder wheel in Perl
Post new topic   Reply to topic View previous topicMark the topic unreadView next topic
Page 1 of 1 [5 Posts]  
Author Message
turbov21
Veteran

Joined: 20 Aug 2004
Posts: 108

[META] Decoder wheel in Perl

THIS DOES NOT WORK. Any Perl hackers out there are welcome to have a crack at it (or me).

Code:

#!/usr/bin/perl -w

use strict;

my $text = 'abcdefghijklmnopqrstuvwxyz';
my $cypher = 'cnrkmbsvwhoxdfipagzetquljy';

$ARGV[0] =~ tr/A-Z/a-z/;

my @word = split(//, $ARGV[0]);


for (1 ... 26)
{
   my $a = $text;
   my $b = $cypher;

   foreach my $let (@word)
   {
      my $cnt = 0;
      my %data = ();
      my @c = split(//, $a);
      my @d = split(//, $b);

      while ($c[$cnt])
      {
         $data{$d[$cnt]} = $c[$cnt];
         $cnt++;
      }

      print $data{$let};
      $b =~ s/^(.*)(.)$/$2$1/;
   }

   print "\n";

   $cypher =~ s/^(.*)(.)$/$2$1/;
}

exit;


EDIT -topic tag -SG

PostPosted: Fri Oct 08, 2004 11:40 am
 View user's profile Send private message
 Mark this and the following posts unread Back to top 
ABoxInABox
Decorated

Joined: 10 Aug 2004
Posts: 232
Location: The Future

Do you have Perl?

PostPosted: Fri Oct 08, 2004 11:54 am
 View user's profile Send private message Visit poster's website AIM Address MSN Messenger
 Mark this and the following posts unread Back to top 
turbov21
Veteran

Joined: 20 Aug 2004
Posts: 108

Oh, yes... I wrote this. It's just not working for me. There's a bug in it somewhere.

PostPosted: Fri Oct 08, 2004 11:57 am
 View user's profile Send private message
 Mark this and the following posts unread Back to top 
SpghEddy
Veteran


Joined: 24 Jul 2004
Posts: 88

What is this supposed to do? Decrypt something on the command line using $text -> $cipher as the decryption key?

PostPosted: Fri Oct 08, 2004 12:20 pm
 View user's profile Send private message
 Mark this and the following posts unread Back to top 
turbov21
Veteran

Joined: 20 Aug 2004
Posts: 108

It was an attempt to bruteforce the cypher wheel, but that's been solved.

PostPosted: Fri Oct 08, 2004 12:33 pm
 View user's profile Send private message
 Mark this and the following posts unread Back to top 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
Post new topic   Reply to topic View previous topicMark the topic unreadView next topic
 Forum index » Archive » Archive: The Haunted Apiary (Let Op!) » The Haunted Apiary (Let Op!): Puzzles
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
You cannot post calendar events in this forum



Powered by phpBB © 2001, 2005 phpBB Group