On Wed, Jan 26, 2005 at 07:18:04PM +0000, Jon Bjorn Njalsson wrote:
Is it possible to let hobbit log on to a https protected webpage, that is POSTing username and password to a form on the webpage and let hobbit monitor server respond ?
if so, how is it done ?
Yes, but it can be a bit tricky to setup.
There's an example in the bb-hosts man-page, in the "HTTP Tests" section. See http://www.hswn.dk/hobbit/help/manpages/man5/bb-hosts.5.html#lbAR .
If you have a form:
<form action="/cgi-bin/form.cgi" method="post">
<p>Given name<input type="text" name="givenname"></p>
<p>Surname<input type="text" name="surname"></p>
<input type="submit" value="Send">
</form>
and it must return the string "Welcome" when you post it, then you can test it with this in bb-hosts (simulating that you put "Henrik Stoerner" in the form fields):
post;http://www.foo.com/cgi-bin/form.cgi;givenname=Henrik&surname=Stoerner;Welcom...
Hobbit handles both "http" and "https" URL's as long as you compile it with SSL support enabled.
The method does require that it's a genuine HTML form that is being posted; you may be able to figure out what data to send for e.g. a JavaScript form, but it's often requires either a network trace to capture a session, or some knowledge of how the form is supposed to work.
Henrik