Skip to content

Archive for

17
Apr

My afternoon, as told in Adventure Game format.

LOOK

You are currently locked outside of your house. You have left your keys and wallet back in a drawer safely beside your bed. You keep a spare key inside the office, but it is far away.

Nearby, there is a bike, and your roomate’s car.

IMG 20110417 121945

LOOK SELF

You are an out of shape, 30 year old IT Manager from an urban neighborhood in New England.

INVENTORY

You have:
Your Phone
A Macbook
No Coffee

LOOK CAR

You examine your roomate’s car.
The car is a 2002 Saturn S series, which has seen better days.
You find yourself whistfully wishing your Scion was here, as you tear through your roomate’s things with little regard for personal property.

Inside the front section of the car are standard controls, including a steering wheel and many dials and knobs.
There are additional levers on the floor.

There is a center compartment.

There appears to be a collection of things in the back seat.

DRIVE CAR


Your keys are still safely in the drawer by your bed. You are unable to drive the car.

SEARCH CENTER COMPARTMENT

You find several CDs, some quarters, and a tire gague.

IMG 20110417 123738

TAKE TIRE GAGUE


Taken.

IMG 20110417 123806

TAKE MONEY


Taken. You now have $2.25

RIDE BIKE TO OFFICE

The tires are too flat to ride.


LOOK LEVERS

The Levers appear to open the trunk and the gastank.


IMG 20110417 122352

OPEN TRUNK

The trunk contains several items, including a hatchet, several radios, a pair of shoes, a crowbar, jumper cables, and a some paperwork.

IMG 20110417 122501

LOOK HATCHET


The trunk contains what appears to be a standard grade hatchet, used for cutting down trees, or destroying very weak enemies. It is likely illegal to carry in your jurisdiction.

IMG 20110417 122419

LOOK CROWBAR

The car contains a small crowbar that may be useful for opening doors or windows. It appears unused.

IMG 20110417 122443

EXAMINE BACK SEAT

The Back seat contains several porcelain plates, a survival kit, a bike carrier, some napkins, an emergency battery jump start battery, and the lid to a trash can.

IMG 20110417 122001

EXAMINE SURVIVAL KIT

The Survival kit contains the basics that any Junior Woodchuck needs to survive in the Urban world: A Tire compressor, WD40, Duct Tape, A first aid kit, Two screwdrivers, A flash light, and Fix-a-flat.

IMG 20110417 132129

TAKE DUCT TAPE


You deftly swipt the duct tape from it’s kit.

TAKE WD40

You carefully take the WD40 from it’s kit. Your pockets are now full. You will have a difficult time carrying further items long distances.

IMG 20110417 132209

USE TIRE COMPRESSOR ON BIKE TIRE

The cigarette lighter on this car is destroyed. You will need to find another avenue.

USE TIRE COMPRESSOR ON EMERGENCY BATTERY

The emergency battery is out of electricity.

IMG 20110417 124321

USE EMERGENCY BATTERY ON CAR BATTERY

You connect the emergency battery to the car’s battery. The cables for the emergency battery are old and thick, and do not remain connected for long. The car’s battery is corroded. You should come up with a different approach.

CLEAN BATTERY

You clean the battery to the best of your ability. It helped a little, but you know that you do not have a sufficient clean area to make a proper connection

IMG 20110417 122230

RETRIEVE JUMPER CABLES FROM TRUNK

Done……

USE JUMPER CABLES ON CAR BATTERY AND EMERGENCY BATTERY

Are you sure you want to do this…?

USE JUMPER CABLES ON CAR BATTERY AND EMERGENCY BATTERY!

You connect the jumper cables to the battery, and to the emergency battery. Electricity flows from there to the compressor, which begins running.

IMG 20110417 122633

USE COMPRESSOR ON BIKE

You have expended the car’s battery reserves. Your Tire gauge shows the tires are half-inflated. You had better go back to the house and try something else.

USE FIX-A-FLAT ON BIKE

Well.. Fix-a-flat does contain compressed air.. I suppose…..

IMG 20110417 125527

You are able to inflate the bike’s tires to 85%.

RIDE BIKE TO OFFICE

You begin your ride to the office to retrieve your spare key. Things move fairly well on your recently inflated tires, although they are still somewhat squishy. You are reminded that you are very out of shape, and not very good at riding bikes.

As you are riding and go over a curb, your low tire pressure does not adequately protect the bike from the shock. The bike seat has fallen apart.

IMG 20110417 132819

USE DUCT TAPE ON SEAT

You are suddenly glad you had the foresight to bring the duct tape with you. You repair the bike.

IMG 20110417 132959

USE MORE DUCT TAPE ON SEAT

You use an appropriately ludicrous amount of duct tape on the seat for no apparent reason.

IMG 20110417 133040

GO TO GAS STATION

You petal until you arrive at a gas station. It is in the opposite direction of your office.

USE QUARTERS ON AIR MACHINE

You fully fill your tire with air. Your tire gauge shows your tire to be at 100%

IMG 20110417 133428

RIDE BIKE TO OFFICE

You begin riding to your office to retrieve your spare key. You are very out of shape, and it is uphill the entire way.

You collapse in a pile of exhaustion.

IMG 20110417 140028

RIDE BIKE TO OFFICE

You summon an inner will that had long been forgotten. Your muscles ache, and you cannot breathe. You feel as if you will die soon.

You arrive at the office.

IMG 20110417 141441

RETRIEVE SPARE KEY

The office is locked, and there is no one to let you in. Your key to the office is in your nightstand at home. We advised you several times that this course of action was not advisable.

You have died.

RESTART

You mind swims as you restart the game. You have vague memories of biking back to your original starting place.

You are currently locked outside of your house. You have left your keys and wallet back in a drawer safely beside your bed. You keep a spare key inside the office, but it is far away.

Nearby, there is a bike, and your roomate’s car.

CHECK HINT BOOK

You call the Local police district, which is the closest thing you can find to a hint service. They arrive, with the fire department, and advise that you check all windows verify if one might be unlocked.

IMG 20110417 151128

IMG 20110417 151132

USE CROWBAR ON WINDOW

You retrieve the crowbar from the car, and use it to open a window from the porch. You are now able to enter the house.

You have completed the game. Your final score is -20; You have collapsed once, died once, and needed to use a hintbook. Better luck next time!

14
Apr

Why no company that values their data should EVER “Go Google”

I’ve been working with Google Apps for your Domain for years. Most recently, I set up my current company, to use Google Apps- We’ve been running flawlessly for 6 months, paying them $50/user to avoid handling it ourselves.

The problem is, Google is entirely useless whenever there finally IS a flaw.

Incident #1- Last week, we had a file in Google Docs become “Unavailable”.

We have quite a few documents in Google Docs that our Sales team uses to help coordinate. On Friday, one of these files became unopenable.
No users were able to open the file- They couldn’t open it inline, email it, save it, or access it in any way.

Using the “Recovery” option in the app helpfully gave us the error message “We were not able to find any version of the spreadsheet that could be safely recovered.”

Why Gee, thanks.

We’re not the only ones who have had this problem, either.

We emailed Google’s support, and explained that as paying customers, we’d kindly like access to our file please.
I received a generic message back-

Thank you for your message. I understand that you are experiencing an issue uploading documents.

I believe the nature of your issue is that you are attempting to upload some existing documents to your Google Apps accounts, if I’m incorrect I apologise and please clarify by replying to this message.

When uploading documents there are a few limitation that you should be aware of, such as:
   * Each user in your domain has 1 GB of storage for Google Docs. Usage information is shown to users when they upload a document.
   * Google Apps for Premier users can upload files up to 1 GB.
   * If a file is converted to a Google Doc then the following limits apply:
<Convert documents - up to 500KB per file.
<Convert presentations - up to 10MB per file.
<Convert spreadsheets - up to 1MB per file.
* These are the file types that can be converted to Google Docs:
For spreadsheets: .xls, .xlsx, .ods, .csv, .tsv, .txt, .tab
For documents: .doc, .docx, .html, plain text (.txt), .rtf
For presentations: .ppt, .pps (.pptx and .ppsx is not supported)
For drawings: .wmf
For OCR: .jpg, .gif, .png, .pdf.

For more information on uploading documents, please visit http://docs.google.com/support/bin/answer.py?answer=37603 .
and also
http://docs.google.com/support/bin/answer.py?answer=186466.

If after reviewing the information above you are still experiencing the issue please don’t hesitate to reply to me and I will be delighted to assist you and if necessary I’ll consult with our Docs specialist.

Sincerely,
[Name Withheld]

Why Thanks! That’s… Not helpful at all.

I sent them another email, asking that they kindly help us access the file. I’ll take an emailed version of it as a xls. I’ll take a CSV. I’ll take an online version. Heck, I’d take a screenshot of the file. Nothing.

We got back several emails explaining that they are very sorry, but while they are working on retrieving the file, they can’t promise any dates or times.
It’s now been over 4 days, and still no file.
Luckily, in our case, while the file was very important, we were able to recreate it by using various other internal tools.
For other files, we may not have been so lucky.

We back up all files on all user desktops, but anything that’s created directly at Google is never stored on the local desktops, so doesn’t get backed up by us.
We’ve now started emailing ourselves copies of every file that’s stored at Google and then saving them locally, but it’s an annoying manual process.

The lesson we’ve learned is that storing documents in Google Docs is not safe, and should only be done for truly replaceable/temporary documents.
If you want to store your Holiday Shopping list there, Sure. But you’re nuts to store anything there that your business relies on.

Incident #2- Today, Google broke our Email.

If there’s one team you’d expect to know how to handle email reliably, it’d be the Gmail guys. When we first signed up for Google Apps email, the one concern I had was that Google is nearly impossible to get a hold of when things go wrong.. Today, we’ve seen how true that was.

This morning, we had a technical problem.. The exact details don’t much matter, but it caused email to entirely go down for us. [1]

The exact technical details of the problem don’t matter much- I’m sure Google can fix this bug, as well as the document bug in Incident #1-
The problem with both was that there was effectively no way to escalate.
We called their technical support, we emailed, we explained that email was absolutely MISSION CRITICAL, and we needed it or we were in danger of losing large deals.

Google continually assures us that they’re working on it, but 5 hours later, There was no change, and no update. Everything was “In process”.
Working with them before, I’ve had them say that for up for 48 hours before the domain was fixed.

Since we couldn’t afford to wait that long, I used DynDNS to setup a mail forward for the domain, redirected the MX records, and have mail arriving again. Google continues not to have any useful answer to fixing things on their side.

I love Google Apps, particularly for email. I’ve run Exchange Servers, I’ve run Zimbra servers, and I know it’s a pain in the butt to back it all up, deal with routing, recovery and ensure it stays reliable. I’m happy to pay Google to do this.

But keeping your company on Google Apps just isn’t safe. When things go wrong, no matter how critical it is to you, Google just doesn’t care.
Your email may be mission critical to you, but to Google, you’re just customer number 10 billion and four that they don’t have much time for.

Sadly, I’d strongly recommend that all companies that care about their email and files move off of Google Apps immediately.


[1] I wanted to transition a ‘domain alias’, to become a ‘secondary domain’.. What that means is that we have a second domain that currently matches up every email address, 1:1, with our primary domain- User@domain1.com and User@domain2.com go to the same backend mailbox.
This has worked fine for us for the last few months, but when we tried to remove domain2.com as a domain alias, and re-add it as a secondary domain, google crashed.


After this happened, we were unable to re-instate the domain alias, unable to remove it..
We couldn’t add it as a secondary domain, we couldn’t do anything with it.

The domain still showed up as if it were active as a domain alias in Google’s control panel, but mail delivery for that domain started failing.
Every message to that domain was generating a bounce.


Postfix- After posting, Google was able to help my company resolve both issues. Total time was 5 days for the corrupted file, and 14 hours for email outage.

6
Apr

How to use m2crypto (Tutorial)

I’ve been looking over various Python engines over the last few weeks, and M2Crypto seems to be the best combination of portability and power, but the docs on how to use it were somewhat (read: Very) lacking.

What I work best with is a simple set of examples that explore the functions, and get me started with the parts I need. H

I asked an experienced M2crypto developer to some examples together with me, and wanted to post them here, in case any one else should need it.

#Since I ask this of people before using their code samples, anyone can use this under BSD.
import os
import M2Crypto

def empty_callback ():
 return
 
#------------------------------------------------------------------------------------------------#

#Seed the random number generator with 1024 random bytes (8192 bits)
M2Crypto.Rand.rand_seed (os.urandom (1024))

#Generate public/private key pair for Alice
print "Generating a 1024 bit private/public key pair for Alice..."
#If you don't like the default M2Crypto ASCII "progress" bar it makes when generating keys, you can use:
# Alice = M2Crypto.RSA.gen_key (1024, 65537, empty_callback)
#You can change the key size, though key lengths < 1024 are considered insecure
#The larger the key size the longer it will take to generate the key and the larger the signature will be when signing
#You should probably leave the public exponent at 65537 (http://en.wikipedia.org/wiki/Rsa#Key_generation_2)
Alice = M2Crypto.RSA.gen_key (1024, 65537)

#Save Alice's private key
#The 'None' tells it to save the private key in an unencrypted format
#For best security practices, you'd use:
# Alice.save_key ('Alice-private.pem')
#That would cause the private key to be saved in an encrypted format
#Python would ask you to enter a password to use to encrypt the key file
#For a demo script though it's easier/quicker to just use 'None' :)
Alice.save_key ('Alice-private.pem', None)

#Save Alice's public key
Alice.save_pub_key ('Alice-public.pem')


#Generate public/private key pair for Bob
print "Generating a 1024 bit private/public key pair for Bob..."
Bob = M2Crypto.RSA.gen_key (1024, 65537)
Bob.save_key ('Bob-private.pem', None)
Bob.save_pub_key ('Bob-public.pem')

#------------------------------------------------------------------------------------------------#

#Alice wants to send a message to Bob, which only Bob will be able to decrypt
#Step 1, load Bob's public key
WriteRSA = M2Crypto.RSA.load_pub_key ('Bob-public.pem')
#Step 2, encrypt the message using that public key
#Only Bob's private key can decrypt a message encrypted using Bob's public key
CipherText = WriteRSA.public_encrypt ("This is a secret message that can only be decrypted with Bob's private key", M2Crypto.RSA.pkcs1_oaep_padding)
#Step 3, print the result
print "\nAlice's encrypted message to Bob:"
print CipherText.encode ('base64')
#Step 4 (optional), sign the message so Bob knows it really was from Alice
# 1) Generate a signature
MsgDigest = M2Crypto.EVP.MessageDigest ('sha1')
MsgDigest.update (CipherText)

Signature = Alice.sign_rsassa_pss (MsgDigest.digest ())
# 2) Print the result
print "Alice's signature for this message:"
print Signature.encode ('base64')


#Bob wants to read the message he was sent
#Step 1, load Bob's private key
ReadRSA = M2Crypto.RSA.load_key ('Bob-private.pem')
#Step 2, decrypt the message using that private key
#If you use the wrong private key to try to decrypt the message it generates an exception, so this catches the exception
try:
  PlainText = ReadRSA.private_decrypt (CipherText, M2Crypto.RSA.pkcs1_oaep_padding)
except:
  print "Error: wrong key?"
  PlainText = ""

if PlainText  "":
  #Step 3, print the result of the decryption
  print "Message decrypted by Bob:"
  print PlainText
  #Step 4 (optional), verify the message was really sent by Alice
  # 1) Load Alice's public key
  VerifyRSA = M2Crypto.RSA.load_pub_key ('Alice-public.pem')
  #2 ) Verify the signature
  print "Signature verificaton:"

  MsgDigest = M2Crypto.EVP.MessageDigest ('sha1')
  MsgDigest.update (CipherText)

  if VerifyRSA.verify_rsassa_pss (MsgDigest.digest (), Signature) == 1:
   print "This message was sent by Alice.\n"
  else:
   print "This message was NOT sent by Alice!\n"

#------------------------------------------------------------------------------------------------#
 
#Generate a signature for a string
#Use Bob's private key
SignEVP = M2Crypto.EVP.load_key ('Bob-private.pem')
#Begin signing
SignEVP.sign_init ()
#Tell it to sign our string
SignEVP.sign_update ('This is an unencrypted string that will be signed by Bob')
#Get the final result
StringSignature = SignEVP.sign_final ()
#Print the final result
print "Bob's signature for the string:"
print StringSignature.encode ('base64')


#Verify the string was signed by Bob
PubKey = M2Crypto.RSA.load_pub_key ('Bob-public.pem')
#Initialize
VerifyEVP = M2Crypto.EVP.PKey()
#Assign the public key to our VerifyEVP
VerifyEVP.assign_rsa (PubKey)
#Begin verification
VerifyEVP.verify_init ()
#Tell it to verify our string, if this string is not identicial to the one that was signed, it will fail
VerifyEVP.verify_update ('This is an unencrypted string that will be signed by Bob')
#Was the string signed by Bob?
if VerifyEVP.verify_final (StringSignature) == 1:
 print "The string was successfully verified."
else:
 print "The string was NOT verified!"