File: 437cipher

package info (click to toggle)
hxtools 20180301-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,600 kB
  • sloc: ansic: 5,926; perl: 3,905; sh: 1,638; cpp: 342; makefile: 191; asm: 173
file content (26 lines) | stat: -rwxr-xr-x 715 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/perl
#
#	An alternate simple substitution cipher to ROT13
#	written by Jan Engelhardt, 2013
#
#	This program is free software; you can redistribute it and/or
#	modify it under the terms of the WTF Public License version 2 or
#	(at your option) any later version.
#

use utf8;
binmode STDIN, ":utf8";
binmode STDOUT, ":utf8";
if ($ARGV[0] eq "-d") {
	shift @ARGV;
	while (<>) {
		tr[☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼]{ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^};
		print;
	}
} else {
	while (<>) {
		tr[a-z][A-Z];
		tr{ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^}[☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼];
		print;
	}
}