Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
overfl0wd authored Jun 17, 2019
1 parent 5931837 commit af9027a
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions secretScan.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

if [ $# -lt 2 ]
then
echo -e "\e[91mNot enough arguments supplied"
echo -e "\e[93mUsage: repo_scan.sh <target directory> <output directory>"
echo "Example: repo_scan.sh phoenix/ phoenix/secrets/"
exit 1
fi

echo -e "\n### Starting secret scanning..."
startdir=`pwd`
cd $1
dirs=`ls --directory */`

for dir in $dirs
do
echo -e "\n### Looking for secrets in:" $dir "...\n"
cd $dir
gittyleaks --find-anything > $startdir/$2${dir%?}"_secrets".txt
if [ $? = 0 ]
then
echo -e "\e[92m### Done! Wrote to:" $startdir/$2${dir%?}"_secrets".txt"\e[0m"
fi
cd ..
done

0 comments on commit af9027a

Please sign in to comment.