Monday, August 20, 2012
IP 9258 HTTP Parsing Problems
Warning: technical dump.
I've recently had the opportunity to work with the IP Power 9258 PDU. It's actually quite nice in many ways, but its HTTP query string and header parsing have a few terrible bugs in them.
Header field names ("User-agent" in "User-agent: my-super-browser") should be case insensitive. This PDU requires both "User-agent" and "Authorization" to be capitalized.
Query parameters are normally delimited with "&". The PDU expects "+", though between "cmd" and "p6x" you can use &.
Query parameters are also supposedly order-independent. This lovely device requires "delay" to be first (if present) and to be followed with the "+" delimiter. Using "&" will put the port in an unusable state, further testing required.
curl is your friend, the AHR2 module for Node.js is not...for now. Fixen are in the pipes.
Wednesday, August 15, 2012
Shadows
From the frightening whirl of the ether he impacted the floor, and with a lurch reality settled around him and sealed the gap through which he'd come.
Fate liked doing this. She tended to land him in places where help was needed, but they were usually strange, alien places. Now it was his turn to get off the--well, floor, judging by its smoothness--figure out where he was, and solve the puzzle(s) set before him.
As usual, he was unharmed and still had his full tool belt from the work site. Fate was not always kind--he'd once saved a race of arthropods from destruction while...less than tastefully clothed. Turns out clothing was a mark of evil in their society, so in a way she had still been kind.
Looking around, he noticed that it was a well-lit room. The dead lack of ambient noise hinted at a deep, underground installation, and he was curious just where he was... Seven smooth, space-age-style doors lined one wall while the opposite wall was, oddly enough, smooth-hewn stone. From the strata and the temperature he was quite some distance down. A few curious-looking machines stood idle at one end of the room; earth-movers by the grinder-conveyor belt face and the tracked bottom, though the machinery that followed the grinding head was quite mysterious. It was big enough he found it hard to imagine how it had gotten in here--likely sealed in as construction progressed.
He walked to each door in sequence. As he approached, they opened revealing more door-lined walls, vast, orderly rows of segments of much larger machines, one completely empty room with a tiny sign in the back: "Lost + Found." Seeing that little danger was visible, he became more bold and started opening doors in more rapid succession, covering vast swaths of ground until he discovered one of the original doors was locked. Realizing what a locked door meant--danger--he immediately started examining the door for weaknesses.
The doorframe was smooth, and the sensor that triggered the door itself was nowhere in evidence. No tool he had would fit into the crack, and nothing in his belt would so much as scratch the surface, so he tucked away the door's location and moved on.
The next door was a junk room. He stepped in and just about fell off a cliff--the room was huge! Hundreds of little trinkets sat around, some of them gleaming in the randomly-placed lights around the chamber. There were doors in the ceiling and floor, junk was haphazardly welded to segments of the walls, the walls were outright broken in a few places, and nothing was in use. The cavernous room felt dead. Again taking note of which door he had been in, he stepped back out.
The last door was odd. It slid open hesitantly, as if something were nervous about letting him in. This, like the sealed door, was intriguing, so he stepped cautiously into the largest library he'd ever seen--well, it felt like a library. Massive shelves ran all the way up to the arched roof, lit by magnificent crystal chandeliers.
The shelves were empty.
The place felt alive somehow, too. Shadows clung to the edges of the pillars and shelves, seeming to spite the lights. As he wandered around and past the first layer of shelving, he noticed strange things: cobwebs, moving shadows, books that weren't books hovering just on the edge of existence. Occasionally one of the outside walls was broken by another of the sealed doors, and he tried with less and less vigor to pry them open. Other breaks in the shelves were normal doors, behind which was a motley mix of library shelves and more doors (sic). Each room was well-lit in the middle, but the shadows hung around the outside, seemingly right on the brink of destruction.
Finally, he found it. In the back of the deepest room he found a broken wall. Shelves still clung to it, but their disarray only highlighted the wall protruding from itself.
Finding a crowbar and hammer in his kit, he discovered that the shelves cleared away easily. The fissure was just wide enough to give his tools purchase, and he began the slow process of prying the panel out.
Several minutes later, the crack was wide enough to slip through. Behind it was pitch black, so he fetched out his flashlight. All he could discover was that the floor was stone--the same as in the root node he had started in. He wriggled in.
The room was dark, but the shadows were natural. Cobwebs hung, partially obscuring the piles of boxes and crates that filled the room leaving narrow paths to walk through. Clearing the spiders' testament of time back, he found that the crates were labelled--some were old records of the library's operation, some were marked with periods of older history, and some were completely unmarked. Some of the crates were styled like the doors, while others fit better with the library's decor. It was a strange place. Crates were aging, and occasionally somewhere in the distance one would groan and collapse under the weight of its neighbors.
After what seemed forever (and about sixteen armfuls of discarded cobweb and three pyrotechnic urges) later, he found an open space with a single chair, a small end table, and a book. A sudden chill ran down his spine, and he took a step into the open space. The reluctant feeling from the library's entrance was met with an angry, dismal feeling and an argument began. He took another step. The argument felt more heated, and the sadder of the two seemed to be winning. As he arrived at the chair, he looked down at the book. It was beautifully gilt, with deep red leather wrapping its covers and bearing its title. Before he could make out the characters, the hesitant feeling yanked the table and book out of reality, and the angry feeling started condensing into a dark, elegant lady with a cold face sitting in the chair.
"I see you've been exploring the library, Amadaeus. I hope to help you find what you are looking for."
Thursday, August 2, 2012
Little Tech Tricks
So I've recently switched to a Mac Mini in one of my spheres of influence. It's been challenging; missing or stolen keyboard shortcuts still miff me, but several things have worked well for me:
- Mou. This is a Markdown editor for Macs (OS X). I have tried about a dozen in Linux, Windows, and OS X and this one takes the cake, kicks butte, `sudo rm -rf /`, and any other superlative expressions of high marks you wish to contribute. It's shiny. It does real syntax highlighting. It isn't cross-platform. :( Above all, though, it scrolls with you as you type!!! Now, as you're typing notes in class or composing a blog post, you can see what you're typing rather than scrolling back to the bottom after every change you make.
- I play with hardware. This means that I need to use serial communications fairly often, and Macs kind of suck in this department. Windows and Linux both know that a standard USB COM port is; BSD/OSX needs to be told. For the most common of these, FTDI provides their own solution. It works rather well. If you don't want to go through the effort, OSX lets you attach any USB device to a Linux virtual machine (I like VirtualBox) and let a real operating system do the dirty work. (This works for charging the Motorola W755 phone on macs and for reading EXT2/3-formatted USB devices as well.) Remember to install the Guest Additions.
- EXT2 R/O access: MacFuse combined with fuse-ext2 will at least get you started.
- iTerm2. If you do any amount of work on a terminal, iTerm2 is here to save you from xterm and Terminal. One problem; several standard keyboard shortcuts are AWOL. Lucky for you, ShadowFiend and his commenters have been gracious enough to show the world how to fix this.
- BetterTouchTool. This is how I got enough gestures and taps (middle click anyone?) working to be somewhat productive once again on OS X.
- IRC. Several programs exist that fill this need; I'm enjoying Colloquy at present.
- Google Calendar/iCal integration.
- HTTP Basic authentication. There is a simple Perl command that generates encrypted passwords. (A better article exists but was not found by me.) While Basic Auth is a terrible choice for strong security, it has many handy little uses and this makes administering those a bit easier.
- How to get an SSH Key's fingerprint. Useful when lots of little keys are running around nekked. 'Nuf said.
Monday, July 9, 2012
Setting Sail
As I choked back a quiet sob, I looked up at the ramparts of the town's wall. There the Guardian met my gaze sternly, dispassionately, and unyieldingly. I had made my choice, and I must go. Absorbing the loss was harder than I had ever imagined it would be--it felt like attending my own funeral.
Then again, my departure had been a joyous one. Most of the townsfolk looked forward to making the journey I was embarking upon--but none of them would understand the loss until they made the decision and left for themselves, taking the experience with them. While where I was going wasn't cold, it was unknown, and the place he was leaving was warm and familiar.
As I looked down into the satchel of provisions I had prepared, several mainstays of my previous life were lacking. First and foremost among them was the water from the well at the village's center. It was said that it led villagers to leave, though some had been there for years without showing a trace of its effects.
That bag was by no means empty! Among the various foodstuffs and camp supplies sat the beautiful crystal that had been given me by my chosen travelling companion. She had left some time before me, knowing that working in a trade caravan would be advantageous for us when we arrived. She had--accurately--predicted that I would miss her, and that it would be hard for me, so she had prepared for her absence from me. First had been a series of gifts and messages hidden with others in the town, and then had been this.
The bluish, clear cube rested largely on my open hand. Its cool warmth refreshed my skin from the Sun's toll, while it warmed my heart with memories. About once a day we were able to converse through it--in her foresight she had found a matched, tuned pair that could tunnel through the intervening distance and yield just such a connection. I polished it slightly, and in its own way it let me know with an irritated pinkish tinge that the connection wouldn't be open that day. I had been late leaving.
Sigh.
I looked down at my coarse all-weather tunic, up at the scorching sun, and out towards the mistwall that obscured my destination--a new adventure and a new home.
Thinking about her and the longer route she had taken, I started walking.
Wednesday, June 27, 2012
Beaconkeeper
"Well, the commstat is hailing us, and that's what we came here for; we'll be in touch!"
I was not surprised, as I knew where I was in the universe of people. Having been about to discuss replacement equipment and the local culture, I was still a tad disappointed.
In the string of video calls that ensued, I knew I stood little chance. Much of what I would of said was ignored as out-of-channel banter, with bits and pieces considered off-topic in-channel noise. Once I saw this, I realized that I was being a pain. Something needed to change.
"Helmsman, what is the current cloaking charge?"
The middle-aged officer glanced at his dials and then eyed me. "Sir, we're at 75%."
That was odd. We'd been charging it for a week and I had told him to keep it at peak readiness.
"Sir, we're at 75% of what you need. I can see that you're plotting the old Malay Turk maneuvre, and we haven't quite got the staying power to do it."
Realizing that he was three moves ahead of me, I ceded his point. "Well, we can at least ameliorate the interstitial jitter. Put us on full electromagnetic silence and engage the cloaking engine."
If you can't help 'em, don't get in their way, I thought. At least he has what he needs for when he gets here.
P.s. On a completely unrelated note, 21 days remaining. :)
Sunday, May 27, 2012
Double Double
The scientist cackled maniacally as the mixture began to bubble. Lowering his goggles and straightening his stain-splattered lab coat, he donned protective gloves before replacing the containment vessel lid.
He stepped over to the next hotplate. Observing that the matter phase change had commenced, he rapidly adjusted the dials controlling the thermal transfer. Several stirs of the mixture later he gave it one last piercing stare, grunted, and returned to the other vessel. The clear window showed the consistency to be almost right, so he deftly deactivated its heat source and stepped back.
Looking at the complex apparatus chugging along in harmony, he doffed the gloves, smiled, and sat down at the table.
This rice and stir fry were going to be great.
Thursday, May 3, 2012
A saying or two I think should be.
For juxtaposition and oddness of imagery:
She survived the disease only by the light of death's candle.
Alternately:
Her sojourn close to death was lit only by Death's flickering candle.
For dissonance with the familiar and my lack of ability to say it:
How much wood would Chuck chuck if Chuck could chuck wood?
:)