Analyzing application crash in CentOS Linux.

To diagnose program crashing failure let us create our own simple c++ application which will be crashing during execution. Save it as exemplo.cpp. Build executable without debug information: g++ -o exemplo exemplo.cpp When we start it we receive information that application crashed because of segmentation fault: ./exemplo Crashing application Segmentation fault (core dumped) The simplest… Read More »

DNS Client with Response Parser

Query to DNS server and response that NNS client receives are not so user friendly as for SMTP or FTP. DNS query and response formats presented in RFC-1035. For example A type query to DNS sever to get IP addresses of cnn.com domain in byte-by-byte hex dump looks like: 000000  02 01 00 00 01… Read More »

My first Leetcode experience and achievement

Started to play with Leetcode problems. Pretty addictive activity. The first task I selected was “Longest Substring Without Repeating Characters“. I wrote the code in C# and got a result – 22.9% in “Accepted Solutions Runtime Distribution”. It means that my solution has beaten only one fifth of other submitted implementations. I reprogrammed in C++… Read More »

Remote Monitoring System with Minimum Coding

This is the example how to organize remote monitoring of processes running on Linux devices. Let us create simple script which executes ps command, saves results in html file and uploads the file in http server. 2 arguments are required to run the script: the fist one is html file name without extension and the… Read More »

Automatic web page generation and update using task scheduler

The simple idea is simple: periodically automatically generate file locally and upload it to web server using ftp. Implementation Several years ago when I was passionate about Sudoku game I created my own Sudoku generator which is located in http://sudoku.smike.ru. There were several version of the generator. The version presented here generates Sudoku in PDF… Read More »

Proxy server and its anonymity

I decided to test how proxy server anonymity looks like and how to control it. The purpose was to get HTTP request header which server receives from proxy when proxy settings are anonymous, semi-anonymous or what ever. I installed squid proxy server on one Linux machine and started to play with its settings located in… Read More »

How I broke and later fixed root shell

I was playing with shell changes and accidentally changed root user shell to nonexistent one. How did it happen? From Ubuntu terminal I switched to root’s environment executing “sudo su -” and then I tried to change login shell for root user performing chsh command. Instead of specifying correct shell with path like “/bin/sh” I… Read More »

RMM HTTP Raposa server

In 1999 I implemented HTTP server for Windows NT with features of remote control and monitoring server machine. I gave the name Raposa to the server. The server code was written on VC++ 6.0 with MFC. Couple of days ago successfully I rebuilt the code on Visual Studio 2013. To my surprise all server services… Read More »

Cyrillic on PC

When I came to Canada in 1996 and bought my computer with Windows NT 4.0 I began to look how to type Cyrillic text on it. Initially I created several editors which works only with 8-bit Cyrillic characters such as KOI-8 and Win-1251. I called in Russian Notepad and it is still there. Usually I… Read More »

Parse ifconfig to extract IPv4 and IPv6

ifconfig is a system administration utility in Unix-like operating systems which presents network interface configuration, including IP addresses, masks, Mac addresses and a lot of other stuff. The ifconfig output may be slightly varying on different operating systems. The utility is very frequently included in shell scripts to get some network parameters. The presented below… Read More »