Use Variables and some regex manipulation, Zabbix Web Monitor can follow the IIS Web Application's Log In process. It takes four steps:
Step 1, Front Page. Get Anti-Forgery token for log in.
Variable Name: {token}
Value: regex:"__RequestVerificationToken" type="hidden" value="([A-Za-z0-9+=\-\_]+?)"
Step 2, Login. Post all values needed for login and virtually click Submit.
The value names can be found through Inspect function in Chrome. Submit button does not need value. Lastly, the anti-forgery value name is __RequestVerificationToken, value is {token}
Step 3, Look for strings on page to see if it is logged in sate.
Step 4, Log out. Usually the logout is just a simple log out URL like https://my.domainname.com/account/logoff/?returnUrl=/
No comments:
Post a Comment