HR Geeks

Avatar

Hampton Roads Geek community

Googlebot deleted my website

Filed under: humor - security - website

So due to some really bad coding on our part, googlebot managed to wipe out a bunch of web content on one of our webpages today. The webpage is setup so that the individual pages all include a small piece of php code that pulls it’s content out of an SQL database and spits it out. We set this up for particular pages so that the user can make changes to the content with an HTML editor in a /admin sort of setup. It’s not the fanciest, but it’s simple, efficient and reliable.

Well the customer calls me this morning and tells me that all their content is missing, which I quickly confirm to be fairly accurate. I fire back an e-mail saying that the pages must have been deleted through the admin interface because the missing pages have been removed from the database. I then go off to read logfiles with the intent of finding evidence that this customer blew up their own webpage and that it’s not my problem, because that’s how I think. Here’s what I find in my logs:

66.249.73.92 - - [02/May/2008:13:48:47 -0400] “GET /admin/website_pages_delete.php?id=25 HTTP/1.1″ 200 4642 “-” “Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)”

66.249.73.92 - - [02/May/2008:13:52:39 -0400] “GET /admin/website_pages_delete.php?id=26 HTTP/1.1″ 200 4760 “-” “Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)”

66.249.73.92 - - [02/May/2008:14:10:44 -0400] “GET /admin/website_pages_delete.php?id=42 HTTP/1.1″ 200 4642 “-” “Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)”

So it would appear that the session based authentication for the pages in /admin wasn’t added to the delete script, and somehow (i’d really love to know) google managed to find out about, and traverse links from, the page with all the delete links on it. When it did, it deleted every single page out of the database. Obviously this never ever should have been possible but hey. The lesson here is don’t be lazy and just put the authentication mechanism on the index page. Fortunately it was only done on this particular site. Whatcha gonna do. I blame Google…

Comments: 4

757 Monkeys, Typewriters, and Shakespeare — Project GorillaSpeare

Filed under: IRC - cool ideas - humor - lulz

I am sure many of you have heard of the thought experiment relating monkeys, typewriters, and Shakespeare, to the concept of entropy. Monkeys Typewriters Shakespeare you say!? How much cooler can things get? Well, this creative thought experiment goes as follows:

“The infinite monkey theorem states that a monkey hitting keys at random on a typewriter keyboard for an infinite amount of time will almost surely type a particular chosen text, such as the complete works of William Shakespeare” [Source: http://en.wikipedia.org/wiki/Infinite_monkey_theorem].

I am not going to go into the history of that study, or much more. The wiki link above should do you justice. So what do monkeys and typewriters have to do with the 757ers? Well I’ll let you take a look for yourself, as I should not impose any bias:

That’s right, nerds, computers, and text generation. So I had the idea, well if there is a potential for monkeys to produce such a marvelous work as Shakespeare, surely my fellow Homo Sapiens should be able to generate something of equivalent brilliance. Thus, the birth of Project GorillaSpeare. The idea was to gather a log in #proto on the 757 IRC server, and eventually compare the log to Hamlet. Thanks to Project Guttenberg, I obtained a pure text of Shakespeare’s Hamlet, from which I parsed out the lines that represented who was to say what in the play, yep Hamlet is written as a play, and I also removed newlines, and some of the play-actions following a similar form to: [Ham. exits]. Once parsed, I wrote some code that compared each character of Hamlet to the first instance in the IRC log file of that character. Also captured was the user who constructed that character (spaces included). The processing job ended when the IRC log ran out. Now I must say, my parsing job was not perfect, nor can I credit the findings as being anything of scientific worth. But enough with the wordy-foreplay and on to the results:

  • Parsed Hamlet Text: 164642 characters
  • Parsed IRC Log: 32365 characters from January 11, 2008 till April 5, 2008. (log gathering only when I was logged in).
  • We banged out about 19.657% of Hamlet
  • About every 5.087 characters we plopped out 1 character of Hamlet.
Index
Handle Hamlet Character Matches
1 telmnstr 2140
2 count 1027
3 enferex 549
4 remad 379
5 sean 294
6 derez 284
7 skhisma 198
8 chad 196
9 zotobot 193
10 Fister 144

The rest of the results can be obtained here.

So what does this “study” tell us about our entropy? Well, for one, I would think that a 1/5 ratio of Hamlet to Nerds is pretty efficient, but that’s my opinion. The results do not tell us too much, I just figured it would be interesting to see how efficient the IRC room is at generating a novel, without the premise of doing such. Granted, we are not communicating a novel per’se, rather what our blabberings have generated is still somewhat ordered, in comparison to a text that is not our goal of generating. In the thought experiment, the monkeys are typing pseudo-randomly. The next phase (GorillaSpeare 2.0) is to compare our writings to monkeys and measure, what I assume the original intent of the monkeys was, and that is a fairly good quality of pseudo randomness. My conclusion is that monkeys, our brethren, are awesome, and we as homo sapiens are no higher. If we were asked to bang on some keyboards without a premise, I’m sure we could do just a good of job.

-Matt (enferex)

Comments: 1

Rails Envy

Filed under: IRC - humor - links

Here’s a hilarious spoof video, contrasting Django and Ruby on Rails.

You just got bitten by the snake!

Comments: 0

Continue