Doom1 --> tar -> xz -> b64 -> 1000110101
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

43 lines
1.1 KiB

  1. #!/bin/bash
  2. urlDoom="https://distro.ibiblio.org/slitaz/sources/packages/d/doom1.wad"
  3. main(){
  4. downloadDoom
  5. compressDoom
  6. encode2Base64Doom
  7. encode2BinaryDoom
  8. }
  9. downloadDoom(){
  10. echo "[+] Downloading doom1.wad . Please wait."
  11. wget -q -nc -O doom1.wad "$urlDoom"
  12. echo " doom1.wad size: $(stat -c %s doom1.wad)"
  13. }
  14. compressDoom(){
  15. echo "[+] Compressing doom1.wad.tar.xz . Please wait."
  16. tar cfJ doom1.wad.tar.xz doom1.wad
  17. echo " doom1.wad.tar.xz size: $(stat -c %s doom1.wad.tar.xz)"
  18. }
  19. encode2Base64Doom(){
  20. echo "[+] Encoding to base64 doom1.wad.tar.xz.b64 . Please wait."
  21. base64 doom1.wad.tar.xz > doom1.wad.tar.xz.b64
  22. echo " doom1.wad.tar.xz.b64 size: $(stat -c %s doom1.wad.tar.xz.b64)"
  23. }
  24. encode2BinaryDoom(){
  25. echo "[+] Encoding to binary doom1.wad.tar.xz.b64.bin . Please wait."
  26. > doom1.wad.tar.xz.b64.bin
  27. sleep 2
  28. while read line
  29. do
  30. echo $line | xxd -b -g 100 -c 100 | cut -d " " -f 2 | tee -a doom1.wad.tar.xz.b64.bin
  31. done < doom1.wad.tar.xz.b64
  32. echo " doom1.wad.tar.xz.b64.bin size: $(stat -c %s doom1.wad.tar.xz.b64.bin)"
  33. }
  34. main