#!/usr/bin/perl use strict; use IO::Handle; # $Platon: decoder.pl,v 1.3 2002/03/13 13:51:03 karas9 Exp $ ############################################################################# # # # This script is intended do decrypt STDIN and write that to STDOUT. # # # # =Nepto= # # Wolcano # # Method syntax : # # # # if (is_decodable_input) { } # # # # In output of we switch the (START|END)_STR to indicate # # succesfull decoding... # # # # Changes: # # # # 23-03-2001 creation (Neptun & Wol) # # 26-03-2001 changed ENCODE_1 start and end strings (Wol) # # 27-03-2001 removed UPPER,LOWER encoding (Wol) # # @heh# ############################################################################# # Systemova inicializacia. select(STDERR); $| = 1; # make unbuffered select(STDOUT); $| = 1; # make unbuffered my $START_ENCODE_1_STR = '123'; my $END_ENCODE_1_STR = '321'; my $START_SWITCH_CASE_STR = 'aAbBcC'; my $END_SWITCH_CASE_STR = 'CcBbAa'; while () { # chomp; # DECODE METHOD no. 1 if ($_ =~ /^(.*)($END_ENCODE_1_STR)(.*)($START_ENCODE_1_STR)(.*)$/) { my $buf; $buf = $3; #$buf =~ y/abcdefghijklmnopqrstuvwxyz`,.;'[]/'vxswdfguhjknbio]earycqzt`.m,l'p[/; $buf =~ y/-abcdefghijklmnopqrstuvwxyz`,.;'[]ABCDEFGHIJKLMNOPQRSTUVWXYZ~<>:"{}1234567890=/0'vxswdfguhjknbio]earycqzt`.m,l;p["VXSWDFGUHJKNBIO}EARYCQZT~>M