Unix Utilities

All free softwares listed in this page are covered under the GNU General Public License

trace (9th Sep 2001)

Utility: Utility to trace system calls, signals and faults in a running process. Similar to the truss utility on Solaris. I found this util at iastate.edu. But I guess it was not being maintained. The current version at my site is a modified version, compiled and tested on Digital Unix 4.0D. Some new print routines and a separate directory for testing new system calls have been added.

Download: trace-OSF-1.30.tar.Z

HTTPResp (18th Dec 1999)

Utility: A flexible CGI program that can be used to generate any HTTP response. It can be used to test web applications. If you are feeling lazy to write a CGI application and would prefer to write HTML and scripts, it can be used as the base CGI for simple web applications.

Simulate all kinds of HTTP error codes, simulate response delay (can specify separate delay periods for headers and data), send custom headers, send files, and more.

Required Software: This utility has been written using CGI++ library. Use sources CGIEnv.cpp and DataPair.cpp and their corresponding header files from the CGI++ library.

Download: httpresp.cpp (source)

Download: cgicpp.zip (CGI++ sources)

Simple Encryption Routine (22nd Sept 1999)

Utility: A simple key-based encryption algorithm for ascii character strings. It works only on alphabets, scrambling them based on the key that you supply.

The current implementation accepts keys up to a maximum of 80 characters length. However it is a trivial matter to enhance it to accept keys of any length. The encrypted string length is of the same size as the original string.

Instructions: To compile on UNIX platform run "make simplecrypt". Then run the resulting executable to go through the interactive test program.

Download: simplecrypt.c (source)

CGI++ 1.01 (With Guestbook example) (18th December 1999)

Utility: A library written in C++ to make writing CGI programs for the web easier. It does the parsing, data escaping and unescaping for you. It also sends response headers in the correct format.

Instructions: The following are the components (classes) of the library:

CCGIEnv: The main class. It parses input and puts the name-value pairs into data structures. It formats the output messages to be sent out from the CGI program.

CDataPair: A class to simplify storage, manipulation and retrieval of name-value pairs. One restriction is that names or values cannot be empty strings.

CTokenReplacer: A class to prepare complete HTML (or any other format) output from a template containing tokens to be replaced and the values that are to be replaced.

Along with the CGI library a GuestBook application is also included as an example. The GuestBook is quite versatile. You can customize the guestbook, add new fields, change the order and name of fields, without changing a single line of code! All you need to change is the html template. The following classes and files make the guest book:

CGBHandler: A class that contains routines to read and add to a data file containing the guestbook entries.

GuestBook: A simple guest book for your home page. Implemented to demonstrate and test the capabilities of the CGI library CGI++. It requires two html template files - one partial html to format the appearance of each of the guest book entries as they will be displayed, and the other to display the guest book page as a whole. This application must be called with the mode (GBMODE) as a query parameter. Valid values are "add" and "show". The show mode displays the last 10 entries in the guest book and the add mode adds a new entry to the guest book.

Platform compatibility: The code has been compiled purified and tested on both Windows (NT) and UNIX (Digital) platforms. Make sure UNIX is defined while compiling on UNIX platform.

Download: cgicpp.zip (sources)

ProcMon (8th May 1999)

Utility: Utility to get information about a process and its threads on IBM AIX operating system. Gives statistics much more detailed that what the ps command can.

Download: procmonAIX.c (source)

TanProf (May 1999)

Utility: Utility to trace system calls, signals and faults in a running process. Similar to the truss utility on Solaris. This utility was written for Digital UNIX running on an Alpha machine. But the code can be easily modified to suit other operating systems and platforms.

Download: tanprof.c (source)

FindPort (1998)

Utility: Utility to scan port numbers on a machine to find active ports and possibly identify the application listening on that port. Given a hostname and starting port, the utility attempts connection to each port and prints out the information, if any, it could read from there.

Download: findport.c (source)