Thank you for visiting my sample code page.
Here I hope you will find useful information and/or example programs that you can use as either directly or with modification, for learning or experimentation.
At various times I have contributed to these forums under the alias 'mitakeet':
After I left the DevShed I was unable to develop the sense of community I had there and after a few months I finally just ground to a halt. A lot of the effort I put into these pages was a direct result of my participation on these forums, but other interestes are comming to the fore.
- Dev Shed Forums, a total of 4,570 posts, primarily in the C/C++ forum with some in the Business, SQL and Security. I really enjoyed the community there, but left on May 28, 2005 due to an extreme dislike for the behavior of the owner/administrator. I met some very nice people there, links to their websites are below.
- http://programmingforums.org, a total of only 59 posts (not much traffic there), mostly in the C and C++ forums.
- CodeGuru, 66 posts on the "C++ (Non Visual C++ Issues)" board.
- CProgramming.com, 210 posts split between the C and C++ board.
Here are links to webpages maintained by my fellow (ex) DevShed-ers:
In case this impresses someone, I was 'elected' into Microsofts 2003-2005 'MVP' program (Most Valuable Professional) in the Visual C++ category.
My resume in case you are interested.
My blog, the Fount of Useless Information.
My LinkedIn page in case you are interested.
Last updated on October 31, 2011
All code is hereby placed in the public domain, use as you will.
No warrantee expressed or implied, use at your own risk!
If you find problems or would like to offer comments, please contact me at koxenrider[at]sol[dash]biotech[dot]com.
In case you find my writing interesting, amusing or perhaps even thought provoking, you may be interested in a message board where I and some friends try to get a group of people interested in civil debate on eclectic topics. It is here: Waxology.
Information Security related items (I was a CISSP from December of 2003 to December 2006):
Security related C/C++ items:
- A 'FAQ' related to writing secure programming, NOT specific to C/C++ programming.
A little writeup on diagnosing and detecting memory bounds violations (buffer overflows): BufferOverflows.html.
- A 'SHA2' implementation in C++ with a test driver that can execute against any number of user-supplied tests. This code was adapted from a C implementation by Aaron D. Gifford which (as of 11/22/2004 can be found at www.adg.us/computers/sha.html). In this directory you can find the file 'sha2.zip' which contains all the other files along with the contents of the test directory files or you can download or view each file individually. This program has been tested on little-endian (Intel) and big-endian (Sun) with Visual C++ 6/7 and Dev-C++ on Windows, g++ on Linux and CC on Solaris (g++ caused a bus error). Projects and/or makefiles are supplied for the mentioned compilers.
- A secure password hashing class you can use to conceal user's password in a file without worrying if someone is able to access the file.
- Hideinfo, a simple demonstration of how to obscure plaintext authentication data in binary executables.
- I wrote a little proof-of-concept program in C (I would write it in C++ today with less and likely more efficient code) for a way to bypass web censorship. Information can be found here:
The application, of which the Washington Post and CNN links still worked (as of Jan 2009 anyway).
The source code of the cgi.
The white paper I wrote which prompted me to build the prototype.
SQL scripts (Work on MS SQLServer and likely Sybase):
- An article on performance programming for optimizing your C/C++ code.
- A C++ class with self-modifying code to measure the Cost Per Execution of a given section of code. See the README.html file for details.
- A C program with self-modifying code to extract CPUID for Intel x86 processors (ought to work on AMD and Cyrix as well, but I lack any to test): SelfModifyingCPUID. See the README.html file for details (which, for some reason, doesn't always seem to show up on the directory listing). There is a zip file that contains the code as well as project/workspace files for VC++ 6/7 and DevC. This program will compile on Linux (or cygwin) with a simple command as given in the README file.
- wipeIt.c (and wipeIt.cpp, for C++ and with a couple of display fixes), an ANSI program for overwriting data on a drive with randomness.
- DirectoryListing.cpp, a Posix C++ program for traversing directories and storing the data in a vector.
- WinDirectoryListing.cpp, a Windows C++ program for traversing directories and storing the data in a vector.
- A Windows based example of raw socket capture and decode.
- A calendar program that prints a formated web page (example).
- An anti spam program (based on a web counter and can be used like that) that creates a web page with random email addresses. (example).
- Web page counters you can use on your site (for an example, see the counter at the top of this page). I recently had to update my x-bitmap counter to generate Microsoft DIB (Device Independant Bitmap) format to accomodate Internet Explorer updates dropping support for x-bitmaps. The new code allows for selection of any foreground or background color, though the implementation provided has the colors hard-coded.
- An example program using Microsoft's COM oriented ODBC database access via a DSN-less connection: testdb. Here is a link to the readme in case it doesn't show up in the directory listing.
- A Minesweeper clone MynSweet using plain Windows C.
- An addaptation of my VB SuDoKu in C++. You can access the CGI and play if you like.
Visual Basic (6.0) programs:
- A multi-part form demonstraiting different POST types.
- The program spill.c used to dump GET and POST data for review.
- A SuDoKu program that eliminates the often tedious bookkeeping necessary to solve these puzzles.