Category Archives: Linux

Linux mixed reality

cURL for port scanning

Usually such tools as telnet, nmap or nc are used to find listening remote ports. However nmap and netcat are not included in default Linux installation, telnet is good for manual testing and is not friendly for scripting task. So sometime I am using cURL or wget to get information about open ports on remote… Read More »

Ping in Network Discovery

Network discovery is a process to find other computers and devices on some network and to get obtainable information about them. The discovery procedure is based on sending out request messages over and analyzing responses from remote devices. ICMP (Internet Control Message Protocol) is most frequently method detect remote device. Below is presented simple Linux… Read More »

Fixing dbg installation problem

I needed to install gdb quickly on my CentOS 7 VM box, but it failed. yum command could not find appropriate repository for download and installation. The same I had before with different application. Of course it was possible to perform all installation steps manually: find location of appropriate rpm or source files and rebuild,… Read More »

Private and Public keys generation and usage for CentOS

Public and private key pair is alternative way of server logging using Secure Shell (SSH) protocol. It gives possibility to avoid user name and password prompts so could be faster and more comfortable. Besides both keys represent two long string of characters, so eventually it is more difficult to crack. There are a lot of… Read More »

Simple example of SSH tunneling

SSH tunneling is a technique to transfer arbitrary networking data using an encrypted SSH connection. It can be used to add encryption to not secure protocols such as HTTP and to bypassing firewalls. It is also named as port forwarding, there is a post related to C# implementation of SSH port forwarding. Here is presented… Read More »

Linux C error handling, errno and perror

If you have Java or .Net programming background you used to be familiar with exception which generated in runtime if something is going wrong with code execution. Linux C does not provide direct support to runtime error handling or exception handling. Usually code developer has to check return values from the functions. Generally C function… Read More »

Bash script for xml parsing

Usually XML processing is already implemented in programming languages. Several of them have numerous API for that. However some of these API are awkward and cumbersome. Recently it was necessary to parse xml file from bash script so I create my own parser. Basically what I create it is not inversion but small and it… Read More »

Kill Process Programmatically by PID

If your computer is slow it could be that some of the running processes is frozen state. So it is time to terminate them. In Windows you can do it thought Task Manager in Mac using Activity Monitor. Similarly the process may be stopped in Windows command prompt by TaskKill command or in Mac/Linux terminal… Read More »

CentOS upgrade.

Updating CentOS Linux is pretty simple procedure. Recently I updated one of my CentOS VM from one release to another and I want to share this information and keep it for future reverences. I did it though terminal window and started with checking initial release version: # cat /etc/redhat-release CentOS Linux release 7.5.1804 (Core) So… Read More »

Astra Linux on Oracle Virtual Box

Astra Linux is Russian made Debian based operating system, mainly developed military needs. It is complete commercial product with 2 main releases: “Orel” (general purpose common edition) and “Smolenk” (special edition for government utilization including Russian army forces and intelligence agencies). The Astra Linux was developed by by Russian company RusBITech in 2008. The product… Read More »