Linux Message Decoder Script Example 2
Page 1 of 1
Linux Message Decoder Script Example 2
I watched the vid showing decoding process and made a script out of it for automation.
Usage Example
make executable
- Code:
#!/bin/bash
# Usage: ./AYD_Kris.sh https://youtu.be/0aTex-VPnpI
myvar="$@"
youtube-dl "$myvar"
# https://youtu.be/0aTex-VPnpI
a=1
for i in *.mp4; do
new=$(printf "%04d.mp4" "$a") #04 pad to length of 4
mv -- "$i" "$new"
let a=a+1
done
ffmpeg -i 0001.mp4 image%2d.png
zbarimg --raw *.png > out
base64 -d out > f
file f
rm 0001.mp4
#clear
echo "Give Permissions? (Exit If No)"
sudo chmod +x f
hexedit
# now use strings and grep to filter for just urls
strings f|grep -i -A 10 http # try small a for different resaults
# grep -a -i http f
Usage Example
make executable
- Code:
sudo chmod +x AYD_Kris.sh
- Code:
./AYD_Kris.sh https://youtu.be/0aTex-VPnpI
Last edited by jamied_uk on 14th July 2016, 22:39; edited 1 time in total
Re: Linux Message Decoder Script Example 2
Cleanup Script
- Code:
#!/bin/bash
# ./Cleanup.sh
rm *.png*
rm *.mp4*
# add more here if required
rm out.txt
rm out
clear
echo "All Done"
Re: Linux Message Decoder Script Example 2
Encode QR Code Or Base 64 From String
Generate.sh
QR Code From String
- Code:
sudo apt-get install -y qrencode
Generate.sh
- Code:
#!/bin/bash
# Usage: ./generate.sh "test123"
myvar="$@"
echo -n "$myvar" | base64 > new_file
sudo chmod +x new_file
echo "Done"
# Decode the code
# echo -n c2NvdHRsaW51eC5jb20gcm9ja3MK | base64 -d
QR Code From String
- Code:
sudo apt-get install -y qrencode
- Code:
#!/bin/bash
# Usage ./test.sh "TEST123"
# qrencode -o [filename.png] ‘[text/url/information to encode]’
#
myvar="$@"
qrencode -o bg.png "$myvar"
Re: Linux Message Decoder Script Example 2
Asci & Image To Base 64
- Code:
#!/bin/bash
# Usage asci_to_b64.sh "6F0AD0BFEE7D4B478AFED096E03CD80A"
myvar="$@"
echo "$myvar" | xxd -r -p | base64 > out.txt
- Code:
#!/bin/bash
# Uage ./image_to_b64.sh "test.gif"
# https://stackoverflow.com/questions/16918602/how-to-base64-encode-image-in-linux-bash-shell
myvar="$@"
test="$(cat "$myvar" | base64)"
echo $test > out2.txt
# However, base64 can read from the file itself:
# test=$( base64 DSC_0251.JPG )
cat out2.txt
Similar topics
» Script for hidden Message code Breaking
» Linux BASH Script Running Commands and Functions From Bash Script and saving to varables
» Leave a message for local linux user
» Linux Bash Dog Age Calculator Script
» Linux Bash Konsole Figlet Start Message
» Linux BASH Script Running Commands and Functions From Bash Script and saving to varables
» Leave a message for local linux user
» Linux Bash Dog Age Calculator Script
» Linux Bash Konsole Figlet Start Message
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum