NXI 5.4.10: Webinject is 1.41 but current is 1.94
Posted: Wed Oct 03, 2018 4:41 pm
Hi,
It seems that the webinject page is the old 1.41 version but care and feeding of webinject is in CPAN/git now.
https://www.webinject.org/
https://github.com/sni/Webinject
https://metacpan.org/pod/Webinject
Should it be updated from CPAN? I did a yum list perl-webinject and got nothing.
I'm trying to log into web forms, authenticate, and then verify strings but the login alsways seems to fail. I've used numerous plugins from exchange, a script I wrote and finally webinject, which also fails to authenticate. I've also tried multiple different pages to test on.
I'm looking at page sources in an attempt to get the uname/passwd field names and populate them.
Here's the XML and command output. The strings seem fine based on those seen whel there's a successful and failed login. Case 1 can probably be eliminated since it just shows the login page can be displayed.
Any suggestions?
It seems that the webinject page is the old 1.41 version but care and feeding of webinject is in CPAN/git now.
https://www.webinject.org/
https://github.com/sni/Webinject
https://metacpan.org/pod/Webinject
Should it be updated from CPAN? I did a yum list perl-webinject and got nothing.
I'm trying to log into web forms, authenticate, and then verify strings but the login alsways seems to fail. I've used numerous plugins from exchange, a script I wrote and finally webinject, which also fails to authenticate. I've also tried multiple different pages to test on.
I'm looking at page sources in an attempt to get the uname/passwd field names and populate them.
Here's the XML and command output. The strings seem fine based on those seen whel there's a successful and failed login. Case 1 can probably be eliminated since it just shows the login page can be displayed.
Any suggestions?
Code: Select all
<testcasefile>login.prov.xml</testcasefile>
<useragent>WebInject Application Tester</useragent>
<timeout>10</timeout>
<globaltimeout>20</globaltimeout>
<comment>
<reporttype>nagios</reporttype>
</comment>
<reporttype>standard</reporttype>
Code: Select all
<testcases repeat="1">
<comment>case 2 should probably be case 1 and the get an additional check after logging in--had it worked</comment>
<case
id="1"
description1="Connecting to Satellite"
method="get"
url="https://solktxeshgw-v-pmeprov-01/users/login"
parseresponse='mykey="|"'
verifypositive="Welcome to Satellite"
errormessage="Unable to connect to the Satellite login page"
/>
<case
id="2"
description1="Authentication on Satellite"
method="post"
url="https://solktxeshgw-v-pmeprov-01/users/login"
postbody="login_login=nagiosadmin&login_password=5t6y%T^Ygrid&mykey={PARSEDRESULT}"
verifynegative="Error: Incorrect username or password"
errormessage="Unable to authenticate user in Satellite"
/>
</testcases>
Code: Select all
$ ./webinject.pl --config login.prov.global.xml
Starting WebInject Engine...
-------------------------------------------------------
Test: login.prov.xml - 1
Connecting to Satellite
Verify : "Welcome to Satellite"
Passed Positive Verification
Passed HTTP Response Code Verification (not in error range)
TEST CASE PASSED
Response Time = 0.123 sec
-------------------------------------------------------
Use of uninitialized value in substitution (s///) at ./webinject.pl line 1148.
Test: login.prov.xml - 2
Authentication on Satellite
Verify Negative: "Error: Incorrect username or password"
Passed Negative Verification
Failed HTTP Response Code Verification (HTTP/1.1 400 Bad Request)
TEST CASE FAILED : Unable to authenticate user in Satellite
Response Time = 0.025 sec
-------------------------------------------------------
Start Time: Wed Oct 3 21:36:48 2018
Total Run Time: 0.229 seconds
Test Cases Run: 2
Test Cases Passed: 1
Test Cases Failed: 1
Verifications Passed: 3
Verifications Failed: 1