Friday, September 29, 2006

HTTP Get Response using Command prompt

Do telnet to the website. Use port 80 (HTTP port) . I recommend this for two reasons -
1. Generally most sites dont keep their telnet port (23) open.
2. If it is open you require login-password to login to the server

For newbies, open command prompt (Start>Run>cmd)
c:\> telnet 80

Then u will get a blank screen (i.e there is a process waiting for request from the browser (therefore no login screen - shell without prompt) )

Enter either -

GET / HTTP/1.1



(Refer for more details)

You get output as (Notice the HTTP Response header) -

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Set-Cookie: PREF=ID=768f0ec24c16778c:TM=1159508943:LM=1159508943:S=teTiYAhOOObRT
J0p; expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/;
Server: GWS/2.1
Transfer-Encoding: chunked
Date: Fri, 29 Sep 2006 05:49:03 GMT

<html><head><meta http-equiv="content-type" content="text/html; charset=ISO-8859

function sf(){document.f.
// -->
</head><body bgcolor=#ffffff text=#000000 link=#0000cc
vlink=#551a8b alink=#ff0000 onLoad=sf() topmargin=3 marginheight=3><center><tab
le border=0 cellspacing=0 cellpadding=0 width=100%><tr><td align=right nowrap><f
ont size=-1><a href="/url?sa=p&pref=ig&amp;amp;pval=3&q=
3Den&sig=__2FXiR2zyqvKLKznVZcY0dUpbPo8=">Personalized Home</a> | <a hr
n">Sign in</a></font></td></tr><tr height=4><td><img alt="" width=1 height=1></t
d></tr></table><table cellpadding=0 cellspacing=0 border=0><tr><td align=right v
align=bottom><img src=images/hp0.gif width=158 height=78 alt="Google"></td><td v
align=bottom><img src=images/hp1.gif width=50 height=78 alt=""></td><td valign=b
ottom><img src=images/hp2.gif width=68 height=78 alt=""></td></tr><tr><td class=
h align=right valign=top><b></b></td><td valign=top><img src=images/hp3.gif widt
h=50 height=32 alt=""></td><td valign=top class=h><font color=#6f6f6f style=font
<form action=/search name=f>
<table border=0 cellspacing=0 cellpadding=4><tr><td nowrap><font size=-1><b>Web<
/b> <a class=q href="/imghp?hl=en&ie=UTF-8&tab=wi">Images
</a> <a class=q href="
=en&ie=UTF-8&tab=wg">Groups</a> <a class=q href="http://n">News</a> <b
><a href="/intl/en/options/" class=q >more »</a></b></font></td></tr>
</table><table cellspacing=0 cellpadding=0><tr><td width=25%> </td><td alig
n=center><input type=hidden name=hl value=en><input type=hidden name=ie value="I
SO-8859-1"><input maxlength=2048 size=55 name=q value="" title="Google Search"><
br><input type=submit value="Google Search" name=btnG><input type=submit value="
I'm Feeling Lucky" name=btnI></td><td valign=top nowrap width=25%><font size=-2>
<a href=/advanced_search?hl=en>Advanced Search</a><br> <a
href=/preferences?hl=en>Preferences</a><br> <a href=/language_tools?
hl=en>Language Tools</a></font></td></tr><tr><td colspan=3 align=center><font si
ze=-1>Search: <input id=all type=radio name=meta value="" checked><label for=all
> the web </label><input id=cty type=radio name=meta value="cr=countryIN" ><labe
l for=cty> pages from India </label></font></td></tr></table></form><br><font si
ze=-1> offered in: <a href="">Hindi</a> <
a href="">Bengali</a> <a href="
n/te">Telugu</a> <a href="">Marathi</a> <a href="htt
p://">Tamil</a> </font><br><br><br><font size=-1><a href="/in
tl/en/ads/">Advertising Programs</a> - <a href=/intl/en/about.html>About Go
ogle</a> - <a href=/intl/en/jobs/>We're Hiring</a> - <a href=
om/ncr>Go to</a></font><p><font size=-2>©2006 Google</font></p><

Above example shows a simple trick that you can use to get the http response header. You can get post headers also on similar lines.

Tuesday, September 05, 2006

Bug I noticed when I minimised 2 powerpoint slides

This happens only when you have 2 or more ppts minimised. However, it works for other programs (which implies machine was not hanged)

There is another bug in Visual Studio