Cryporange - criptografador de mensagens
Publicado por Slackjeff (última atualização em 11/07/2018)
[ Hits: 1.665 ]
Homepage: https://slackjeff.com.br
Acid Cryptography. Maiores informações:
https://notabug.org/jeffersonrocha/CRYPORANGE/src/master/README.md
#!/usr/bin/env sh
#============HEADER=================================================|
#AUTHOR
# Jefferson Rocha <lrcjefferson@gmail.com>
#
#PROGRAM
# CRYPORANGE - Acid Cryptography
#
#DESCRIPTION
#
#
#TEST-ON
# bash, zsh, ksh [OK]
#
#CHANGELOG
# V2.0 (Jefferson Rocha)
# - add variable RANDOM 'uhul', for more randomness.
# - add 2 functions, shuffles and deshuffles for to change
# some letters.
# - base32 is also being used, with base64.
#===================================================================|
#=====VARS===========================|
version="2.0"
archive="/tmp/.archive${RANDOM}"
uhul="$RANDOM"
#=Colors
bold=$(tput bold)
back_red=$(tput setab 1)
back_green=$(tput setab 2)
back_blue=$(tput setab 4)
back_cyan=$(tput setab 6)
fore_red=$(tput setaf 1)
fore_green=$(tput setaf 2)
end_color=$(tput sgr0)
#====================================|
#=====TESTS==========================|
for conference in "base64" "base32" "tr" "rev"; do # Exist list? no bye!
if ! type -p "$conference" >/dev/null 2>&1; then
printf '%b' "${bold}${fore_red}NEED '${conference}' TO CONTINUE${end_color}\n"
exit 1
fi
done
#====================================|
#=====FUNCTIONS======================|
remove(){
if [ -e "$archive" ];then
rm "$archive" >/dev/null 2>&1
fi
}
_USAGE(){
cat <<END | less
CRYPORANGE $version
User Manual.
What is cryporange?
Cryporange uses simple, more functional encryption!
As a base it has the cipher of cesar, reverse and base64.
United all on one base, that's cryptorange! good fun!
ENCRYPT
To encrypt a message, you must select option (1), after you write
your message, for end, press <ENTER> then CTRL + D for encrypt your
message.
DECRYPT
To decrypt a message, you must select option (2) menu.
After this you paste your message encrypted, press <ENTER> then CTRL + D
for decrypt.
AUTHOR
2018 Jefferson Rocha <lrcjefferson@gmail.com>
BUGS
Send a message to lrcjefferson at gmail dot com
(RETURN? PRESS Q)
END
}
shuffles(){
sed \
"s/ /++!@/g; s/,/$uhul/g; s/a/t-!/g; s/e/$-/g; s/i/__/g; s/r/I@/g"
}
deshuffles(){
sed \
"s/++!@/ /g; s/$uhul/,/g; s/t-!/a/g; s/$-/e/g; s/__/i/g; s/I@/r/g"
}
_crypt(){
printf '%b' "+-+-+-+- ENCRYPT MODE -+-+-+-+\n"
printf '%b\n' "${bold}${fore_red}Enter TEXT. (NEW LINE and CTRL+D for CRYPT MESSAGE).${end_color}"
# Print stdout.
cat > "$archive" # Write a text
[ ! -e "$archive" ] && exit 0 # Archive no exit? bye.
cat "$archive" | \
tr '[a-z]' '[x-za-w]' | \
shuffles | \
base32 | \
rev | \
base64
remove # Remove .archive in /tmp
}
_decrypt(){
printf '%b' "+-+-+-+- DECRYPT MODE -+-+-+-+\n"
printf '%b\n' "${bold}${fore_red}PASTE TEXT: (NEW LINE and CTRL+D for DECRYPT MESSAGE).${end_color}"
cat > "$archive"
[ ! -e "$archive" ] && exit 0 # Archive no exist? BYE.
cat "$archive" | \
base64 -d | \
rev | \
base32 -d | \
deshuffles | \
tr '[x-za-w]' '[a-z]'
remove # Remove .archive in /tmp
}
#====================================|
# MAIN
remove # Remove .archive in /tmp
clear # <3 Clean
cat << RANGER
${bold}${fore_green}
____ ____ _ _ ___ ____ ____ ____ _ _ ____ ____
| |__/ \_/ |__] | | |__/ |__| |\ | | __ |__
|___ | \ | | |__| | \ | | | \| |__] |___
Acid Cryptography V${version} ${back_red} ${back_green} ${back_blue} ${back_cyan} ${end_color}
____________________________________________________
RANGER
PS3=$'\n> '
select menu in "Encrypt" "Decrypt" "Usage" "Exit"; do
if [ "$REPLY" = "1" ]; then
_crypt # Call Func
elif [ "$REPLY" = "2" ]; then
_decrypt # Call Func
elif [ "$REPLY" = "3" ]; then
_USAGE # Call Func
elif [ "$REPLY" = "4" ]; then
exit 0 # Bye
else
printf '%b' "\t${bold}${fore_red}INVALID OPTION!!!!${end_color}\n"
fi
done
Menu para liberar / bloquear laboratórios no Squid
PkgBuild - um gerenciador de construção de pacotes
Automatizar backup do PostgreSQL
Nenhum comentário foi encontrado.
Monitorando o Preço do Bitcoin ou sua Cripto Favorita em Tempo Real com um Widget Flutuante
IA Turbina o Desktop Linux enquanto distros renovam forças
Como extrair chaves TOTP 2FA a partir de QRCODE (Google Authenticator)
Como realizar um ataque de força bruta para desobrir senhas?
Como usar Gpaste no ambiente Cinnamon
Atualizando o Fedora 42 para 43
Pergunta: Meu teclado não está respondendo direito como e consertar? (2)
Secure boot, artigo interessante, nada técnico. (6)
SQLITE não quer funcionar no LINUX LMDE6 64 com Lazaruz 4.2 64bit (n... (0)









