• Kindle Fire Uses Android 2.3 (API Level 10) Gingerbread as its SDK

    I preordered a Kindle Fire a couple days after it was announced. At $200, I figure I couldn’t go wrong. Besides, Amazon has impressed me greatly with my e-ink Kindle: I’m sold on their ability to please.

    One of the things that most excites me about getting a fire is that I can start developing an Android application. Sure, I could have been developing in an emulated environment, but I want to have a physical tablet to actually test my app on. The affordability of the Fire was the opportunity I’ve been waiting for.

    Oddly, Amazon waited a bit before providing developers any details on the Fire’s development target. Earlier this month, they finally spilled the beans: The Fire is built on Android 2.3 Gingerbread (API Level 10). Since the Fire has stripped-down hardware, the use of the older API makes perfect sense. For the app I’m building, 2.3 provides more than enough functionality. If all goes well, I should be able to release my little app (more on that later) in a couple weeks.

  • Let’s not forget Dennis Ritchie

    While Steve Jobs’ death has been covered extensively by the media, I think it’s important that the world learn about the death of a man whose contribution to the information age is so immense that it is beyond measure. On October 12, 2011, Dennis Ritchie was found dead in his home at the age of 70. Ritchie is the inventor of the C programming language and a co-inventor of Unix, the father of all modern operating systems. The man was, without a doubt, brilliant. His contributions are what every nerd should aspire to.

    Why is the C programming language so important? Because C was the perfect bridge between man and machine. Before C was invented, programmers had to write the code that runs operating systems (and most everything else) in assembly, which is just one step above binary. Assembly, while powerful, is also extremely cumbersome. Writing even the most trivial of programs is very time consuming. Ritchie’s C language put the development cycle of operating systems and applications into overdrive, allowing programmers to crank out innovation quickly and easily. On top of this speed and power, Ritchie gave his newly-minted language away for free to universities, who were free to do with it as they wished. C has since been used on nearly every system imaginable, from super computers, to PCs, to Macs, to video game consoles.

    Nearly every programmable device in existence today owes its ability to be useful to Dennis Ritchie. Without his brilliance and willingness to give that brilliance away, we would still be in the dark ages of Information.

  • An easy fix for iTunes 10.5 (x64) that won’t install on Windows 7 64 bit

    I just downloaded iTunes 10.5 and tried to install it on my Windows 7 64 bit machine. What I got was an error message that said:

    There is a problem with this WIndows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor.

    The fix that allowed 10.5 to install correctly was very simple. Simply go to Control Panel > Uninstall a Program. Right-click on “Apple Software Update” and choose “Repair.” After that, iTunes 10.5 (x64) should install with no problems at all. Apparently the Apple Updater can get messed up and cause the new version not to install. Imagine that.

    If only all Windows errors were so easy to fix!

  • Happy Birthday Super Nintendo!

    August 23, 1991 is a day that would eventually change my life. It was on that day, 20 years ago, that the Super Nintendo Entertainment System (SNES)was launched in the United States. I didn’t get one until that Christmas, however, if the system hadn’t came to be, I wouldn’t have so many good memories.

    I had good times with the system playing alone, but more importantly, I had a blast playing SNES with a lot of friends and family that I’ll never forget.  Without a doubt, I probably spent more time with Jeremy Akers next to the SNES than anyone else. I’ll never forget the night we fought each other in Mortal Kombat 2 for 250 matches so we could unlock some character (either Smoke or Noob Saibot…who knows). It was a hoot. Jeremy also crashed at my house where we played Donkey Kong Country for several days when Christmas break was greatly lengthened by a big snow storm. We played other games together too, but those two stand out in my mind more than any others.

    My uncle Duck’s boys and I had a ton of fun huddled around an SNES. The week the SNES came out, Duck picked one up for his boys. They invited me down a few days later where I actually got my first look at the SNES. James and Tim had beaten the first couple areas and had just unlocked the Top Secret Area. I remember going into the first ghost house and Tim says, very seriously, “He is so not ready for the ghost house…” He was right, but I did learn to fly in there. (I remember we eventually took a break to let Daniel play Ultraman so he wouldn’t tell on us and we’d have to quit!) For the next 3 Thanksgivings, we all sat in Granny’s back room in front of an 11″ TV and played the game du’jour. One year, it was Mortal Kombat (which we beat) and another year it was NBA Live ’94. We teamed up and beat a 48 game season to win the championship!

    I can’t forget the summer my cousin Jennifer spent a lot of time at the house and we played Super Mario World like it was going out of style. One episode I remember vividly is when Jenn got all worked up over Star Road and swore several rather nasty oaths. My mom heard and made that noise she makes when she hears cursing. When mom walked off, we cracked up laughing.

    The game I’ve probably played most in my life is The Legend of Zelda: A Link to the Past. I love that game! I spent hours and hours hulled up in my room navigating Hyrule all by myself. I’ve probably beaten it from start to finish at least 10 times. (Thanks to my horrible spatial memory, its almost like a new experience each time. I know what’s in the game, but I usually have to wander around a bit to find everything. It’s the only advantage of being so forgetful.) The other game I probably played the most was Ken Griffey Junior Baseball. To this day, it is the funnest arcade-style baseball game I’ve ever played!

    In case you can’t tell, I don’t think any other system will ever hold such a dear place in my heart.  Happy 20th Birthday SNES!

  • A PHP Script to automatically clean files affected by the the eval(gzinflate(base64_decode…) hack

    In late April, my server got hacked. Most of my php files had code that looked like this placed at the top:

    eval(gzinflate(base64_decode('DZZFssRYokOX... long string of gzipped-base64-encoded php code);

    I’m not sure how the bad guys got in, but I changed all my passwords and updated all the software on the server. Then, like any obsessive programmer, I set forth making a script to clean up the mess programatically. My solution was a two-step process. I used GNU find command to find all my php scripts with the code “eval(gzinflate” in them. I chose to search by this code because I can’t think of too many legitimate reasons to do this, and it matched all the infections I found manually. The full command I used for this was:

    find /full/path/to/public_html -name "*.php" -exec grep -li "eval(gzinflate" {} \;

    This command finds all php files then uses grep to look inside each file for “eval(gzinflate”.

    I copied the results of this command to a text file called fullInfected.txt .

    After I had a list of infected files, I wrote a php script that’ll go through each file on the list, do a search, and remove all lines with the infected code in it. I saved the script in the same directory as my fullInfected.txt file. You can get that file (with a few sample supporting files) here: CleanEvalBase64_decodeHack script.

    There are two variables that can be set at the top of the file: One for the name of the file with the list of infected files in it ($listOfFiles) and another for the text to search for ($findWhat). I uploaded the script to the server and ran it via SSH:

    php clean.php

    When the script runs, it will log a list of which files were cleaned.

    This script is released as-is, with no implied warranty whatsoever under the Creative Commons Attribution-ShareAlike 3.0 Unported License. Make a backup of your server before using this and test this very thoroughly on a small sample of infected files.

    I’m sure there’s more efficient ways to do with with shell commands and/or regex, but I didn’t know how to do it that way. Good luck getting cleaned up!

Scroll to Top