Sat. Oct 24th, 2020

Pentesting Fun Stuff

following the cyber security path…

Asciinema

When writing write-ups for CTFs and other pentesting challenges there are several cool things to use to give your write-up a little ‘faafoom’.
One of those things is Asciinema, which is a program to create a recording of your terminal.

According the creators, asciinema [as-kee-nuh-muh] is a free and open source solution for recording terminal sessions and sharing them on the web.

The awesome thing about asciinema is that your can replay your terminal session and select the text. It doesn’t matter if you play it locally or remotely.
How cool is that? For my write-ups or demonstrations, this is a very cool feature.

Installing asciinema

Asciinema can be found in the official Debian repository, so installing it is simple.

Recording

When asciinema is installed you can easily record your session by running the command (replace [session] with the name of your choosing)

To stop recording, simply press CTRL+d

Github

The source code can be found on github: https://github.com/asciinema/asciinema

Gif

But what if your hosting provider doesn’t like script codes? To embed the recording you need to upload it to the asciinema server and paste the embedded player plus recording into your webpage. That will not always work. But what then?

Converting is the answer!!!

Asciicast2gif is a program written to convert a asciinema recording to a gif picture. This way you can show it on your website without having the problem to deal with script code.

Installing asciicast2gif

Unfortunately is asciicast2gif not available in the Debian repository.
There are some tutorials on how to do it from scratch and build it on your own system, but there is a simple way to get asciicast2gif running on your system within a few minutes.

To do this you need docker.

Then you need to pull the docker image

And finally you need to run the command to start the converting of your recording

And that’s it. Keep in mind that there is no progress bar and if you have a long recording it may take a while….so don’t kill the process, but be patient.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

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