This recipe demonstrates how to download a map- or dig-config file and write it to stdout 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-stdout.txt > get.cfg --- get.cfg --- BaseName=T001_HELP_0001_1 GetAndExec=N 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 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. Note that stdout and stderr are coupled in the output stream. They may be decoupled using standard IO redirection techniques. ftimes --getmode get.cfg --- output --- <<< EXECDATA >>>|Program=ftimes 3.0.0 --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 >>>|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=######## +++ LANDMARK +++|Stage4=GetModeWorkHorse BaseName=T001_HELP_0001_1 OutDir=. RunType=linktest URLPutSnapshot=Y URLPutURL=http://ftimes.sourceforge.net/cgi-bin/nph-ftimes.cgi URLUsername=T001_HELP_0001_1 URLPassword=triage URLAuthType=basic URLCreateConfig=Y FieldMask=ALL-magic +++ LANDMARK +++|Stage5=GetModeFinishUp <<< MODEDATA >>>|LogFileName=stderr <<< MODEDATA >>>|OutFileName=stdout <<< EXECDATA >>>|Warnings=0 <<< EXECDATA >>>|Failures=0 <<< EXECDATA >>>|RunEpoch=2002/02/13 15:20:14 GMT <<< EXECDATA >>>|Duration=0 --- 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-stdout.txt > ftimes-get-write-cfg-to-stdout.sh --- script --- #!/bin/sh ( echo "BaseName=T001_HELP_0001_1" echo "GetAndExec=N" 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 ---