Cisco 11503 Administration Guide - Page 327
DNS Keepalive, socket send ${SOCKET} GET ${Web HTTP/1.0\n
UPC - 746320664958
View all Cisco 11503 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 327 highlights
Chapter 8 Using the CSS Scripting Language Script Keepalive Examples ! Send the GET request for the web page, along with the authorization ! This builds a header block like so: ! ! GET /index.html HTTP/1.0\r\n ! Authorization: Basic bGFiOmxhYnRlc3Qx\r\n\r\n set EXIT_MSG "Send: Failed" socket send ${SOCKET} "GET ${WebPage} HTTP/1.0\n" socket send ${SOCKET} "Authorization: Basic " socket send ${SOCKET} "${UserPass}" base64 socket send ${SOCKET} "\n\n" ! Wait for a good status code set EXIT_MSG "Waitfor: Failed" socket waitfor ${SOCKET} "200 OK" no set EXIT_MSG socket disconnect ${SOCKET} exit script 0 DNS Keepalive !no echo Filename: ap-kal-dns ! Parameters: Server DomainName ! ! Description: ! This script will resolve a domain name from a specific DNS ! server. This builds a UDP packet based on RFC-1035 ! ! Failure Upon: ! 1. Not resolving the hosts's IP from the domain name if ${ARGS}[#] "NEQ" "1" echo "Usage: ap-kal-finger \'Hostname\'" exit script 1 endbranch set HostName "${ARGS}[1] ! Connect to the remote host set EXIT_MSG "Connection failed" socket connect host ${HostName} port 53 udp OL-5647-02 Cisco Content Services Switch Administration Guide 8-59