PRODUCT






Home









Free Download








Installation Instructions





FAQ





FAQ








Ask A Question





LEARN SCRIPTING





Overview








Lesson 1








2


3


4


5








Exam





SAMPLE SCRIPTS





Computer








Internet








Administrators








Developers








Data








Miscellaneous





HELP / DOCUMENTATION





Commands








Automated Internet








Automated Editors








Sample Scripts








Precompiled Functions








System Features






  Sample Script - SS_ISCookies

( Some of the sample scripts may not be reproduced correctly in html because those scripts, especially web-related scripts, have html tags such as < tr > in their code.

For an accurate, copy-and-paste'able text version of this script, see SS_ISCookies.txt . )



#####################################################################
# SCRIPT: SS_ISCookies.txt
#
# This script extracts cookies from an internet session. It then submits those
# cookies to another session.
#
# Input Arguments (FVA = Forward Variable Assignment)
#
# from - name of the internet session from which to extract cookies.
#
# to - name of the internet session for which to set cookies.
#
# Cookies are returned by an internet server in the response header
# in the following format.
#
# Set-Cookie: cookie1_name=cookie1_value; cookie2_name=cookie2_value
#
# This script will set the cookies in the request header in the following format.
#
# Cookie: cookie1_name=cookie1_value; cookie2_name=cookie2_value
#
#
# The script can be called as follows.
#
# script "SS_ISCookies.txt" from( "session1" ) to( "session2" )
#
# If you wish to simply exchange cookies with the same server,
# use the same session name for both input arguments, from and to, as follows.
#
# script "SS_ISCookies.txt" from( "session1" ) to( "session1" )
#
#####################################################################

# Declare Input Arguments or FVA variables.
var string from, to

var str headers, cookie
isheadret $from > $headers ; echo "\n" >> $headers

while ( { sen -c "^Set-Cookie:^" $headers } > 0 )
do
stex -c "]^Set-Cookie:^" $headers > null
stex -c "^Set-^]" $headers > null
stex -r "]^(\r\n)^" $headers > $cookie
isheadsub $to $cookie
done

2008-2014, biterScripting.com. All rights reserved.
biterScripting, biterScript, biterBrowser, biterMobile, biterScripting.com, FVA (Forward Variable Assignment) are trademarks of biterScripting.com. Is it biterScripting-compatible ? is a service mark of biterScripting.com. Explorer, Unix, Windows are trademarks, service marks or other forms of intellectual property of their respective owners.