1

I'm trying to do login to my site using jmeter tool.

But when I entered a valid username and password and press the submit button, inside the browser you can check that one post request is getting fired with cryptographic values.

So, due to cryptographic values of username and password. I am not able to do login to the site.

Note: SHA-256 algorithm is used for cryptographic.

For more details on this issue, please refer below mentioned image.

enter image description here

So, can anyone help me how do I able to do login to my site?

Jainish Kapadia
  • 2,565
  • 4
  • 16
  • 29

1 Answers1

2

You can hash your expected (regular) value with Sha256 because you can't decrypt it, See decrypt sha256

SHA-256 is a cryptographic (one-way) hash function, so there is no direct way to decode it. The entire purpose of a cryptographic hash function is that you can't undo it.

You can add JSR223 Sampler with the following sha256 conversion which put value in variable:

String sha256hex = org.apache.commons.codec.digest.DigestUtils.sha256Hex("myPassword");
vars.put("myPassword", sha256hex);

and then you can use variable ${myPassword}

user7294900
  • 52,490
  • 20
  • 92
  • 189