My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# ----------------------------------------------------------------------------
# Codifica/decodifica um texto utilizando a cifra ROT47.
# Uso: zzrot47 texto
# Ex.: zzrot47 texto secreto # Retorna: E6IE@ D64C6E@
# zzrot47 E6IE@ D64C6E@ # Retorna: texto secreto
# echo texto secreto | zzrot47 # Retorna: E6IE@ D64C6E@
#
# Autor: Aurelio Marinho Jargas, www.aurelio.net
# Desde: 2008-07-23
# Licença: GPL
# ----------------------------------------------------------------------------
zzrot47 ()
{
zzzz -h rot47 "$1" && return

# Dados via STDIN ou argumentos
zztool multi_stdin "$@" |

# Um tr faz tudo, é uma tradução letra a letra
# Obs.: Os colchetes são parte da tabela, o tr não funcionará no Solaris
tr '!-~' 'P-~!-O'
}

Change log

r710 by aureliojargas on Mar 29, 2012   Diff
SEGURANÇA: $1 colocado entre aspas na
chamada padrão zzzz -h de todas as
funções.
Go to: 
Sign in to write a code review

Older revisions

r670 by aureliojargas on Mar 28, 2012   Diff
lint: padronização dos comentários nas
chamada de zztool multi_stdin.
r655 by aureliojargas on Mar 23, 2012   Diff
s/Aurélio/Aurelio/ *
r260 by aureliojargas on Dec 21, 2010   Diff
COMBO: mudança em todas as funções
para trocar a ordem das linhas no
cabeçalho. Agora é:

- Descrição de uma linha
...
All revisions of this file

File info

Size: 781 bytes, 22 lines
Powered by Google Project Hosting