Learn Pentesting like a Pro!

Share this post

How to record your terminal💻 session on Linux🐧

pentesting.academy

How to record your terminal💻 session on Linux🐧

pentesting.academy
Mar 17, 2021
Share this post

How to record your terminal💻 session on Linux🐧

pentesting.academy

Intro

When writing an article about ethical hacking techniques I tried many ways to record my terminal and keep a good quality and resolution. If you record directly your screen with some screencast software the resolution for the letters of the terminal usually gets pixelated, so it's not looking great.

Then luckily I found terminalizer which does an awesome job! Instead of recording pixel and bitmaps, terminalizer records "text" and generates a YAML file. That means that you can easily edit the text file that contains your "video".

Installation

I am using Kali Linux which is based in Debian but using npm is very easy to install in your Linux system:

apt-get install npm
npm install -g terminalizer

Examples

To record a new video just type:

terminalizer record first-video

That will create a new file called first-video.yml that you can easily edit with a text editor.

How to play the video:

terminalizer play first-video

How to convert the video to a gif file that you can easily insert in your blog, website, etc:

terminalizer render first-video

That will create first-video.gif.

Result

And this is how it is looking:

first-video
first-video.gif

As you can see in the video above, the text has crystal-clear resolution without any noise nor pixelated output.

Troubleshooting

First time when I executed the "render" command in Kali Linux I got this error:

Error: [31871:1208/233517.072099:ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command

It was easy to fix with a quick patch, just open the file /usr/local/lib/node_modules/terminalizer/render/index.js as root:

sudo vim /usr/local/lib/node_modules/terminalizer/render/index.js

In line 32 add the following code: app.disableHardwareAcceleration();

    27  // Hide the Dock for macOS
    28  if (os.platform() == 'darwin') {
    29    app.dock.hide();
    30  }
    31
    32  app.disableHardwareAcceleration(); # <<<<-------- ADD THIS LINE
    33
    34  // When the app is ready
    35  app.on('ready', createWindow);

Reference: https://github.com/faressoft/terminalizer/issues/79

Official website: https://terminalizer.com/

Thanks for reading Learn Pentesting like a Pro! Subscribe for free to receive new posts.

Share this post

How to record your terminal💻 session on Linux🐧

pentesting.academy
Comments
TopNew

No posts

Ready for more?

© 2023 pentesting.academy
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing