Step 2 – logging in

And now, on to logging in:

  • Name: Log in
  • URL: http://127.0.0.1/zabbix/index.php
  • Post type: The Form data option is selected with the following values:
    • Name: name, Value: {user}
    • Name: passwordValue: {password}
    • Name: enter, Value: Sign in
  • Required status codes: 200
  • Variables: The fields of this option are filled with the following values:
    • Name: {sid} 
    • Valueregex:name="csrf-token" content="([0-9a-z]{16})":

The Post type variables can be specified as attribute and value pairs. When using the Form data option, our values are URL-encoded. In raw mode, attributes and values are displayed on a single line, as in older Zabbix releases, such as 3.0, and are not URL-encoded.

In our post type, we are using the variables we specified earlier, and we pass them according to the input field names in the login form. The last variable, enter, is a hidden input in the Zabbix frontend login page, and we must pass a hardcoded value of Sign in to it. To find out these values for other pages, you can check the page source, use browser debugging features, or sniff the network traffic.

Also take note of how we get the content of the {sid} variable (session ID) using a variable syntax with a regular expression: regex:name="csrf-token" content="([0-9a-z]{16})". This variable will be required in the Step 4 – logging out section. Variables can be used in later steps and override scenario-level variables or variables from previous steps.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.9.7