Wednesday, August 28, 2013

Cryptanalysis, Kernel Dev, gtk gui, hardware interfacing

For a while I owned the domain EruduteAegis.net. It's gone now, years ago lost to a Chinese domain squatter. Mostly the domain was a place for various experiments with dynamic code (cgi/perl at the time) and a good place to have my own shell account hosting service (eggdrops and honeypots). But I did have some content; a few tutorials about things such as cryptanalysis, gtk gui development, hardware interfacing, and linux kernel module writing. All the hard core geekout topics of the time.

Thanks to a friend buying me a IDE->USB adapter cable I've been inspired to resurrect some of the old drives sitting in the drawers in my home office. On one of them was some of the code I hard written and open sourced at the time. Naturally, the only responsible thing to do is dump it on github. Maybe somebody will enjoy messing around with these concepts as much as I did. I'm not a huge fan of the GPL license, but I'm not going to go through the trouble to relabel all of this. None of it is really usable as a basis for derived works anyway, just snippets.

Here's a picture of the computer that most of it was written on. My trusty 266mhz laptop with 1990s cool geek stickers.


https://github.com/ericwhyne/old-code

Here's what's in there:

box.cpp
Example code for how to overload operators as member functions and as non member functions.

UrkLinKern-2.4-ModEx
A simple example Linux Kernel module I threw together to learn and teach Linux 2.4 Kernel module writing.

five.c
Replicates the logic of, then brute forces a solution to a simple logic game.

gtkhello.c
An example of creating a gtk instance. (If you need a simple dialog for a script use gdialog or dialog instead of writing your own instances.)

BinarySearchTree.cpp
An example of creating and using Binary Search Trees.

atihelper.c
GTK c code program shell for system control using a remote control such as the ATI all in wonder.

procinfo.c
Reads various data from the /proc filesystem in linux.  Handy ui and file rw snippets.

grepip.sh
Regex snippet to retrieve IPs from a log file.

ipoctet.pl
Perl code to break the list of IPs generated above into their octets.  Handy for use with the unix commands sort and uniq.

StreamMp3Organize.pl
A line of perl code to rename a bunch of mp3 files using their modification time.This is handy for organizing streamed audio that overlaps.

OperateOnWholeDirectory.sh
Bash script snippet to do an operation on a whole directory of files.

Memorylook.cpp
Short Code to output contents your program's memory space, unformatted. (This program is just a few lines to show what can be accessed. If you need to analyze a program's memory space use gdb instead.)

printshellcode.c
Shellcode to print a phrase to the screen. Good shellcode exercise.

simpleoverflow.c
An example of an overflow exploit.

captureflag
Code written for information warfare games at Norwich University

srsa-cipher.cpp
C++ code to perform small rsa encryption.  Nice example of how to use C++ unions.

affineCipher.pl
Perl Snippet to perform an affine cipher on a file of text.

affineCipher-BruteForce.pl
Complimentary program to affineCipher.pl to crack affine ciphers.

blockRotateCipher.pl
Perl Snippet to perform block rotation ciphers on a file of text.

blockRotateCipher-BruteForce.pl
Complimentary program to blockRotateCipher.pl to crack block rotation ciphers.

columnarTranspositionCipher.pl
Perl Snippet to perform columnar transposition ciphers.

letterFrequencyCount.pl
Perl Snippet to count letter frequencies in a text file.