Random String Parameter cavisson systems
Random String Parameter is used to generate a random string of characters whose length is also random but lies within a specified range. The character set ,with which the random string will be formed, should be mentioned first. cavisson systems
Random String Parameter window cavisson systems
1.Parameter Name ‘Parameter name’ is a ‘random string parameter Variable Name’ which is used to access this parameter in the entire script. Variable name consists of only English alphabet and _ (it also accepts alpha-numeric name). cavisson systems
2.Character Set This field is used to define the character set from which NetStorm will generate random String. Character set can be ‘a-z’ ‘A-Z’ and ‘0-9’ and their sub-sets. You can use their combination e.g. b-e1-3 In this case the string generated will be from b, c, d, e, 1, 2, 3 characters only. Multiple character set should be defined like this a-z0-9A-Z (without any gap or comma) cavisson systems
3.Minimum Here you can specify minimum length of the string. It can range from 0-10,000. cavisson systems
4.Maximum Here you can specify maximum length of the string. It can range from 0-1,000,000 cavisson systems
5.Update Value On This field is used to tell Netstorm when to generate new string: It has two options:- Session use contt.. cavisson systems
Means generate string once and use this value for the entire session i.e. If ‘session’ is chosen, random string is generated only for first use of Random string Parameter. Then for the entire script, same value is used. Use:: Means generate string every time Random String Parameter is used. i.e. If ‘Use’ is chosen, random string is generated for each use of Random String Parameter. For example::If Random String Parameter is used 50 times in script, then in case of ‘use’, for every reference, new random string is generated. cavisson systems
Example:: In this example, we will use Tours script and generate Random String for Street Address used in Confirmation Page. cavisson systems
1. Open registration. spec file and right-click in right pane 1. Open registration.spec file and right-click in right pane. Choose Parameters > Random String Parameters. cavisson systems
2. Click ADD button cavisson systems
3. Set following values cavisson systems
4. Click on OK > Close. You will notice following 4. Click on OK > Close. You will notice following API in registration.spec file :- nsl_random_string_var(StreetAddress, Min=10, Max=30, CharSet="A-G0-9", Refresh=SESSION); cavisson systems
After ParameterizationConfirmation Page looks like as shown below:- 5. Click on Save button and open flow file (hpd.c). Here street address will be parameterized which is on Page Confirmation. After ParameterizationConfirmation Page looks like as shown below:- ns_web_url ("Confirmation“,"URL=http://192.168.1.39:83/cgi-bin/findflight?firstName=Tiger&lastName=Scott&address1= {StreetAddress}&address2=Fremont%2C+CA+94538&pass1=Scott+Tiger&creditCard=11111111&expDate=12%2F2%2F&oldCCOption=&numPassengers=1&seatType=Coach&seatPref=None&outboundFlight=000%7C0%7C09-17-2011&advanceDiscount=&.cgifields=saveCC&buyFlights.x=76&buyFlights.y=13", "HEADER=Accept-Language: Z", contt… cavisson systems
INLINE_URLS, "URL=http://192. 168. 1 INLINE_URLS, "URL=http://192.168.1.39:83/tours/Merc10-dev/images/banner_animated.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/Merc10-dev/images/sun_swede.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/Merc10-dev/images/flights.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/Merc10-dev/images/home.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/Merc10-dev/images/signoff.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/images/splash_flightconfirm.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/images/bookanother.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/vep/images/velocigen.gif", "HEADER=Accept-Language: Z", END_INLINE ); cavisson systems
6.Click on Save button and execute scenario. 7.Now look at request with number 5. It will look something like follows:( Value substituted by NetStorm is shown in bolds) GET /cgi-bin/findflight?firstName=Tiger&lastName=Scott&address1=0321E600G7.&address2=Fremont%2C+CA+94538&pass1=Scott+Tiger&creditCard=11111111&expDate=12%2F2%2F&oldCCOption=&numPassengers=1&seatType=Coach&seatPref=None&outboundFlight=000%7C0%7C09-17-2011&advanceDiscount=&.cgifields=saveCC&buyFlights.x=76&buyFlights.y=13 HTTP/1.1 Host: 192.168.1.39:83 User-Agent: Mozilla_CA/4.79 [en] (X11; U; Linux 2.4.18-3d_epoll i686) contt… cavisson systems
Accept-Encoding: gzip, deflate, compress;q=0.9 Keep-Alive: 300 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0. Accept-Encoding: gzip, deflate, compress;q=0.9 Keep-Alive: 300 Connection: keep-alive Accept-Language: Z cavisson systems
Ex : Update Value On ‘Session’ cavisson systems
Parameterizing Login Page in hpd.c file ns_web_url ("Login", "URL=http://192.168.1.39:83/cgi-bin/login?userSession=75893.0884568651DQADHfApHDHfcDtccpfAttcf&username={username}password={password}JSFormSubmit=off&login.x=0&login.y=0? {session_demo}", "HEADER=Content-Type: application/x-www-form-urlencoded{session_demo}", "HEADER=Accept-Language: Z{session_demo}", contt.. cavisson systems
INLINE_URLS, "URL=http://192. 168. 1 INLINE_URLS, "URL=http://192.168.1.39:83/tours/Merc10-dev/images/banner_animated.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/Merc10-dev/images/sun_swede.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/Merc10-dev/images/flights.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/Merc10-dev/images/home.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/Merc10-dev/images/signoff.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/images/banner_merctur.jpg", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/vep/images/velocigen.gif", "HEADER=Accept-Language: Z", END_INLINE ); cavisson systems
Accept-Encoding: gzip, deflate, compress;q=0.9^M Keep-Alive: 300^M Now look at request . It will look something like follows:( Value substituted by NetStorm is shown in bolds) GET /cgi-bin/login?userSession=75893.0884568651DQADHfApHDHfcDtccpfAttcf&username=password=JSFormSubmit=off&login.x=0&login.y=0?eug0W%22Uxf0w HTTP/1.1^M Host: 192.168.1.39:83^M User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C)^MAccept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.^M Accept-Encoding: gzip, deflate, compress;q=0.9^M Keep-Alive: 300^M Connection: keep-alive^M Content-Type: application/x-www-form-urlencodedeug0W"Uxf0w^M Accept-Language: ^RZeug0W"Uxf0w^M ^M cavisson systems
Random String generated is the same at all the places as we have used “session” cavisson systems
Ex:Update Values On ‘Use’ cavisson systems
Parameterizing Login Page in hpd Parameterizing Login Page in hpd.c file ns_web_url ("Login", "URL=http://192.168.1.39:83/cgi-bin/login?userSession=75893.0884568651DQADHfApHDHfcDtccpfAttcf&username={username}password={password}JSFormSubmit=off&login.x=0&login.y=0? {use_demo}", "HEADER=Content-Type: application/x-www-form-urlencoded{use_demo}", "HEADER=Accept-Language: Z{use_demo}", contt.. cavisson systems
INLINE_URLS, "URL=http://192. 168. 1 INLINE_URLS, "URL=http://192.168.1.39:83/tours/Merc10-dev/images/banner_animated.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/Merc10-dev/images/sun_swede.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/Merc10-dev/images/flights.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/Merc10-dev/images/home.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/Merc10-dev/images/signoff.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/images/banner_merctur.jpg", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/vep/images/velocigen.gif", "HEADER=Accept-Language: Z", END_INLINE ); cavisson systems
Now look at request . It will look something like follows:( Value substituted by NetStorm is shown in bolds) GET /cgi-bin/login?userSession=75893.0884568651DQADHfApHDHfcDtccpfAttcf&username={username}password={password}JSFormSubmit=off&login.x=0&login.y=0?eoLixvHIqRV0g7eAUxy HTTP/1.1^M Host: 192.168.1.39:83^M User-Agent: Mozilla_CA/4.79 [en] (X11; U; Linux 2.4.18-3d_epoll i686)^MAccept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.^M Accept-Encoding: gzip, deflate, compress;q=0.9^M Keep-Alive: 300^M Connection: keep-alive^M Content-Type: application/x-www-form-urlencodedSNhNZpIonAhsPT2^M Accept-Language: ^RZojV5aQXhxaIr^M ^M cavisson systems
Random String generated is different at all places as we have used ‘use’. cavisson systems
Ex:Specific Character Set Any specific character set can also be given. Generated string will consist of this defined character set only. cavisson systems
cavisson systems
Parameterizing Login Page in hpd.c file ns_web_url ("Login", "URL=http://192.168.1.39:83/cgi-bin/login?userSession=75893.0884568651DQADHfApHDHfcDtccpfAttcf&username={username}password={password}JSFormSubmit=off&login.x=0&login.y=0?{specific_char_set}", "HEADER=Content-Type: application/x-www-form-urlencoded{specific_char_set}", "HEADER=Accept-Language: Z{specific_char_set}", contt… cavisson systems
INLINE_URLS, "URL=http://192.168.1.39:83/tours/Merc10-dev/images/banner_animated.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/Merc10-dev/images/sun_swede.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/Merc10-dev/images/flights.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/Merc10-dev/images/home.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/Merc10-dev/images/signoff.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/images/banner_merctur.jpg", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/vep/images/velocigen.gif", "HEADER=Accept-Language: Z", END_INLINE ); cavisson systems
Accept-Encoding: gzip, deflate, compress;q=0.9^M Keep-Alive: 300^M Now look at request . It will look something like follows:( Value substituted by NetStorm is shown in bolds) GET /cgi-bin/login?userSession=75893.0884568651DQADHfApHDHfcDtccpfAttcf&username={username}password={password}JSFormSubmit=off&login.x=0&login.y=0?77db7dde7AbAeb00 HTTP/1.1^M Host: 192.168.1.39:83^M User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C)^MAccept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.^M Accept-Encoding: gzip, deflate, compress;q=0.9^M Keep-Alive: 300^M Connection: keep-alive^M Content-Type: application/x-www-form-urlencodedA7CCbdd7b77CedbdA^M Accept-Language: ^RZCe7Ad7bddCCCAC^M ^M cavisson systems
Its clear from request page that random string is generated by using only defined character set i.e. ‘AbCde07’ cavisson systems
Character Set can not consist of ‘Special Characters’. cavisson systems
Minimum value should be less than maximum value else there will be an error pop-up. cavisson systems
Ex::With large maximum & minimum values cavisson systems
Parameterizing Login Page in hpd Parameterizing Login Page in hpd.c file ns_web_url ("Login", "URL=http://192.168.1.39:83/cgi-bin/login?userSession=75893.0884568651DQADHfApHDHfcDtccpfAttcf&username={username}password={password}JSFormSubmit=off&login.x=0&login.y=0?{lagre_string_generation}", "HEADER=Content-Type: application/x-www-form-urlencoded{lagre_string_generation}", "HEADER=Accept-Language: Z{lagre_string_generation}“, contt.. cavisson systems
INLINE_URLS, "URL=http://192. 168. 1 INLINE_URLS, "URL=http://192.168.1.39:83/tours/Merc10-dev/images/banner_animated.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/Merc10-dev/images/sun_swede.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/Merc10-dev/images/flights.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/Merc10-dev/images/home.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/Merc10-dev/images/signoff.gif", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/images/banner_merctur.jpg", "HEADER=Accept-Language: Z", END_INLINE, "URL=http://192.168.1.39:83/tours/vep/images/velocigen.gif", "HEADER=Accept-Language: Z", END_INLINE ); cavisson systems
Now look at request . It will look something like follows:( Value substituted by NetStorm is shown in bolds) GET /cgi-bin/login?userSession=75893.0884568651DQADHfApHDHfcDtccpfAttcf&username={username}password={password}JSFormSubmit=off&login.x=0&login.y=0?FV47NF2JOADOW6AB0QYOO67CFU3ALU1RFWPS1H2FI5U52U6SBU6PR4RWOLX05PHABXT24L8DHS89C5RDQOT7IBUWMHMHWUIXH1QCDOGK6EK992DPGWNOX7BAENH18QPGH5JLJPWGT6 HTTP/1.1^MHost: 192.168.1.39:83^M User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C)^M Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.^M cavisson systems
Accept-Encoding: gzip, deflate, compress;q=0 Accept-Encoding: gzip, deflate, compress;q=0.9^M Keep-Alive: 300^M Connection: keep-alive^M Content-Type: application/x-www-form-urlencodedTZI955MKTJLTOZ1FXHU4PQD0ZSN6BKBV9KU4G7FZGQJVGA03ILXY10PRJ2NKCP6C0Q76OCWUT5GZ67SFIG3A7IRHB5RELOGB5D8JFU4YQANN^M Accept-Language: ^RZ6SGDMGBVYIWT004E66A94JFPD45DHJBE1HIENKZCSLVJBQO8MO7GXDV17R4F06JSDSWR2LTLWFUYV9W7NUEBX02VIX08T9RXSDEKPXWC2G0OGNLT8QVWHNHPB7NV74IP8N0NAMP3TGHZUTJSA4E^M ^M cavisson systems
Thank You!!! cavisson systems