This recipe demonstrates how to download a map- or dig-config file and store it on the local file system using ftimes.sourceforge.net as the Integrity Server. This recipe assumes that 1) all local commands are in the search path and will be executed from a Bourne shell; 2) the local operating system is a supported flavor of UNIX or NT; and 3) the local host can establish a connection to ftimes.sourceforge.net over HTTP. 1. Create the following get-config file, and name it get.cfg. The following command allows you to automatically create this file. sed -e '1,/^--- get.cfg ---$/d; /^--- get.cfg ---$/,$d' ftimes-get-write-cfg-to-file.txt > get.cfg --- get.cfg --- BaseName=T001_HELP_0001_1 GetAndExec=N GetFilename=remote.cfg URLGetURL=http://ftimes.sourceforge.net/cgi-bin/nph-ftimes.cgi URLUsername=T001_HELP_0001_1 URLPassword=triage URLAuthType=basic URLGetRequest=MapConfig --- get.cfg --- Note: If you want the config file to be written to a location other than the current working directory, you must modify GetFilename as appropriate for your system. Note: If remote.cfg exists, it will be overwritten provided that ftimes has sufficient privilege to do so. Note: If you wish to download a dig-config file instead of a map-config file, set URLGetRequest to 'DigConfig'. 2. Execute ftimes using the provided command. Output should be comparable to that depicted below. ftimes --getmode get.cfg --- output --- <<< EXECDATA >>>|Program=ftimes 3.0.0 ssl --getmode <<< EXECDATA >>>|SystemOS=i386 FreeBSD 4.2-RELEASE <<< EXECDATA >>>|Hostname=utopia.ir.exodus.net +++ LANDMARK +++|Stage1=GetModeInitialize +++ LANDMARK +++|Stage2=GetModeCheckDependencies +++ LANDMARK +++|Stage3=GetModeFinalize <<< PROPERTY >>>|BaseName=T001_HELP_0001_1 <<< PROPERTY >>>|GetAndExec=N <<< PROPERTY >>>|GetFileName=remote.cfg <<< PROPERTY >>>|URLGetURL=http://ftimes.sourceforge.net:80/cgi-bin/nph-ftimes.cgi <<< PROPERTY >>>|URLGetRequest=MapConfig <<< PROPERTY >>>|URLAuthType=basic <<< PROPERTY >>>|URLUsername=T001_HELP_0001_1 <<< PROPERTY >>>|URLPassword=######## <<< PROPERTY >>>|SSLVerifyPeerCert=N <<< PROPERTY >>>|SSLUseCertificate=N +++ LANDMARK +++|Stage4=GetModeWorkHorse +++ LANDMARK +++|Stage5=GetModeFinishUp <<< MODEDATA >>>|LogFileName=stderr <<< MODEDATA >>>|OutFileName=remote.cfg <<< EXECDATA >>>|Warnings=0 <<< EXECDATA >>>|Failures=0 <<< EXECDATA >>>|RunEpoch=2002/02/26 17:44:47 GMT <<< EXECDATA >>>|Duration=1 --- output --- 3. The following command will extract this recipe to a script file suitable for execution. sed -e '1,/^--- script ---$/d; /^--- script ---$/,$d' ftimes-get-write-cfg-to-file.txt > ftimes-get-write-cfg-to-file.sh --- script --- #!/bin/sh ( echo "BaseName=T001_HELP_0001_1" echo "GetAndExec=N" echo "GetFilename=remote.cfg" echo "URLGetURL=http://ftimes.sourceforge.net/cgi-bin/nph-ftimes.cgi" echo "URLUsername=T001_HELP_0001_1" echo "URLPassword=triage" echo "URLAuthType=basic" echo "URLGetRequest=MapConfig" ) | ftimes --getmode - --- script ---