Telnet and AOP and News, Oh My!

Today’s nerdtacular tip is brought to you by the letter π and the number e: if you telnet into port 80 of a webserver, you can write your HTTP requests by hand. I haven’t quite figured out how to use this to my advantage yet, but I’m pretty sure it’s there somewhere… I can now fill in my own custom values when submitting forms, without bothering to download and edit the source for the page with the form on it, if nothing else (though I’d still need to look at the source to see what parameters the form contains).

(bold words are what I typed)

$ telnet www.hmc.edu 80
Trying 134.173.32.59...
Connected to www.hmc.edu.
Escape character is '^]'.
GET / HTTP/1.0

HTTP/1.1 200 OK
Date: Thu, 16 Nov 2006 07:59:59 GMT
Server: Apache/1.3.29 (Unix) PHP/4.3.2 mod_perl/1.29 mod_ssl/2.8.16 OpenSSL/0.9.7c
Connection: close
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
...
</body>
</html>
Connection closed by foreign host.

This evening, Benji, Liviu, and I went to the King’s Head Pub again for trivia night. Partway through the evening, some dude and 3 women walked in and joined our team. Then Dominic (former Mudder! class of ’99) stopped by. Of the ~10 teams playing, the 8 of us took 3rd! We won a $15 gift certificate to the pub, but gave it to our 4 other teammates because they really helped out (none of us Googlers know anything about NFL quarterbacks or American Idol winners). At 10:30, we left the pub and went back to the office to play pool for a while. It was a wonderful evening.

Watching tech talks on Google Video introduced me to aspect oriented programming, which is a really cool idea wrapped up in a very tedious, abstract, and boring sort of way. It’s a cross between object oriented and event oriented programming: you take your object-oriented code and put in extra functions, and rules about when to call these extra functions. But these rules have to do with the behavior of your original code: the example they used was the observer pattern, which is some code that watches your objects to see what has changed, and then does something when things do change (the canonical example is that when something changes in the graphics you want to display, the observer pattern should update the screen). With traditional OOP, the observer is spread throughout the code, but doesn’t actually get mentioned in any designs of the classes. With AOP, the observer is its own little module, and it gets called any time a function whose name contains “Draw” or “Update” returns successfully (without any explicit mention of this in the DrawLine() and UpdateShape() methods themselves!). It’s an interesting idea, though I’m not sure it will ever catch on.

Finally, a little news before I get too far behind: yes, the Democrats made sweeping advances in both the House and the Senate. We now also have 2 independent Senators (Joseph Lieberman in Connecticut and Bernie Sanders in Vermont), which is interesting but probably inconsequential. Unfortunately, I don’t expect much to change with the new legislature; many of them are still pretty conservative Democrats who could just as easily be considered pretty liberal Republicans.

Also, South Africa legalized gay marriage this past Tuesday, which is pretty cool. They’ve really come a long way towards tolerance and acceptance of everyone since 1994.

Leave a Reply

4 Comments

  1. code65536 says:

    Hehe. Telnet has been used a lot for this sort of low-level testing with HTTP, SMTP, POP3 and just about any protocol where the communication’s done via plain text. It’s limited though, because because it’s a pain to try to send HTTP headers (e.g., when connecting to a server with VirtualHosts, you must send the Host header) using the Telnet method. Of course, a truly easy and robust way to do this would be the 2-minute Perl script method. :)

  2. My favorite telnet abuse is connecting to port 25 and sending mail by hand. It’s not actually very hard, because simple mail headers are easy.

  3. sneaselcouth says:

    Regardless of whether they are conservative Democrats or liberal Republicans, they are a check and balance for the insanity that the Bushites and other fundamentalists were pushing through Congress before. I fear a more left Congress may make discussion and compromise more challenging. As things stand now, I would just like to get back to an older status quo – call me a conservative for that right now, that’s fine, I wouldnt label the Bushites conservative. Lets get Habeas Corpus back, keep government out of my body and family life, and try to find a way to clean up this Iraq mess. (The current talk is to send more troops in – 20,000 – which many think wouldnt be enough to make a difference except in the number of casualties. Some argue for 100,000, though from where others havent a clue. I havent read this yet, but Andrew Sullivan linked to it: 8000 troops to Afghanistan Me, Im just worried about sending more people to die there.

    • Alan says:

      I agree with you that we need more checks and balances to stop the horrible things the Bush regime is doing (including all the examples you gave). I’m worried that conservative Democrats and almost all Republicans are too willing to make compromises with the neocons (for instance, I thought that the “compromise” over warrantless wiretaps, where the president can choose whether they get reviewed or not, didn’t seem like a compromise at all to me). I think we need more people who are willing to stand up and say that Habeus Corpus is vital to this country and it shouldn’t be compromised no matter what. I feel that the Bush administration has gotten away with mind-boggling amounts of illegal and impeachable crimes (warrantless wiretaps, Guantanamo Bay, the willful manipulation and suppression of intelligence to start a war in Iraq, the Military Commissions Act, not to mention all the scientific studies that have been repressed because they don’t fit with the current agenda, etc) because too many people are willing to compromise with him and his cronies.

Enable Javascript to Leave a Reply

Your browser has Javascript disabled right now. You must enable Javascript in order to leave a comment. This is done to prevent spam (most comment spam comes from bots that do not render Javascript correctly). If you need instructions for enabling Javascript, look here.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

 

You must wait 5 seconds after loading this page before you can submit a comment. This is done to reduce comment spam.