From 5e63edcf139c201db43799fe7dd5859d1966fab9 Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Wed, 3 Aug 2011 10:45:10 +0200 Subject: [PATCH] Crude version of the Passive DNS dump --- tools/pdns-dump/fulldump.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tools/pdns-dump/fulldump.sh diff --git a/tools/pdns-dump/fulldump.sh b/tools/pdns-dump/fulldump.sh new file mode 100644 index 0000000..187840d --- /dev/null +++ b/tools/pdns-dump/fulldump.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# + +rm fulldump +FILEDUMP="/home/adulau/fulldump.pdns" +FILTER="*" +redis-cli KEYS "s:${FILTER}" | while read LINE; do echo -n $LINE." = ">>${FILEDU +MP}; VAL=`redis-cli GET ${LINE}`; echo "$VAL">>${FILEDUMP}; done; +redis-cli KEYS "l:${FILTER}" | while read LINE; do echo -n $LINE." = ">>${FILEDU +MP}; VAL=`redis-cli GET ${LINE}`; echo "$VAL">>${FILEDUMP}; done; +redis-cli KEYS "o:${FILTER}" | while read LINE; do echo -n $LINE." = ">>${FILEDU +MP}; VAL=`redis-cli GET ${LINE}`; echo "$VAL">>${FILEDUMP}; done; +redis-cli KEYS "r:${FILTER}" | while read LINE; do echo -n $LINE." = ">>${FILEDU +MP}; VAL=`redis-cli --raw -d , SMEMBERS ${LINE}`; echo "$VAL">>${FILEDUMP}; done +; + +FILTER="*" +redis-cli KEYS "v:${FILTER}" | while read LINE; do echo -n $LINE." = ">>${FILEDU +MP}; VAL=`redis-cli --raw -d , SMEMBERS ${LINE}`; echo "$VAL">>${FILEDUMP}; done +; + +