.comment-link {margin-left:.6em;} <$BlogRSDURL$>

Tuesday, April 11, 2006

Kid Blogging 

Eggs

It's that time of year again. Time to celebrate fertility! Bunnies! Eggs! Spring! And dead guys popping out of holes in the ground to see if Winter's going to last for another 6 weeks.

I think I might have my holidays mixed up.


You're Kidding, Aren't You? 

So, for reasons that I won't go into, it became important to me today to be able to parse, using JavaScript in a browser window, the contents of a file specified by the User in a <input type = "file" name = "fileThingee" size = "40"> tag. For complicated reasons I couldn't do the super-bitchen AJAX thing and send the file to the server, get the info I wanted and send back the info. In a sane world what I wanted to do should be impossible. Well that might be a bit extreme. JavaScript shouldn't be able to open up and read an arbitrary file in the local file system. I can make the argument that if the User has selected a file for upload to a server then S/He has given up any expectation of file privacy, but I digress.

As the interweb is currently arranged it is almost impossible to do what I want to do. But if you're running Windows and Internet Explorer, it can be done. You have to use an ActiveXObject and do something like this:

var fname = "theFileName.txt";
var fso = new ActiveXObject("Scripting.FileSystemObject");
var theFile = fso.OpenTextFile(fname, 1, true);
var fileContents = theFile.readAll();
Once you've done that you can, behind the User's back do the AJAX thing and send the contents of the file to the server from which the page was accessed. There are other methods that will open binary files.

To reiterate, if I can guess the name of a file on your system, if you're running Windows and use IE to access a page on my webserver, I can, if you have JavaScript turned on, slurp the contents of said guessed file up onto my system and the only way you'll know it happened is if you have a packet sniffer running on your internets connection.

That's fucking insane.


Monday, April 10, 2006

You Heard It Here First 

If Bush goes ahead with the threat to bomb Iran out of its Nuclear Ambitions this is what will happen: Iran will stage a conventional invasion of Iraq while the Shiite insurgents (who, by the way, haven't been nearly the pain in the ass to Americans that the Sunnis have) will go wild targeting American troops.

We will then be in a World of Shit. In an even shooting match (or even a lopsided one for that matter) the American Army can slaughter the Iranian Army. But. But American forces are currently scattered all over Iraq trying to keep the lid on the insurgency. If the Shiites make it difficult to move units around, the Army will be unable to concentrate to fight a conventional enemy and the various battalions will be mopped up piecemeal by Divisions of Iranians. And that will be that.


Sunday, April 09, 2006

My Lil Softy 

On Friday we let the boys pick out movies to rent. YA went for Bambi II (I just have to mention that I loathe Disney sequels. When was the last time Disney made anything with a 2 at the end that was any good? Or even looks like they were trying to make something good?) and YW really wanted to get King Kong. I let them have their way. We watched King Kong up to the point where MLWN was too disgusted to continue (that would be the cave of giant bugs that want to eat people (while we're on the topic, what is it with the animals on Skull Island? They really love to try to kill people. The raptors going after the apatasaurs (or whatever long-necked variety they were supposed to be, ran past mounds of quivering meat in order to bite the crunchy, virtually meat-free humans. That makes no sense)). Last night we skipped that portion and continued with the movie (yet another digression, the boys went to a birthday party at a Rock Climbing Gym yesterday. YA wore himself to such a frazzle that he went to sleep around 5 and woke up at 6:30 this morning, so he missed the end of KK). At the end of the movie, YW was wailing and had to sit in MLWN's lap for a while to calm down. He was devestated that Kong died. And he knew it was going to happen.

I guess if you can get past the fact that Kong is a fearsomely dangerous animal that kills humans without even really thinking about it, it is kind of sad that he gets gunned down.


Monday, April 03, 2006

Kid Blogging 

Mori Point

I haven't done Kid Blogging in a while and the last one I did was of YW, so here's YA on a hike we did a couple weeks ago near Mori Point. Mori Point, for you Harold and Maude fans out there, is where Harold drives the Jaguar off the cliff at the end of the movie. YA has his binoculars because we stopped to gaze out to sea for a while to see if we could see any whales swimming by. We didn't. We did see a couple container ships on their way into the Bay, but that's all.


This page is powered by Blogger. Isn't yours?