Wednesday, June 25, 2008

Using CURL to obtain superflous HTTP verbs

Instead of using netcat or telnet to check a website for allowing superflous HTTP verbs, CURL makes it simpler:
curl -X OPTIONS -I <host name>
An example of the output is shown below:
# curl -X OPTIONS -I http://thestar.com.my
HTTP/1.1 200 OK
Allow: OPTIONS, TRACE, GET, HEAD
Content-Length: 0
Server: Microsoft-IIS/6.0
Public: OPTIONS, TRACE, GET, HEAD, POST
X-Powered-By: ASP.NET
Date: Wed, 25 Jun 2008 03:51:52 GMT
Another one line wonder :)

No comments: