Page 1 of 1

Logging into a web form

Posted: Tue Apr 26, 2016 5:08 am
by delboy1966
Not sure if this is the correct forum for this question, so apologises if its not.

We have a site I need to put a check against, to ensure the site is authenticating a user and then check the resulting page.
It uses form based authentication and I've not yet been able to find anything I can use to login to the page, I've tried a number of Perl Cpan modules but without success.

Attached is a screen shot of the webpage form and also the code from the source code of the webpage.
form.PNG
form.txt
(8.32 KiB) Downloaded 257 times

Thanks in advance
Tony

Re: Logging into a web form

Posted: Tue Apr 26, 2016 7:24 am
by nozlaf
you sure can i'm about to head to bed so sorry for the brief response but this old archive has the answer


https://www.mail-archive.com/nagios-use ... 23865.html

Re: Logging into a web form

Posted: Tue Apr 26, 2016 10:21 am
by hsmith
Thank you, @nozlaf!

Re: Logging into a web form

Posted: Wed Apr 27, 2016 3:47 am
by nozlaf
I'm interested to know why you want to test to see if you can log into your EPO server,

i'm a huge fan of EPO and nagios but not sure of the benefit of doing this

you could check to see if your epo server is running properly a number of different ways like checking for the services via nsclient

Re: Logging into a web form

Posted: Wed Apr 27, 2016 1:30 pm
by tmcdonald
@delboy1966 please let us know if that linked thread helped.

Re: Logging into a web form

Posted: Fri Apr 29, 2016 1:58 am
by delboy1966
Hi All

Thanks for your help.

@nozlaf
Its been requested. I agree you I could just check if the service is running and we do. However its been requested to ensure that:
1. Authentication is working
2. The page is displaying correctly
So that we aren't made aware of it when a manager can't login or the page isn't loading.

@tmcdonald
For some reason its not actually working, it just comes back with a connection refused using the check_http plugin.
However I have found that using the CPAN WWW::Mechanize module works fine.

Thanks again

Re: Logging into a web form

Posted: Fri Apr 29, 2016 10:04 am
by rkennedy
Just to make sure - are we good to mark this thread as resolved then?