Wednesday, January 12, 2011

Encapsulating (aka Hiding) Files Inside an Image

Also known as steganography.  This is not solely a hacker or terrorist tool.  Sometimes you need to move data around outside of the traditional means.  For instance; you have a blog that doesn't allow you to host files for download, but it lets you display pictures.  :)

The picture below has some Eclipse theme files embedded in it.  There's no plot to overthrow a 3rd world country and it functions as a proper JPEG file unless you right click and open it with your favorite archiving tool.  It's only then that you'll see the compressed files contained within.

If you want to see this in action simply right-click on the image file and save it locally.  Then as previously described; open it with WinZip, 7zip, WinRAR, etc.

So, how do you create this beast?  Simple ... create a compressed file with all the data you want in it.  Drop it into a directory of your choosing.  Add a .JPG file in that directory as well.  Now, open a command prompt in that directory and do a simple copy!

copy /B some.jpg + new.jpg

The /B tells it to do a binary copy.  This will not work without it.  You'll end up with "new.jpg" that contains your compressed files.  Easy-peasy!

Monday, October 25, 2010

Adding X windows to an established Linux Server

Ever had a CLI only server and wanted to add X windows to it?  Our environment is very compartmentalized and always asking for help can become cumbersome.  So, we're given Linux servers that do not have X Windows installed on them.  > 99% of the time that's fine.  We have 1 product, however, that MUST be installed from a GUI even though it's on-going execution is through a web interface.  *sigh*

Today I took one of our CLI only servers and started trying to add X to it.  After a lot of troubleshooting I've narrowed that installation down to these packages:

sudo yum install gdm gnome-applets gnome-desktop xorg-x11-server-Xorg.x86_64 gnome-session dbus-x11 gnome-terminal gedit nautilus

Yeah.  It's a RHEL 5.5 machine.  Again, that's what I've got to work with.  Anyway, here's a breakdown:

  • gdm - your window manager
  • xorg-x11 ... - the X server
  • gnome-session and dbus-x11 - those 2 were required for X to allow me to login without any errors, warnings or just not working ;)
  • gnome-desktop - this gave me the icons on the menus instead of red-Xs
  • gnome-applets - this made the trashcan and volume control panel apps stop throwing errors
  • gnome-terminal, gedit and nautilus - those gave me a terminal window, a text editor and a file manager

After installing you can 'telinit 5' to make sure you're good.  If you get a GUI login and can get to a desktop then the only thing left to do is edit /etc/inittab to set the default run level to 5 and when you reboot you're good!

And that's that.  The machine works perfectly and has only the bare minimum to get X up and running.

Monday, June 28, 2010

Blogging about the obvious: Delicious and Google Docs

I've been MIA for a while.  My girlfriend is graduating from nursing school and my daughter is finishing up an outstanding softball season.  In the midst of all that, I changed jobs.  Not something that I've done often; 3 times in fact including this change!  I found the whole process very inspirational and after 11+ years with my last company I feel like I understand my value again.

Anyway, with a new job comes new people.  With new people, if you're listening, can come a lot of new growth!  My buddy John introduced me to an age-old internet site:  I had become a big fan of Google Bookmarks in recent months and while I'd heard of I really had no idea what the whole thing was about and couldn't be bothered to investigate.  The 1-on-1 time with my buddy, whom incidentally got me this new job, proved to be what I needed to make the jump.  Wow, what a jump.  I'm head over heals for delicious!  It's almost perfect and significantly better than Google's own offering.  That's saying something because I'm a die-hard Googlite.  My only gripe about delicious is it needs a big, centrally located search field rather than the small top-right corner thingy.

Now lets talk about Google Docs.  It has managed to get the job done over the years for the most basic of word processing and spreadsheet needs.  It's certainly better than notepad/wordpad and has the benefit of being cloud based so I can get to my stuff no matter where I created it from.  The thing that I've found most recently is it's a great cloud notepad tool.  There are always things I want to document for future reference but I don't want those documents tied to any particular machine and I definitely don't want to have to remember to back things up.  I have blogged here about stuff that was tough to figure out and it has been a great place to share the love, but sometimes you just have stuff you need to write down that doesn't deserve a blog post.

Sorry if these 2 things were glaringly obvious to you, but they were not to me and all it took was a little nudge for me to find a couple of the most useful tools I'm currently using.

Monday, April 26, 2010

Dark Themes for Eclipse

