A couple of different ways to get EXE name from PID in Windows

I’ll preface this post with the fact that it will be fairly technical. I have been trying to write a Windows program which can get the EXE path of a specified process ID (PID). I found a couple different ways, so thought I would go through them here.

This Rhino is curious to find EXE paths of applications

Continue reading

Posted in Uncategorized | 6 Comments

Standing under an Arch Sounds like a headache…

Read on for a tale of my initial frustration, ever incresaing despair, and eventual victory in this tale of my configuration of audio devices in a Windows 7 VM guest on top of an Arch Linux host.

This rhino is so happy that he can now use his audio software in his VM
Continue reading

Posted in Uncategorized | Leave a comment

A quick tip for the Couch (CouchDB that is)

I have been playing around with CouchDB lately as a new tecnology. It is a NoSQL database that stores everything as a ‘document’, rather than as a row like a traditional relationship based database, such as MySQL. What is also cool about CouchDB is that it uses a REST API. That is, every request and operation is done through HTTP, so it works with essentially every language. NoSQL is new to me, but I am liking it so far!

This rhino wishes he had a comfortable couch to lay on.

I am actually using my CouchDB instance as both my database and webserver. Since CouchDB has a REST API and everything in CouchDB is a document, so there is no reason why you cannot simply ues the browser to send an HTTP request and return HTML pages directly from the database! Pretty neat to eliminate Apache, PHP, and MySQL from the web stack and instead use just CouchDB.

Anyways, I have been chugging along merrily, serving static HTML pages or show functions from my database, until I started to use the list functions that CouchDB offers.

Specifically, I was having trouble getting it to return an HTML header, rather than just plaintext.

To solve this, you must format your list function as:

function(head, req)
    provides('html', function() {
    ... The list function ...

This tells the list function to send HTTP headers along with the data, rather than just the data itself.

This took me a while to figure it out, so hopefully it helps you!

Posted in Uncategorized | Leave a comment

Can’t find the constant you’re looking for? Check www.namethatwindowsconstant.com!

Sometimes I read MSDN entries and wonder what the numeric value of a constant, such as GENERIC_READ, is. However, MSDN usually does not list this information, so I am forced to dive into header files.

Fatigued Rhino

He is so sick of looking up constants by hand

Well, I got quite sick of doing this, so I whipped up a few Python scripts and made a database of a lot of the Windows constants.

I do not claim that 100% of them are there, but on the initial import, I found over 100,000, so there are quite a few! In the future, I will be adding POSIX and other constants, as well as some of the Windows constants I missed. Parsing all the headers was a pretty interesting task, so I might publish another entry on it here in the future.

I thought this database might be helpful to others, so I am publicly publishing it at www.namethatwindowsconstant.com.

Enjoy :)

Posted in Uncategorized | Tagged | Leave a comment

Homemade MIDI Controller!

Since I have been home over winter break, I felt like doing a little bit of fun hacking. As a few of my posts have shown, I am fairly interested in hardware oriented projects, so I thought I would try another. I have several AVR chips and support supplies laying around, so I thought I would use them. Recently, I have also been playing around with DJing. It is fairly common to use a controller to control a DJing setup, but they are all fairly expensive. Since they are just a collection of buttons, knows, and faders, I decided it would be interesting to try to make my own.

My inspiration for this project

This post will cover what I did for the various parts as well as some of the interesting bits of code, so that you can make your own!

Continue reading

Posted in Uncategorized | Leave a comment

Disk Images! Or, the quickest way to get a headache on a Mac!

Lately, I have been doing work with the Pistachio L4 microkernel as part of my research. This requires building various disk images, installing GRUB, and running them inside of a virtual machine. Initially, I was using Linux to do this, since it had all the tools ready to go and was what everyone else was using. However, I have a Mac, so I wanted to be able to use that, rather than SSHing into a server all the time. I didn’t think it would be a big deal, just install the same tools on my Mac, right? Wrong! What follows is the odyssey of what I’ve gone through to do this. Hopefully, it will help anyone else facing a similar circumstance.

Continue reading

Posted in Uncategorized | Leave a comment

Reverse Engineering the Master Boot Record

One day, I was curious about how the computer system goes from booting to actually loading up an operating system. Obviously, it must retrieve the operating system from disk at some point, so I decided to investigate this. The first step in this process is reading the MBR, or Master Boot Record of the hard drive. The MBR is used to store data about where the OS is stored on the drive.

I figured the MBR would be interesting to learn a little bit more about, so I decided to load it up into IDA Pro, a tool for disassembling programs, and see what I could find out.

This baby rhino was also curious about MBRs.

I learned a lot and had a lot of fun, so I’m presenting it here to share my results.

Continue reading

Posted in General Computing, Reverse Engineering | 13 Comments

PEAR, my first publication!

During my time at school, I participate in research. I have been doing this since freshman year, and have been co-author on a few papers, but have never been lead author. Well, that is now changing.

Continue reading

Posted in FPGA, General Computing | Leave a comment

One architecture to rule them all… Or at least rule my free time

I’m a pretty lazy person. I like to put things off, drag my feet, and make plans that I know will never come true. Perfect example, Fall 2008 I took a digital systems course where we designed a very basic (2-bit) CPU and I decided I wanted to continue working out of class to make a better one. Initially, I was actually making some progress, but quickly outgrew the basic chips (GAL chips) we were using at the time, so I screeched to a stop. After a few months of poking around, I figured out an FPGA might be a better way to go. However, these are expensive and would take a lot of effort to learn, so I put the idea on the back-burner.

Magic 1

Bill Buzbee's homemade CPU, which provided some inspiration for me.

Luckily for me though, my research group started to do some work with FPGA’s, so I was able to get some hands on experience with them. Despite having the needed tools though, I was still dragging my feet on doing any work. Well, a few days ago, I got re-inspired when I found a website about a guy called Bill Buzbee who built his own (and in my opinion) pretty complex CPU. It has all sorts of neat features such as paging and interrupts. Well, that was the inspiration I needed and now, a few days later, I’ve actually got some progress worth mentioning.

Continue reading

Posted in Uncategorized | 1 Comment

Ever want to build your own computer?

I find hardware and electronics pretty interesting. So when I was looking around on the internet and saw a link to a home built CPU, I just had to click! A fellow named Jim has made a complete CPU, called the Magic-1, out of just 74xx series of circuits. If you haven’t used or know what 74xx series circuits are, take a look at the picture. These chips were very popular back in the day, as in, a few decades ago. Today there are faster and more powerful chips available. But because Jim used the 74xx series of chips, he was able to get much more control and learn a lot about CPU design.

These chips can make a whole CPU?!

Continue reading

Posted in electronics, FPGA, Science | 1 Comment