[YLUG] Lynx -source with a wait

aardvark llama anisotropy9 at hotmail.com
Thu Jun 14 21:51:49 BST 2007


>From: "Robert Hulme" <rob at robhulme.com> wrote:
>>Presumably this is to do some processing in a script?
>>how does the site do the refresh? is it in redirect headers or does a 
>>script do it ?
>It's for a Nagios style "Does this service work at all? and if so is
>it giving utter nonesense results?" type check.

Now for my first post for a while:

FWIW For this kind of stuff at I would tend towards wget. IME it is a bit 
more flexible than lynx and can handle recursive queries, https, ssl and 
cookies.

If you are simply after dirty output you can script netcat to dump raw html 
to stdout as follows:

$ nc -v <ip address or url> 80 < get.txt

Where get.txt contains:

GET / HTTP/1.1
Host: <url of webservice>



(It is important to include a couple of returns in here.)

Alternatively there are some neat perl modules -- or 
equivalent-scripting-langue-du-jour -- that will let you eat the html, pull 
out the interesting lines and write it out in a nicely formatted report.

Tarafurnoo,

Will

PS: If you want to debug this, try telnet. For example, to work out the 
NAT/PAT IP address of a server when you only have telnet, I find
$ telnet www.whatismyip.com 80
GET / HTTP/1.1
Host: www.whatismyip.com



^]
Works when you scroll back to the <TITLE>WhatIsMyIP.com - <your IP 
address></TITLE> line.

_________________________________________________________________
Personalizza la tua casella di posta con Windows Live Hotmail! 
http://imagine-windowslive.com/hotmail/default.aspx?locale=it#5




More information about the York mailing list