HR Geeks

Avatar

Hampton Roads Geek community

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

Securely Deploying TOR Hidden Services

Filed under: networking

I have always been a fan of the underlying concepts of TOR. I frequently utilize it in my scripts to simulate traffic from all over the globe. From a programming prospective, I’ve used it for anything from testing a web service to rigging an online poll… OK, I’m just as guilty of using TOR for its unintended purposes as anyone :)

Recently I decided to try setting up a TOR hidden service. While “anonymous” browsing via TOR is fairly well known, the ability to setup anonymous servers is often overlooked. When you setup a hidden service, you can host applications on a server whose location is completely unknown. All traffic to and from the service is encrypted and comes “anonymously” over the TOR network. Sounds neat! What’s the catch!?

The Catch: If the server hosting your hidden service is ever compromised, so is the IP of the server and most likely its owner. If you setup a anti-scientology forum using PHPBB and it gets exploited (that never happens), any anonymity provided by the TOR hidden service can be stripped away. If this happens, expect to hear from their lawyers

I had the idea to setup an anonymous bittorrent tracker on the TOR network. With all the good trackers getting shut down, why not setup an “untrackable” tracker that couldn’t get shutdown.

VMWare is really handy for setting up a secure hidden service. Without VMWare you would need two dedicated workstations. The diagram below shows my take on setting up a secure hidden node.

TOR Hidden Service

The concept of this network is fairly straight forward. Your application server (in this example Apache) needs to be isolated from any networks that have internet connectivity. If your hidden service is exploited, the attacker must not be able to determine where your application server is located.

In this example, my application server (10.0.1.2) can only talk to the TOR proxy node on its secondary address on the 10.0.1.0/24 network. Firewalls running on both servers prevent any traffic that is not HTTP traffic requested from the TOR network. If someone exploits my tracker and runs unauthorized code, they only have access to the local box. They can not originate any traffic that was not requested by the TOR proxy running on 10.0.1.1.

The TOR node has a secondary interface on the SOHO LAN. This interface is used only for encrypted TOR traffic coming to/from the internet. This server should only be permitted to reach the TOR network over its encrypted connection and not have full NAT access to reach the internet. We’re putting a lot of trust in the TOR daemon. If it were exploited, you’re hidden service location would also be visible to the attacker.

I wasn’t super paranoid in my testing and used iptables on the hidden service and TOR node. If you’re really nervous, you’d need hardware firewalls to prevent the box from being exploited and having someone strip down your ruleset.

Is this a lot of work just to setup a hidden service? Yes, yes it is! For those wondering, my experiment was a total failure. While it worked technically, it was so slow no one would ever use it.

If you’re wondering, most hidden services are crap. The good ones are, well, hidden! The only real exception to the public hidden services is WikiLeaks. WikiLeaks is an excellent example of a site that was facing censorship and turned to the TOR network to ensure they could continue to make their information public.

Comments: 1

Google AppEngine

Filed under: Uncategorized

I noticed an article about yet another fine google service, AppEngine. It looks like google is releasing a set of tools that allow you to build a web application to run on Google’s servers. It is in preview right now (registration is already full, I tried). The idea is that you write an application using Google’s SDK which, according to Google, provides:

  • Dynamic webserving, with full support of common web technologies 
  • Persistent storage (powered by Bigtable and GFS with queries, sorting, and transactions)
  • Automatic scaling and load balancing
  • Google APIs for authenticating users and sending email
  • Fully featured local development environment

So basically google is giving you all the tools you need to build a shared-nothing web application with great scalability, running on their infrastructure. The glory of it all, is that you don’t even have to know what shared-nothing is or appreciate why it works. Just use the authentication system and database driver they hand you and it’s all done. Oh and the first 500MB of storage, 200M megacycles of CPU per day, and 10GB bandwidth per day are likely going to be free. You have to pay if you want more than that. Right now it’s for python only but I see mention of support for other languages too. Oh and they include the Django template module built into the SDK for you Django nerds. I wonder how long it’ll be before they open up more devloper accounts. I quiver with anticipation.

Comments: 2

AVG Network Edition 8

Filed under: Uncategorized

For those of you that are after an alternative to Symantec Corporate, I present to you AVG Network Edition. Over the last couple years I’ve become sort of a closet AVG fan, but I’ve finally come to respect it as a fine antivirus product, and the price is right. The Network Edition is setup to give you centralized management of the workstations via AVG Admin Console, letting you silently install it on workstations from the server, monitor client configurations and check for any problems. I didn’t really care for version 7, the network installer was really counter-intuitive and difficult to use but I just started rolling 8 out at a customer site earlier today and it’s as smooth as can be. It’s also worth noting that if you choose to buy their server packages like exchange server or file server edition, they also work with the Admin Console so you can control the servers from the same place. It’s definitely worth a look for small businesses.

Comments: 0

Electronics Recycling Day

Filed under: business - electronics

I know, one mans old 486 is another man’s firewall or router, but there is a point at which it really is time to get rid of those old electronics sitting around, and that time is quickly approaching.

It’s time for the annual Keep Norfolk Beautiful Electronics Recycling Day, April 19th. Keep Norfolk Beautiful assists residents yearly with disposing of their electronic goods which can be nasty little time bombs in landfills.

Collection is between 8 a.m. and 4 p.m. outside of the WHRO parking lot at the intersection of Hampton Boulevard and 49th St. There is no charge.

Here is a list of items that are acceptable:

  • Computers
  • Mice
  • Monitors
  • Cables
  • TVs
  • Personal digital assistants
  • Printers
  • Stereos
  • VCRs
  • DVD players
  • Video equipment
  • Scanners
  • Radios
  • Flat panel displays
  • Video game players
  • Copy machines
  • Fax machines
  • Phones
  • Cell phones
  • Answering machines
  • Tape recorders
  • Reel-to-reel tape players
  • Medical electronics
  • Surveillance equipment
  • Toasters
  • Microwaves

Be sure to destroy those harddrives, even in your old PDA’s. I recommend this method.

Comments: 2

HR Geeks improvements…

Filed under: meta

Adam has upgraded WP and there is a new and nicer admin interface.

Also at my request he has added the WP plug-in Linkle:

“This plugin allows you to easily insert a wide variety of links into your wordpress documents with the following tag style:

[ ln wikipedia]topic[/ln]
[ ln php]htmlentities[/ln]
[ ln amazon]978-0321396853[text]Eclipse Web Tools Platform[/text][/ln]

NOTE: I had to add the “[<space>” in order for the code to show, remove the space before using.

Or you can add links by clicking the ‘ln’ button inside of the wysiwyg editor. This will bring up a dialog box where you enter in the necessary data for that particular link

The following types of links are currently supported by default (with more on the way):

  • amazon
  • gravatar
  • php
  • twitter-rss
  • wikipedia
  • wppost”

Comments: 1

DoS! April Fools!

Filed under: networking - security

So for those of you who may have had strange Cox outage issues in the HR area this fine Wednesday (04/02/08) morning, I have some good news. I think I know what was going on. At about 9:30 it would appear my network at work was on the painful end of a DoS attack from somewhere on the internet. At the peak we were getting about 40,000 packets/sec through one provider and 70,000 through the other, bringing our router to it’s knees (normal load for us is about 3000/sec). It would appear that this attack caused some pretty major problems for Cox as well. It just stopped all on it’s own at about 11:00 and neither provider has any reliable information about where it came from. It was still Apr 1 in China at 9:00 AM right?

Comments: 0

Who has the better satellite view?

Filed under: cool ideas - links - website

I recently was linked to Flash Earth. This site allows you to switch between satellite map views with a click of the mouse. Compare Google, Yahoo!, Microsoft VE (Virtual Earth), Ask.com, OpenLayers, and NASA Terra.

Flash Earth Screen Shot 01

Images are presented via an all Flash interface and the speed you can switch between services and at which the overlays are changed is quite amazing.

I thought Google had really good images of Norfolk till I switched over to Microsoft VE. Here is an example of the Norfolk Southern coal yard and train depot. (Left: Microsoft VE,Right: Google)

Flash Earth Screen Shot Microsoft VE Flash Earth Screen Shot Google

Thanks Erin.

Comments: 1

Darik’s Boot and Nuke

Filed under: tools

While it’s not a new tool, it’s new to me!This weekend I was cleaning up my office and decided it was time to throw out a bunch of old hard disks and two old PCs I have been hanging on to for no good reason. I’m a lazy, lazy man, and I knew there had to be a semi-automated way to wipe all these disks without a writing a foreach loop ;)

Say hello to my new friend Darik’s Boot and Nuke.

I installed all the disks in the two PCs and booted them both off a USB key with DBAN. It detected all the disks in the machines and prompted me with my wipe options. The nice part about this utility is that it wipes all disks simultaneously. If you’re in a hurry you can type ‘autonuke’ at the boot menu and it will start wiping all disks automatically. Good if the feds are knocking on your door…

It took just under 36hrs for DBAN to finish wiping all the disks with a 5x wipe. It will never replace my thermite, but it’s incredibly handy.

Comments: 5

757′er has completely lost his mind -or- Ethan gets back on that horse!

Filed under: 757labs - lulz

NORFOLK: In what appears to be breaking new, er news, Ethan mounts his Segway again after being tossed and battered (deep fried salad?) only months ago. Is the leg ready to travel? Does his insurance know about this? Looks like its charged and ready to go and Ethan is poised to take on Norfolk Police again Segway style.

Ethan hops on segway for possible outing?

Comments: 2

Continue Previous page Next page