Skip to content

reconFTW is a tool designed to perform automated recon on a target domain by running the best set of tools to perform scanning and finding out vulnerabilities

fiw delete empty dirs and files

Bilel Eljaamii4473299b7733
diff --git a/reconftw.sh b/reconftw.sh
index 6de047c..6b712b1 100755
--- a/reconftw.sh
+++ b/reconftw.sh
@@ -1039,8 +1039,8 @@ function isAsciiText {
}
end(){
- find $dir -path ./.called_fn -prune -o -print -size 0 -exec rm -rf {} \; &>/dev/null
- find $dir -type d -empty -delete &>/dev/null
+ find $dir -type f -empty | grep -v "called_fn" | xargs rm -f &>/dev/null
+ find $dir -type d -empty | grep -v "called_fn" | xargs rm -rf &>/dev/null
if [ -n "$dir_output" ]
then
output