Category Archives: Linux

Linux mixed reality

Calculate MD5 programmatically (c++ and golang)

MD5 is 128 bit hash digest calculated by Message Digest Method 5 algorithm. It is not so secure as SHA-256 algorithm but significantly faster. It is still widely used as thumbprint to verify data integrity and detect accidental data corruption. Here is c++ example how to calculate MD5 hash of string using openssl API. Templates… Read More »

How to get openssl cipher list programmatically

The cipher list may be retrieved using “openssl cipher” command. This command has multiple options to filter output. The same is possible to do programmatically using openssl API. Here is c++ example how to programmatically obtain a list of available ciphers with appropriate cryptographic protocols they belong to. The code was implemented and tested on… Read More »

Openssl BIO API, file saving and reading examples

The acronym BIO stands for Basic Input/Output. It is multipurpose API for various types of input and output operations, including file, memory buffer, networking. The main header file for BIO methods is bio.h, binary linking references are presented in library. Below presented 3 examples of BIO API file usage which create and read 3… Read More »

Assembler and Inline Assembler Code in g++

My career as software developer began with embedded programming for 8-bit microprocessor. The main language I used in that time was assembler. Processors changed as assembler changed as well. Later when I started develop Windows implementation in C++ I also used inline assembler instructions in my C++ code, sometime it was necessary for example when… Read More »

Installing Torrent Client on CentOS VM

Torrenting on virtual space on your device is more secure that host machine environment. Isolated VM environment protects somehow from malicious software. However it is 100% secure. I began with which is online torrent which does not require any installation but it displayed a lot of annoying pop-ups with links to suspicious software. So… Read More »

How disable Control-C in a console program.

Control-C (CTRL+C) key combinations sends special signal to console processes, when a console window has the keyboard focus. By default Control-C (also Control-Break) signal is treated not as keyboard input but aborts all console processes attached to this console. In GUI applications Control-C is treated differently and usually is used to copy highlighted text or… Read More »

Agentless remote monitoring with SNMP and WMI

The previous article “Remote Monitoring System with Minimum Coding” presents an example how to monitor processes on Linux systems using simple bash script and upload result to the remote HTTP server. Linux cron service should schedule script execution on a repetitive basis. The bash script plays role of monitoring agent which collects required information and… Read More »

Raw sockets.

Approximately year ago I wrote an article “Wiresharking TCP Split Handshake Attack“. Normally client/server application written on socket level does not permit to split handshaking. For example TCP client connect function initiates a connection on a socket and performs all 3 handshaking step. Handshaking process is hidden in Transport layer of ISO model. To manipulate… Read More »

The GPG_TTY environment variable or github commit problem

I used a lot of different source control systems: SVN, CVS, Rational ClearCase, Perforce Helix, Bitbucket and others. Currently I am on github. Github looks indeed complex, even after Bitbucket which is based on git solution as well. Recently I cloned my repository on new Azure Linux virtual machine, everything was OK until commit step.… Read More »

Get Thumbprints from Windows Catalog File on Linux

This article is related to the “Windows Catalog Files” post and describes how to parse catalog file using posix c++ on Linux platform. On Windows as it is mentioned in “Windows Catalog Files” it is possible to retrieve thumbprints with mscat.h API. The Linux parsing method is based on searching positions of some OIDs… Read More »