BASH AND PERL ENCRYPTION AND DECRYPTION
Page 1 of 1
BASH AND PERL ENCRYPTION AND DECRYPTION
Encryption
https://app.box.com/s/cx77cvrdk90ae5nzk8meq8yf9bkj9lku
- Code:
encrypt=`perl -e 'print unpack "H*","plaintext here"'`
echo $encrypt
# Usage: bash encrypt.sh
- Code:
descrpt=`perl -e 'print pack "H*","encrypted text here"'`
echo $descrpt
# Usage: bash decrypt.sh
https://app.box.com/s/cx77cvrdk90ae5nzk8meq8yf9bkj9lku
Last edited by jamied_uk on 13th January 2016, 19:48; edited 2 times in total
Re: BASH AND PERL ENCRYPTION AND DECRYPTION
echo Hi | openssl enc -aes-128-cbc -a -salt -pass pass:wtf
U2FsdGVkX18qAdhqop1SffsewHue6EOPNKv9dXc/0rI=
echo U2FsdGVkX18qAdhqop1SffsewHue6EOPNKv9dXc/0rI= | openssl enc -aes-128-cbc -a -d -salt -pass pass:wtf
Hi
http://how-to.linuxcareer.com/using-openssl-to-encrypt-messages-and-files
U2FsdGVkX18qAdhqop1SffsewHue6EOPNKv9dXc/0rI=
echo U2FsdGVkX18qAdhqop1SffsewHue6EOPNKv9dXc/0rI= | openssl enc -aes-128-cbc -a -d -salt -pass pass:wtf
Hi
http://how-to.linuxcareer.com/using-openssl-to-encrypt-messages-and-files
Re: BASH AND PERL ENCRYPTION AND DECRYPTION
- Code:
/opt/local/bin/aes -e -b -s "Encrypted me" -p password
hq6kK1M5d5x45DCF7pmELXUzW3ARHV9A/zJcTw==
/opt/local/bin/aes -d -b -s "hq6kK1M5d5x45DCF7pmELXUzW3ARHV9A/zJcTw==" -p password
Encrypted me
-e encrypt
-d decrypt
-b base64 encode/decode (otherwise you get non-printable chars)
-s this_string (blank for stdin)
-p the encryption/decryption password
Re: BASH AND PERL ENCRYPTION AND DECRYPTION
Ceasar Cipher
- Code:
# Caesar cipher Usage: bash function.sh
echo "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" | tr '[A-Z]' '[X-ZA-W]'
# output: QEB NRFZH YOLTK CLU GRJMP LSBO QEB IXWV ALD
# Caesar cipher decoding
echo "QEB NRFZH YOLTK CLU GRJMP LSBO QEB IXWV ALD" | tr '[X-ZA-W]' '[A-Z]'
# output: THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG
# Can also be adjusted to ROT13 instead
echo "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" | tr '[A-Z]' '[N-ZA-M]'
# output: GUR DHVPX OEBJA SBK WHZCF BIRE GUR YNML QBT
echo "GUR DHVPX OEBJA SBK WHZCF BIRE GUR YNML QBT" | tr '[N-ZA-M]' '[A-Z]'
# output: THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG
# Case-sensitive version of ROT13
tr '[A-Za-z]' '[N-ZA-Mn-za-m]'
Similar topics
» Stock Market On Mint 18.2 Bash & Perl Example
» Bash OTP Encryption And Decryption
» Getting Stocks Using Perl On Linux
» Bash Psychic Game For Linux Bash
» Linux BASH Script Running Commands and Functions From Bash Script and saving to varables
» Bash OTP Encryption And Decryption
» Getting Stocks Using Perl On Linux
» Bash Psychic Game For Linux Bash
» Linux BASH Script Running Commands and Functions From Bash Script and saving to varables
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum