USB Game Controllers and Windows 8

Once upon a time, long ago, I had an Unreal Tournament problem. The problem was that I was playing too much Unreal Tournament. So I gave it up and, since then, haven’t played games much at all.  Recently, however, I found myself pet sitting a puppy that needed to be kept in a confined space, eg: my office, and needed company, eg: me, so I grabbed a game I’d read about: Guacamelee.  And I had some Nintendo style knockoff controllers laying around from having built a Raspberry PI MAME machine for fun.  I installed the game, plugged in the controllers, confirmed Windows saw them, and fired up the game.  It couldn’t see the controller at all.

I did two things to fix this problem.  First, I installed DirectX.  Secondly, I downloaded x360ce, unpacked it into the root directory of the game, renamed the xinput1_3.dll to xinput9_1_0.dll (which is already done for you in the download above), fired up x360ce.exe to confirm it could see the controller, killed it, and fired up the game.  Voila – controller.

Complications Of a Small Town, Pt 1

FoamHand-Skele-Shirt_large

I’m a naturalized ATLien.  I wasn’t born there, or in the south at all, but I lived there from early high school on.  Nearly 30 years, all told.  From there I moved temporarily to Phoenix, another large city.  And from there I moved to my current hometown of Bend, Oregon, population roughly 90,000.  Prior to moving here I anticipated what “small town” life would be, including its difficulties. Limited restaurants, limited stores, limited entertainment possibilities etc.  Among the things a wise person doesn’t do in Bend are purchasing a car. Cars old and new are easily 30% more here.  I’ve debated having a buddy back east flatbed me cars sought after here to resell.  Even with the cost of ‘bedding them I think a decent profit could be turned. Thrift stores here will surprise you as well.  Bend has the most expensive Goodwill I’ve ever been in, and I’ve shopped Goodwill in various super-high rent coastal California towns (protip – if you’re in a high dollar hood and have the time, hit their Goodwill.  Rich folks take some amazing shit to Goodwill).  You also don’t buy furniture here, unless you’re looking at custom stuff, which is well out of my league.  If you’re after IKEA quality furniture, you plan a trip to Portland.  While you’re there grab some Indian food or some Italian, because the Italian restaurants and one Indian restaurant here in town suck.

One thing I didn’t think about was healthcare.  Unlike Indian food or Subarus, that shit’s important, and when you need it you’re usually not in a position to shop around.  The lone hospital here is insanely expensive, variable in quality and – thanks to Bend’s retirement class and “active” lifestyle living – fucking busy.  A friend recently badly broke her humerus snowboarding, and the hospital loaded her up with percoset, sent her home, and made her wait over a week for the surgery she needed to set it.  A week.  With a snapped humerus.  Similarly (though not nearly as painfully), my wife’s been loaded up with painkillers so she can wait the two weeks they’re telling her it’s going to take to squeeze her in for a much needed root canal.  There are all of 2 – count ’em, 2 – endodontists in the all of Bend.  We’ve discussed making the 3 hour drive to Portland just for dental work… when we’re not discussing going to Costa Rica for it, which makes more and more sense these days especially with my craptastic insurance coverage (High Deductible Plan For The Lose!).

St._Charles_Medical_Center_-_Bend,_Oregon_-_3_fs

Not too long after we moved here I got a kidney stone that woke me in the dead of night with excruciating pain.  The hospital ultrasounded me, diagnosed me, and sent me packing with a bottle of painkillers, a paper hat to piss in, and a bill that amounted to them making well over a thousand dollars an hour off of me.  I told my wife ‘The next time I tell you I feel like I’m dying, hit me in the head with a hammer and take me to Portland.”

After living in gigantic cities, small town life is groovy.  There’s tons to do here in Bend.  That which they call traffic is laughable.  People are (mostly) very nice.  The pace here is slower than big city living.  It’s beautiful.  The air is cleaner, the sense of community strong.  It is all the things that a person moves from the city to a town for.  But it’s also expensive, inconvenient, limited and oftentimes frustrating.  Having lived here for over a year now I’m surprised that people retire to towns like this one.  Me, I’d probably rather be somewhere closer to a metropolitan city, where I can get top of the line healthcare when I need it.

TrueCrypt Open Audit

Phase 2 is done.  Read it here.  The findings summary is basically:

During the engagement, CS [Cryptography Services] identified four (4) issues, and none led to a complete bypass of confidentiality in common usage scenarios. The standard workflow of creating a volume and making use of it was reviewed, and no significant flaws were found that would impact it.

The most severe finding relates to the use of the Windows API to generate random numbers for master encryption key material among other things. While CS believes these calls will succeed in all normal scenarios, at least one unusual scenario would cause the calls to fail and rely on poor sources of entropy; it is unclear in what additional situations they may fail.

Additionally, CS identified that volume header decryption relies on improper integrity checks to detect tampering, and that the method of mixing the entropy of keyfiles was not cryptographically sound. Finally, CS identified several included AES implementations that may be vulnerable to cache-timing attacks. The most straightforward way to exploit this would be using native code, potentially delivered through NaCl in Chrome; however, the simplest method of exploitation through that attack vector was recently closed off.

So basically, unless you’re concerned about the Windows API generation of the encryption key, the last version of TC prior to the developer bailout remains an effective encryption solution.  And TCNext is out there, though they’ve got no new version as yet (7.1 is available there).

Auto Repair and The Web

One of my clients (and friends) hit me up the other day, out of the blue, asking about the value of domain names. He’d been contacted by a squatter sitting on a name relevant to his business.  He called and spoke to the squatter and ultimately agreed to purchase the rights to the name.  Immediately after the call Mr. Squatter began snarfing up any and all other domain names similar to the one he’d just sold and started mailing my friend about them.  His emails sounded technical and official:  “I managed to procure XXXXXXX.com domain name and would like to offer it to you for $150.”

I explained to my client friend that “procure” sounds fancy, but all this dude did was snatch up some domains available out there in the wild for between $8 and $15 apiece, which took him all of 3 minutes and anyone can do, and now he’s marking them up 1000%.

Domain squatting like this is a strange business to be in.  Really all a squatter is doing is making a living taking advantage of the ignorance of non-technical people.  I imagine that successful squatters fancy themselves clever.  Beats accepting the truth, which is that they’re sleazy.  I associate squatters with shitty auto mechanics and shitty home contractors.  We all know a story about a mechanic or a contractor that told someone something completely untrue to use their ignorance to try to rip them off.

My own story is this:  as a kid I owned a Datsun 310gx manual (which I dearly wish I still had, but I totaled it).  It was having trouble getting into 2nd gear so I took it to a mechanic who told me that the transmission needed replacing and it was gonna cost me somewhere around $450.  That didn’t sound right based upon my driving experience, and I didn’t have the money regardless, so I took my car back.  A friend recommended a different mechanic, who within 10 minutes diagnosed my problem and said “You need a clutch adjustment.”  Less than a half hour later my car was ready and I think I paid the guy $25 for the fix.

Domain squatters make their money being that first mechanic. And just like that first mechanic does to the second, they make all of us people trying to make an honest living on tech look bad.

Cisco VPN Command Line

I work remote, and use the Cisco VPN client to connect to the network.  There’s a timeout set on our concentrator that gives me the boot every day.  It’s a minor annoyance to be sure, but still.  It’s no fun being deep in thought on a server only to be unceremoniously kicked from the network.

So I’ve been fiddling with the command line interface of the client, to see if I can cobble together a script I can schedule to log me out and back in on my time frame rather than that of the concentrator.  Here’s what I’ve come up with so far.

"%programfiles(x86)%\Cisco Systems\VPN Client\vpnclient.exe" disconnect

@echo y | "%programfiles(x86)%\Cisco Systems\VPN Client\vpnclient.exe" connect %1 user %2 pwd %3 nocertpwd stdin

The first line disconnects the current connection (if already disconnected the script continues gracefully).  The second line needs 3 arguments fed to it in this order: profile, username and password.  the @echo y | exists because the concentrator I connect to has a disclaimer splash that requires a Y response to bypass in order to fully establish the connection.

Thus far my only problem is I’ve not found a way to suppress the client GUI window that appears when the disconnect occurs.

PCI\VEN_8086&DEV_29D4&SUBSYS_281E103C&REV_02

Rebuilding an old HP dc5800 to Windows 8.1 64 and a pesky PCI Simple Communications Controller can’t find its driver.  Its hardware id is:

PCI\VEN_8086&DEV_29D4&SUBSYS_281E103C&REV_02

Googlin’ turns up lots of dead links.  It’s the Intel Management Engine Interface, and here is the driver.

Yeah, I know the title of this post overruns the right column.  I figure by having the hardware id be the post title it will be easier for people in need to find, so I’m leaving it.

What’s Art?

wander1I made this to submit as a possible logo for an event.  Ultimately I’m pretty meh with how it came out, but making it started me thinking about art.  Thanks to technology my generation in particular has seen quite a change in the creation, and potentially the definition, of art. Bearing that in mind, is this creation of mine art?  Is it even my creation?  The owl began a photo I did not take, as did the moon.  The background originates from an image I did not create.  The text is in a font I did not create.  They’re all found items that I digitally manipulated – some dramatically – to suit my purposes.  So is this art?  Is it just theft?

The music on The Beastie Boys 1989 release Paul’s Boutique, ranked 156 on Rolling Stone magazine’s greatest 500 albums of all time, is comprised almost entirely of samples.  It’s an album that, thanks to changes in laws, would be impossible to make today.  The cost of securing the rights to all the samples would be enormous.  Here’s just a partial list of samples featured on the album.

Is Paul’s Boutique art?  Is it just theft?  And, if Paul’s Boutique isn’t art, then what of Warhol?  Shepard Fairey?  Banksy?  Where is the line drawn?

PS:  Three things.  

1. The word “art” doesn’t mean “good.” There’s bad art. Obviously that’s mostly (entirely?) subjective. So simply not liking something doesn’t make it not-art.

2. Obviously I’m not putting anything referenced above on equal footing. They’re all examples of projects created from existing media or artists known for works created from existing media.

3. It’s my personal opinion that, for the most part, art is the product of exercising creativity. To that end, every time a person picks up a guitar and plays something they came up with, it’s art. Even if they never play it again, and no one ever heard it other than them, for that moment there was art afoot. I believe a carpenter can be an artist. A cook can be an artist. I do not like the line some people try to draw between “art” and “craft.” I understand that crocheting something from a pattern is different from crocheting something of your own inspiration, but too many critics use the former activity to label the medium of crochet not-art. You can make art out of anything, dammit. And art doesn’t have to be paid for or displayed to be art. Art doesn’t have to be shared at all. The pictures my son draws, pulled from his own mind, that he discards once he’s done with them… they’re art. Rare art at that.

Perl MP3 ID3 Tags

I keep my mp3s in directories, separated by genre/artist – album.  I like to keep my tags clean and uniform (and I use Tag&Rename for that), but sometimes I let my collection get away from me a bit.  When that happens I bust out Perl because, well, I guess because it’s familiar.  I’ve written scripts to do simple things like remove non media files recursively from directory structures and alter file and or folder names (say, change underscores to spaces or remove common unwanted verbiage).  Because these scripts are for me, there’snever really any error handling or debugging.  They’re quick one-offs, written for no one but myself.  They’re rarely (never) written as efficiently as they could be.  They’re not like my production code, which I’m meticulous about.  These are sloppy little tools, written as quickly as possible, made to solve immediate irritations.  Here’s an example:

