Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

How can I tell if a TCP/IP script was recorded using the Active profile or the Socks at all ports (1-65535) setting ?

How can I tell if a TCP/IP script was recorded using the Active profile or the Socks at all ports (1-65535) setting ?

If you go to Settings | Active Profile | Web | Recording | - Browser level
Emulation set to TCP/IP Level API the script generated will have comments inserted through out. The comments will describe what each TCP/IP function is doing and will make the script easier to follow. Also, you will see WebTcpipRecvUntil functions scripted throughout. This is because the recorder detects that it is http traffic and is able to determine what the termination string should be.

For Example:

beginWebTcpipConnect(hWeb0, "gmo.demo.com", 80); // Connect to mo.demo.com:80WebTcpipSend(hWeb0, "GET / HTTP/1.1\r\n" "Accept: */*\r\n" "Accept-Language: en-gb\r\n" "Accept-Encoding: gzip, deflate\r\n" "User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)\r\n" "Host: gmo.demo.com\r\n" "Connection: Keep-Alive\r\n" "Cookie: SITESERVER=ID=780efe7a45711e1080ae32f15a23dc92\r\n" "\r\n"); // HTTP Request HeaderWebTcpipRecvUntil(hWeb0, NULL, 0, nReceived, WEB_CRLFCRLF); // HTTP ResponseHeaderWebTcpipRecvExact(hWeb0, NULL, 3291); // HTTP Response BodyWebTcpipSend(hWeb0, "GET /images/Gray_Dotted83B3.gif HTTP/1.1\r\n" "Accept: */*\r\n" "Referer: http://gmo.demo.com/\r\n" "Accept-Language: en-gb\r\n" "Accept-Encoding: gzip, deflate\r\n" "User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)\r\n" "Host: gmo.demo.com\r\n" "Connection: Keep-Alive\r\n" "Cookie: SITESERVER=ID=780efe7a45711e1080ae32f15a23dc92\r\n" "\r\n"); // HTTP Request Header WebTcpipRecvUntil(hWeb0, NULL, 0, nReceived, WEB_CRLFCRLF); // HTTPResponse HeaderWebTcpipRecvExact(hWeb0, NULL, 1528); // HTTP Response BodyWebTcpipConnect(hWeb1, "gmo.demo.com", 80); // Connect to gmo.demo.com:80WebTcpipSend(hWeb1, "GET /images/gmo-animate.gif HTTP/1.1\r\n" "Accept: */*\r\n" "Referer: http://gmo.demo.com/\r\n" "Accept-Language: en-gb\r\n" "Accept-Encoding: gzip, deflate\r\n" "User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)\r\n" "Host: gmo.demo.com\r\n" "Connection: Keep-Alive\r\n" "Cookie: SITESERVER=ID=780efe7a45711e1080ae32f15a23dc92\r\n" "\r\n"); // HTTP Request Header

 

 

However if we set the following options:- Settings | System Settings |
Recorder | Proxies | SOCKS | Edit and set the port range for record always at TCP/IP level to read 1-65535
no comments will be added and the recorder will not know which protocol is being detected so it will script WebTcpipRecvExact instead of WebTcpipRecvUntil as above. The script will look as follows:

 

 

beginWebTcpipConnect(hWeb0, "172.16.1.2", 80);WebTcpipSend(hWeb0, "GET / HTTP/1.1\r\n" "Accept: */*\r\n" "Accept-Language: en-gb\r\n" "Accept-Encoding: gzip, deflate\r\n" "User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)\r\n" "Host: gmo.demo.com\r\n" "Connection: Keep-Alive\r\n" "Cookie: SITESERVER=ID=780efe7a45711e1080ae32f15a23dc92\r\n" "\r\n");WebTcpipRecvExact(hWeb0, NULL, 3569);WebTcpipSend(hWeb0, "GET /images/Gray_Dotted83B3.gif HTTP/1.1\r\n" "Accept: */*\r\n" "Referer: http://gmo.demo.com/\r\n" "Accept-Language: en-gb\r\n" "Accept-Encoding: gzip, deflate\r\n" "If-Modified-Since: Thu, 07 Mar 2002 21:50:30 GMT\r\n" "If-None-Match: \"645fea1922c6c11:a5f\"\r\n" "User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)\r\n" "Host: gmo.demo.com\r\n" "Connection: Keep-Alive\r\n" "Cookie: SITESERVER=ID=780efe7a45711e1080ae32f15a23dc92\r\n" "\r\n");WebTcpipRecvExact(hWeb0, NULL, 141);WebTcpipConnect(hWeb1, "172.16.1.2", 80);WebTcpipSend(hWeb1, "GET /images/gmo-animate.gif HTTP/1.1\r\n" "Accept: */*\r\n" "Referer: http://gmo.demo.com/\r\n" "Accept-Language: en-gb\r\n" "Accept-Encoding: gzip, deflate\r\n" "If-Modified-Since: Thu, 07 Mar 2002 21:50:27 GMT\r\n" "If-None-Match: \"529d11822c6c11:a5f\"\r\n" "User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)\r\n" "Host: gmo.demo.com\r\n" "Connection: Keep-Alive\r\n" "Cookie: SITESERVER=ID=780efe7a45711e1080ae32f15a23dc92\r\n" "\r\n");WebTcpipRecvExact(hWeb1, NULL, 140);

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 18:56
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.