If you've been following along you'll know that I'm dipping my toes in the Android development waters.  My buddy Greg aka Android Code Monkey has a great step-by-step tutorial on setting up your development environment.  I did a more in depth how-to on this subject over at his place.  If you just want the quick and dirty see below ;)

If you've done any development at all you'll notice how stark white the Eclipse IDE is.  Given the natural g33k affinity for poor lighting conditions this can be very tiring on the eyes.  I found THIS post which covers how-to apply ready-made color themes.  I'll keep it simple for you here ... download THIS file and extract the 2 files (org.eclipse.jdt.ui.prefs & org.eclipse.ui.editors.prefs) from your desired theme folder into 

WINDOWS: [workspace]\.metadata\.plugins\org.eclipse.core.runtime\.settings\
LINUX/MAC: [workspace]/.metadata/.plugins/org.eclipse.core.runtime/.settings/

There are screen capture previews in the root of the downloaded file.  I chose the Zenburn theme pictured below.

The download link for the themes no longer works.  So, I've encapsulated the original .zip archive inside the "Theme Files Hidden Inside" image above.  Simply save it and open it with your favorite compression tool.

Wednesday, April 21, 2010

Enabling Local Development

Sometimes you've got to take a step back from what you know and think.  We've been managing hosts files for years.  In fact, one of my previous posts discusses how we make sure each user keeps the most up-to-date copy on their PC.  That's still required for some things, but when my most recent request came in to assist with local development on the developers machines it gave me pause.  This is what I came up with ...

Use DNS.  We already have DNS setup for our domain mydomain.local.  All of the machines in our environment register themselves there.  We also maintain local copies of our public domains with the internal private IPs so we can manage and test the environments even when they're not publicly accessible.  One of the things we implemented many years ago were wildcard entries so ...

A host entry for * in the domain would resolve for, or  We also implemented subdomains in the scheme to allow for simple development and testing.  A * entry in and makes and valid ;)

The developers were using their local hosts file to reference so that the URLs would match data driven lookups.  The trouble is they had to maintain a huge hosts file and things can get crossthreaded very easily.

That's when it hit me ... use a wildcard entry in a new subdomain named local and point it to in DNS.  Now and both work from each developers' local workstation.  The hosts file entries are greatly reduced and revisions/management of said files has all but been eliminated.

It also makes surfing from the server itself possible which can be priceless in troubleshooting -- or proving to the devs it really is their code having a problem and not the server, network or firewall! ;)

Monday, April 19, 2010

Beating Microsoft's Xbox Live Payment System

I have 2 boys.  Both have Xbox Live accounts.  The $7.99/mo fee drives me crazy.  I usually watch for the on-line deals that get me 13 months for $30, but I don't always keep up with it.

Have you ever used  It's pretty infuriating.  You cannot remove a credit card from the account.  So, if your irresponsible teenage boys decide they want that new Halo map pack you're pretty much screwed unless they fear the HAMMER (visualize my clenched fist raised in the air).

I, however, have found a work around!

It requires a PayPal account or a credit card that gives you temporary numbers to shop online with.  Login to your M$ billing site and add a new credit card with your PayPal plugin.  For safety's sake make it a 1-time use card.

Now delete your "real" credit card from the account.  Add your 12+1 Xbox Live card if that's what you came to do and then jump over to PayPal's site and void the new card.  Now your kids have 13 months of Xbox Live but there's no valid card on file so they can't purchase anything new without your help.  You also won't be automatically charged $7.99/mo in 14 months ;)

I'm sure a similar thing can be done with iTunes, World of Warcraft, etc.  iTunes and World of Warcraft have purchasable cards to add credits/time to the account.  There's really no need for a valid card on file.  You'd think they'd give parents tighter control, but face it; there's no upside in them fixing it.  They want your kids to buy stuff :)

Tuesday, April 13, 2010

Printers and Microsoft's TCP/IP Port Monitoring

I found it.  This article has a lot of detail, but it does not discuss the impact(s) of turning "SNMP Status Enabled" off.

Open your printer properties, select the port and click "Configure Port."  This is the check box of which I speak:

Now I've got some testing to do ...

Based on the data in this M$ article I have cleared the SNMP Status Enabled check box and the rogue traffic has stopped.  I will test printing and provide another followup later.  Sounds silly I'm sure, but that's one less interrupt every 70 seconds on my PC ;)  I print once every 2 weeks or so.  I wasn't getting much return on my investment.  LOL