use File::Find::Rule;
use MP3::Tag;
use List::MoreUtils qw(uniq);

my @txt_files  = File::Find::Rule
    ->file
    ->name('1 *', '01 *','1_*', '01_*','1-*', '01-*')
    ->in('\\\\server\\music\\mall');

foreach (@txt_files)
{
    $mp3 = MP3::Tag->new($_);
    $mp3->get_tags();
    if (exists $mp3->{ID3v1})
    {
        $taggit = $mp3->{ID3v1}->artist . "\t" . $mp3->{ID3v1}->album . "\t" . $mp3->{ID3v1}->genre;
        push(@tags, $taggit);
        print "Filename: $_\n";
        print "Artist: " . $mp3->{ID3v1}->artist . "\t";
        print "Title: " . $mp3->{ID3v1}->title . "\t";
        print "Album: " . $mp3->{ID3v1}->album . "\t";
        print "Genre: " . $mp3->{ID3v1}->genre . "\n";
    }
$mp3->close();
}

@sortedtags = uniq(@tags);

open (OUTPUT, ">tags.txt");
foreach $tag (@sortedtags)
{
    print OUTPUT $tag . "\n";
}
close (OUTPUT);

This one finds all the files in the \\server\music\all\ path beginning with 1 or 01 (or 1_ or 01_ or 1- or… you get the picture), dumps their ID3V1 Artist, Album and Genre tags into an array, winnows that array down to unique values, and dumps that to a text file.  Why?  Because sometimes I’m unsure what genre I’ve labeled an artist/album (and let’s be fair here.  Are the Night Birds Punk or Rock?  The Ramones?  And is Thom Yorke Rock or Electronic?  Hmm?  If Tom Petty’s Damn The Torpedoes is Classic Rock, then is Hypnotic Eye as well?) and rather than have to open the directory and look at the tag on one of the songs, I wanted a way to just dump it to a file to refer to later.

Why is it listing the Filename, Artist, Title, Album etc in the CMD as it runs?  Because I’m a dork and like to watch things run in command lines.

Why didn’t I write some fancy regex to handle the file name match, or better yet write something that would just pull the data from a single file per subdirectory?  Because there’s a tipping point.  If you spend more time writing and testing your script than it would take doing manually whatever you’re writing your script to automate, you’re not being effectively lazy.

I’ve definitely been guilty of taking more time to write a script than what it would take to just do the task, but in those instances it’s because I’m enjoying writing and testing and learning.  Sometimes I don’t want to write and test and learn.  I want to kick some sloppy shit off in a CMD prompt and let it run in the background while I pick my nose and watch redlettermedia.  I don’t care how long it takes, so long as I’m not the one doing it anymore.  Somewhere there are probably nerds who are very unhappy with me for that statement.  Too bad.

Windows 8 Preview Pane woes

I don’t like the Windows 8 preview pane.  It makes moving and deleting things difficult, especially over network shares.  It likes to lock shit up thanks to the (usually hidden) thumbs.db file it creates.  So, turn it off.  It’s a simple reg hack:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoReadingPane"=dword:00000001

Windows 2008 r2 Updates Reboot Loop

Tonight was our maintenance window at work, and I updated a bajillion virtual servers. Went OK save for one Windows 2008 r2 box that got stuck in a reboot loop. Updates failed, so I bounced the box to start fresh.  It would begin boot, show the dialogs for installing/configuring updates, reach “Configuring Updates: Stage 3 of 3,” and crater. Repeat infinitely. Thankfully the fix was easy. I mounted and booted from the 2008 Server ISO and:

  • Selected to Repair
  • Selected the Command Prompt option
  • Executed the command del C:\Windows\winsxs\pending.xml (actually because it was a virt the drive wasn’t C, but you get the idea)
  • Restarted and let it boot from the hard drive

After that it came up fine.