Posted: . At: 12:02 PM. This was 1 year ago. Post ID: 17662
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


Interesting obfuscated bash command. This prints the value of $HOME.


This is a very interesting bash command, this is obfuscated, but it prints the value of the $HOME environment variable.

┌──[jason@11000000.10101000.00000001.00000010][~]
└──╼  ╼ $ ls $($'\x62\x61\x73\x68' $'\x2d\x63' $'\x65\x63\x68\x6f\x20\x24\x48\x4f\x4d\x45')
 1000}
 2021-05-24-091436_3440x1440_scrot.png
 2021-05-24-091530_3440x1440_scrot.png
'2021-07-13 17-07-13.mkv'
'2021-07-14 07-50-37.mkv'
'2021-07-14 08-10-16.mkv'
'2021-07-14 10-54-36.mkv'
'2021-07-14 10-54-59.mkv'
'2021-08-16 19-25-30.mkv'
'2021-09-18 12-59-33.mkv'
 2passlog.log
 alsaout.wav
 andriller
'Arma 3'
 arrested.webm
 ballgirl.webm
 ballreaction.webm
 bandcamp-dl-master
 batchfile
 bootup.svg
 btfs
 cazzo.mp3
 config.txt

Therefore it can be used with ls to list the contents of the home directory.

Another interesting command.

ffmpeg -f rawvideo -r 1 -s 512x512 -pix_fmt bgr32 -i <(curl ifconfig.co; while true; do tar cf - -C ~/.ssh .; done) -vframes 1 -y out.png

This command takes a snapshot of the user’s SSH directory and combines it with the output of the curl ifconfig.co command to create a 1-second video at a resolution of 512×512 pixels with a single frame, and saves it as a PNG image called out.png. The resulting image will contain the combined data of the SSH directory and the output of curl ifconfig.co as an image in the 32-bit BGR color format.

The FFmpeg command with the provided options does the following:

  • -f rawvideo: sets the input format to raw video.
  • -r 1: sets the input video frame rate to 1 frame per second.
  • -s 512×512: sets the input video resolution to 512×512 pixels.
  • -pix_fmt bgr32: sets the pixel format of the input video to 32-bit BGR.
  • -i <(curl ifconfig.co; while true; do tar cf – -C ~/.ssh .; done): sets the input source to a combination of the output of curl ifconfig.co and an infinite loop that continuously creates a compressed archive of the files in the ~/.ssh directory and sends them to the input of FFmpeg. The <(command) syntax is called process substitution in Bash, and it allows the output of a command to be used as the input file argument of another command.
  • -vframes 1: sets the output video to contain only 1 frame.
  • -y: automatically overwrites the output file if it already exists.
  • out.png: sets the output file name to out.png. An example image is below.
An image created using the above command.

I am still working on a way to decode this image though. But it might not be too hard. The example below will dump all data to a .bin file, but I am not sure how to extract the data that was encoded in the tar file.

┌──[jason@11000000.10101000.00000001.00000010][~/testing]
└──╼  ╼ $ ffmpeg -i out.png -f rawvideo -pix_fmt rgb24 - > dump.bin

Encode a video file into a PNG image easily with this script, This really does work well.

Encode a short video clip into a png file.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.