Quantcast
Viewing all articles
Browse latest Browse all 12134

Re: unable to find session value in server response

A script in the C language cannot run javascript code (or java, for that matter).

 

 

Therefore, you will have to try to re-implement the encryptSecurityfunction() in C.


That's the bad news.

The good news is that this may not be very difficult. The call to "getSessionRandom()" suggests that all you really need to do is generate a random string of alphanumerical characters. Which is where y-lib comes in:

 

https://github.com/randakar/y-lib/blob/master/y_loadrunner_utils.c#L412

 

In principle this should be a matter of: Add y-lib to your script (with the "add files to script" function and a "#include 'y-lib.c'"  statement at the top of vuser_init() ), and then call y_random_string_buffer_core():

 

https://github.com/randakar/y-lib/blob/master/y_loadrunner_utils.c#L389

 

y_random_string_buffer_core("parametername", 8, 12, 0, 0,  "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");

 

That will create a random alphanumerical string at least 8 and no more than 12 characters long, using a min and max word length of 0 characters (no words, in other words).

 

( I should probably create a  y_random_string_buffer_alphanum(), but heh, this code is at least 5 years old by now ..) like this: https://github.com/randakar/y-lib/blob/master/y_loadrunner_utils.c#L389 )

 


Viewing all articles
Browse latest Browse all 12134

Trending Articles