From cdfaff7fabbb61d9031246e6bf892b3529a18d03 Mon Sep 17 00:00:00 2001 From: Seth Hall Date: Fri, 5 Aug 2011 23:30:35 -0400 Subject: [PATCH] Attempt at cleaning up doc generation. --- doc/scripts/DocSourcesList.cmake | 215 ++++++++++++++++--------------- doc/scripts/genDocSourcesList.sh | 13 +- scripts/all.bro | 23 ---- 3 files changed, 120 insertions(+), 131 deletions(-) delete mode 100644 scripts/all.bro diff --git a/doc/scripts/DocSourcesList.cmake b/doc/scripts/DocSourcesList.cmake index c5c3851f67..dd54c98111 100644 --- a/doc/scripts/DocSourcesList.cmake +++ b/doc/scripts/DocSourcesList.cmake @@ -7,118 +7,129 @@ # a given Bro script. # # Note: any path prefix of the script (2nd argument of rest_target macro) -# will be used to derive what path under policy/ the generated documentation +# will be used to derive what path under scripts/ the generated documentation # will be placed. -set(psd ${PROJECT_SOURCE_DIR}/policy) +set(psd ${PROJECT_SOURCE_DIR}/scripts) rest_target(${CMAKE_CURRENT_SOURCE_DIR} example.bro internal) -rest_target(${psd} bro.init internal) +rest_target(${psd} base/bro.init internal) +rest_target(${psd} base/all.bro internal) rest_target(${CMAKE_BINARY_DIR}/src bro.bif.bro) +rest_target(${CMAKE_BINARY_DIR}/src common-rw.bif.bro) rest_target(${CMAKE_BINARY_DIR}/src const.bif.bro) +rest_target(${CMAKE_BINARY_DIR}/src dns-rw.bif.bro) rest_target(${CMAKE_BINARY_DIR}/src event.bif.bro) +rest_target(${CMAKE_BINARY_DIR}/src finger-rw.bif.bro) +rest_target(${CMAKE_BINARY_DIR}/src ftp-rw.bif.bro) +rest_target(${CMAKE_BINARY_DIR}/src http-rw.bif.bro) +rest_target(${CMAKE_BINARY_DIR}/src ident-rw.bif.bro) rest_target(${CMAKE_BINARY_DIR}/src logging.bif.bro) rest_target(${CMAKE_BINARY_DIR}/src reporter.bif.bro) +rest_target(${CMAKE_BINARY_DIR}/src smb-rw.bif.bro) +rest_target(${CMAKE_BINARY_DIR}/src smtp-rw.bif.bro) rest_target(${CMAKE_BINARY_DIR}/src strings.bif.bro) rest_target(${CMAKE_BINARY_DIR}/src types.bif.bro) -rest_target(${psd} frameworks/cluster/base/main.bro) -rest_target(${psd} frameworks/cluster/base/node/manager.bro) -rest_target(${psd} frameworks/cluster/base/node/proxy.bro) -rest_target(${psd} frameworks/cluster/base/node/worker.bro) -rest_target(${psd} frameworks/cluster/base/setup-connections.bro) -rest_target(${psd} frameworks/communication/base/main.bro) -rest_target(${psd} frameworks/communication/listen-clear.bro) -rest_target(${psd} frameworks/communication/listen-ssl.bro) -rest_target(${psd} frameworks/control/base/main.bro) -rest_target(${psd} frameworks/control/controllee.bro) -rest_target(${psd} frameworks/control/controller.bro) -rest_target(${psd} frameworks/dpd/base/main.bro) -rest_target(${psd} frameworks/dpd/detect-protocols.bro) -rest_target(${psd} frameworks/dpd/packet-segment-logging.bro) -rest_target(${psd} frameworks/intel/base.bro) -rest_target(${psd} frameworks/logging/base.bro) -rest_target(${psd} frameworks/logging/plugins/ascii.bro) -rest_target(${psd} frameworks/metrics/base/main.bro) -rest_target(${psd} frameworks/metrics/conn-example.bro) -rest_target(${psd} frameworks/metrics/http-example.bro) -rest_target(${psd} frameworks/notice/action-filters.bro) -rest_target(${psd} frameworks/notice/base/actions/drop.bro) -rest_target(${psd} frameworks/notice/base/actions/email_admin.bro) -rest_target(${psd} frameworks/notice/base/actions/page.bro) -rest_target(${psd} frameworks/notice/base/main.bro) -rest_target(${psd} frameworks/notice/base/weird.bro) -rest_target(${psd} frameworks/notice/extend-email/hostnames.bro) -rest_target(${psd} frameworks/packet-filter/base/main.bro) -rest_target(${psd} frameworks/packet-filter/netstats.bro) -rest_target(${psd} frameworks/reporter/base.bro) -rest_target(${psd} frameworks/signatures/base.bro) -rest_target(${psd} frameworks/software/base/main.bro) -rest_target(${psd} frameworks/software/vulnerable.bro) -rest_target(${psd} frameworks/time-machine/notice.bro) -rest_target(${psd} integration/barnyard2/base.bro) -rest_target(${psd} integration/barnyard2/event.bro) -rest_target(${psd} integration/barnyard2/types.bro) -rest_target(${psd} misc/analysis-groups.bro) -rest_target(${psd} misc/loaded-scripts.bro) -rest_target(${psd} misc/trim-trace-file.bro) -rest_target(${psd} protocols/conn/base/contents.bro) -rest_target(${psd} protocols/conn/base/inactivity.bro) -rest_target(${psd} protocols/conn/base/main.bro) -rest_target(${psd} protocols/conn/known-hosts.bro) -rest_target(${psd} protocols/conn/known-services.bro) -rest_target(${psd} protocols/dns/auth-addl.bro) -rest_target(${psd} protocols/dns/base/consts.bro) -rest_target(${psd} protocols/dns/base/detect.bro) -rest_target(${psd} protocols/dns/base/main.bro) -rest_target(${psd} protocols/ftp/base.bro) -rest_target(${psd} protocols/ftp/detect.bro) -rest_target(${psd} protocols/ftp/file-extract.bro) -rest_target(${psd} protocols/ftp/software.bro) -rest_target(${psd} protocols/ftp/utils-commands.bro) -rest_target(${psd} protocols/http/base/detect-intel.bro) -rest_target(${psd} protocols/http/base/detect-sqli.bro) -rest_target(${psd} protocols/http/base/file-extract.bro) -rest_target(${psd} protocols/http/base/file-hash.bro) -rest_target(${psd} protocols/http/base/file-ident.bro) -rest_target(${psd} protocols/http/base/main.bro) -rest_target(${psd} protocols/http/base/software.bro) -rest_target(${psd} protocols/http/base/utils.bro) -rest_target(${psd} protocols/http/detect-MHR.bro) -rest_target(${psd} protocols/http/detect-webapps.bro) -rest_target(${psd} protocols/http/headers.bro) -rest_target(${psd} protocols/http/partial-content.bro) -rest_target(${psd} protocols/http/var-extraction-cookies.bro) -rest_target(${psd} protocols/http/var-extraction-uri.bro) -rest_target(${psd} protocols/irc/base.bro) -rest_target(${psd} protocols/irc/dcc-send.bro) -rest_target(${psd} protocols/mime/base.bro) -rest_target(${psd} protocols/mime/file-extract.bro) -rest_target(${psd} protocols/mime/file-hash.bro) -rest_target(${psd} protocols/mime/file-ident.bro) -rest_target(${psd} protocols/rpc/base.bro) -rest_target(${psd} protocols/smtp/base/main.bro) -rest_target(${psd} protocols/smtp/base/software.bro) -rest_target(${psd} protocols/smtp/detect-suspicious-orig.bro) -rest_target(${psd} protocols/ssh/base.bro) -rest_target(${psd} protocols/ssh/software.bro) -rest_target(${psd} protocols/ssl/base.bro) -rest_target(${psd} protocols/ssl/consts.bro) -rest_target(${psd} protocols/ssl/known-certs.bro) -rest_target(${psd} protocols/ssl/mozilla-ca-list.bro) -rest_target(${psd} protocols/syslog/base.bro) -rest_target(${psd} protocols/syslog/consts.bro) +rest_target(${psd} base/frameworks/cluster/main.bro) +rest_target(${psd} base/frameworks/cluster/nodes/manager.bro) +rest_target(${psd} base/frameworks/cluster/nodes/proxy.bro) +rest_target(${psd} base/frameworks/cluster/nodes/worker.bro) +rest_target(${psd} base/frameworks/cluster/setup-connections.bro) +rest_target(${psd} base/frameworks/communication/main.bro) +rest_target(${psd} base/frameworks/control/main.bro) +rest_target(${psd} base/frameworks/dpd/main.bro) +rest_target(${psd} base/frameworks/intel/main.bro) +rest_target(${psd} base/frameworks/logging/main.bro) +rest_target(${psd} base/frameworks/logging/writers/ascii.bro) +rest_target(${psd} base/frameworks/metrics/conn-example.bro) +rest_target(${psd} base/frameworks/metrics/http-example.bro) +rest_target(${psd} base/frameworks/metrics/main.bro) +rest_target(${psd} base/frameworks/notice/actions/drop.bro) +rest_target(${psd} base/frameworks/notice/actions/email_admin.bro) +rest_target(${psd} base/frameworks/notice/actions/page.bro) +rest_target(${psd} base/frameworks/notice/extend-email/hostnames.bro) +rest_target(${psd} base/frameworks/notice/main.bro) +rest_target(${psd} base/frameworks/notice/weird.bro) +rest_target(${psd} base/frameworks/packet-filter/main.bro) +rest_target(${psd} base/frameworks/packet-filter/netstats.bro) +rest_target(${psd} base/frameworks/reporter/main.bro) +rest_target(${psd} base/frameworks/signatures/main.bro) +rest_target(${psd} base/frameworks/software/main.bro) +rest_target(${psd} base/protocols/conn/contents.bro) +rest_target(${psd} base/protocols/conn/inactivity.bro) +rest_target(${psd} base/protocols/conn/main.bro) +rest_target(${psd} base/protocols/dns/consts.bro) +rest_target(${psd} base/protocols/dns/main.bro) +rest_target(${psd} base/protocols/ftp/file-extract.bro) +rest_target(${psd} base/protocols/ftp/main.bro) +rest_target(${psd} base/protocols/ftp/utils-commands.bro) +rest_target(${psd} base/protocols/http/file-extract.bro) +rest_target(${psd} base/protocols/http/file-hash.bro) +rest_target(${psd} base/protocols/http/file-ident.bro) +rest_target(${psd} base/protocols/http/main.bro) +rest_target(${psd} base/protocols/http/partial-content.bro) +rest_target(${psd} base/protocols/http/utils.bro) +rest_target(${psd} base/protocols/irc/dcc-send.bro) +rest_target(${psd} base/protocols/irc/main.bro) +rest_target(${psd} base/protocols/mime/base.bro) +rest_target(${psd} base/protocols/mime/file-extract.bro) +rest_target(${psd} base/protocols/mime/file-hash.bro) +rest_target(${psd} base/protocols/mime/file-ident.bro) +rest_target(${psd} base/protocols/rpc/base.bro) +rest_target(${psd} base/protocols/smtp/main.bro) +rest_target(${psd} base/protocols/ssh/main.bro) +rest_target(${psd} base/protocols/ssl/consts.bro) +rest_target(${psd} base/protocols/ssl/main.bro) +rest_target(${psd} base/protocols/ssl/mozilla-ca-list.bro) +rest_target(${psd} base/protocols/syslog/consts.bro) +rest_target(${psd} base/protocols/syslog/main.bro) +rest_target(${psd} base/utils/addrs.bro) +rest_target(${psd} base/utils/conn-ids.bro) +rest_target(${psd} base/utils/directions-and-hosts.bro) +rest_target(${psd} base/utils/files.bro) +rest_target(${psd} base/utils/numbers.bro) +rest_target(${psd} base/utils/paths.bro) +rest_target(${psd} base/utils/patterns.bro) +rest_target(${psd} base/utils/site.bro) +rest_target(${psd} base/utils/strings.bro) +rest_target(${psd} base/utils/thresholds.bro) +rest_target(${psd} policy/frameworks/communication/listen-clear.bro) +rest_target(${psd} policy/frameworks/communication/listen-ssl.bro) +rest_target(${psd} policy/frameworks/control/controllee.bro) +rest_target(${psd} policy/frameworks/control/controller.bro) +rest_target(${psd} policy/frameworks/dpd/detect-protocols.bro) +rest_target(${psd} policy/frameworks/dpd/packet-segment-logging.bro) +rest_target(${psd} policy/frameworks/software/version-changes.bro) +rest_target(${psd} policy/frameworks/software/vulnerable.bro) +rest_target(${psd} policy/integration/barnyard2/base.bro) +rest_target(${psd} policy/integration/barnyard2/event.bro) +rest_target(${psd} policy/integration/barnyard2/types.bro) +rest_target(${psd} policy/misc/analysis-groups.bro) +rest_target(${psd} policy/misc/loaded-scripts.bro) +rest_target(${psd} policy/misc/trim-trace-file.bro) +rest_target(${psd} policy/protocols/conn/known-hosts.bro) +rest_target(${psd} policy/protocols/conn/known-services.bro) +rest_target(${psd} policy/protocols/conn/scan.bro) +rest_target(${psd} policy/protocols/dns/auth-addl.bro) +rest_target(${psd} policy/protocols/dns/detect-external-names.bro) +rest_target(${psd} policy/protocols/ftp/detect.bro) +rest_target(${psd} policy/protocols/ftp/software.bro) +rest_target(${psd} policy/protocols/http/detect-MHR.bro) +rest_target(${psd} policy/protocols/http/detect-intel.bro) +rest_target(${psd} policy/protocols/http/detect-sqli.bro) +rest_target(${psd} policy/protocols/http/detect-webapps.bro) +rest_target(${psd} policy/protocols/http/headers.bro) +rest_target(${psd} policy/protocols/http/software.bro) +rest_target(${psd} policy/protocols/http/var-extraction-cookies.bro) +rest_target(${psd} policy/protocols/http/var-extraction-uri.bro) +rest_target(${psd} policy/protocols/smtp/detect-suspicious-orig.bro) +rest_target(${psd} policy/protocols/smtp/software.bro) +rest_target(${psd} policy/protocols/ssh/software.bro) +rest_target(${psd} policy/protocols/ssl/known-certs.bro) +rest_target(${psd} policy/protocols/ssl/validate-certs.bro) +rest_target(${psd} policy/tuning/defaults/packet-fragments.bro) +rest_target(${psd} policy/tuning/defaults/remove-high-volume-notices.bro) +rest_target(${psd} policy/tuning/defaults/warnings.bro) +rest_target(${psd} policy/tuning/track-all-assets.bro) rest_target(${psd} site/local.bro) -rest_target(${psd} tuning/defaults/packet-fragments.bro) -rest_target(${psd} tuning/defaults/remove-high-volume-notices.bro) -rest_target(${psd} tuning/track-all-assets.bro) -rest_target(${psd} utils/addrs.bro) -rest_target(${psd} utils/conn-ids.bro) -rest_target(${psd} utils/directions-and-hosts.bro) -rest_target(${psd} utils/files.bro) -rest_target(${psd} utils/numbers.bro) -rest_target(${psd} utils/paths.bro) -rest_target(${psd} utils/pattern.bro) -rest_target(${psd} utils/site.bro) -rest_target(${psd} utils/strings.bro) -rest_target(${psd} utils/thresholds.bro) diff --git a/doc/scripts/genDocSourcesList.sh b/doc/scripts/genDocSourcesList.sh index 23d2355c91..0783884372 100755 --- a/doc/scripts/genDocSourcesList.sh +++ b/doc/scripts/genDocSourcesList.sh @@ -12,7 +12,7 @@ # parseable or they just aren't meant to be documented. blacklist="__load__.bro|test-all.bro|all.bro" -blacklist_addl="hot.conn.bro|ssl-old.bro" +blacklist_addl="hot.conn.bro" statictext="\ # DO NOT EDIT @@ -24,13 +24,14 @@ statictext="\ # a given Bro script. # # Note: any path prefix of the script (2nd argument of rest_target macro) -# will be used to derive what path under policy/ the generated documentation +# will be used to derive what path under scripts/ the generated documentation # will be placed. -set(psd \${PROJECT_SOURCE_DIR}/policy) +set(psd \${PROJECT_SOURCE_DIR}/scripts) rest_target(\${CMAKE_CURRENT_SOURCE_DIR} example.bro internal) -rest_target(\${psd} bro.init internal) +rest_target(\${psd} base/bro.init internal) +rest_target(\${psd} base/all.bro internal) " if [[ $# -ge 1 ]]; then @@ -52,9 +53,9 @@ do echo "rest_target(\${CMAKE_BINARY_DIR}/src $f)" >> $outfile done -policyfiles=`( cd ${sourcedir}/policy && find . -name \*\.bro | sort )` +scriptfiles=`( cd ${sourcedir}/scripts && find . -name \*\.bro | sort )` -for file in $policyfiles +for file in $scriptfiles do f=${file:2} if [[ (! $f =~ $blacklist) && (! $f =~ $blacklist_addl) ]]; then diff --git a/scripts/all.bro b/scripts/all.bro deleted file mode 100644 index 60762316bb..0000000000 --- a/scripts/all.bro +++ /dev/null @@ -1,23 +0,0 @@ -##! This script only aims at loading all of the base analysis scripts. - -#@load protocols/conn -#@load protocols/dns -#@load protocols/ftp -#@load protocols/http -#@load protocols/irc -#@load protocols/mime -#@load protocols/smtp -#@load protocols/ssh -@load protocols/ssl -#@load protocols/syslog - -@load frameworks/metrics -@load frameworks/notice -@load frameworks/signatures -@load frameworks/software -@load frameworks/reporter -@load frameworks/cluster - -@load tuning/defaults - -@load misc/loaded-scripts