bash-bounty/Exposed Source Code/git.sh

20 lines
406 B
Bash
Raw Normal View History

2020-04-10 11:58:01 +00:00
#!/bin/bash
# .git Checker
LISTS=$1
if [[ ! -f ${LISTS} ]]; then
echo "ERROR: ${LISTS} not found"
echo "usage: bash $0 list.txt"
exit
fi
for SITE in $(cat $LISTS);
do
if [[ $(curl --connect-timeout 3 --max-time 3 -kLs "${SITE}/.git/HEAD" ) =~ 'ref: refs/heads/master' ]]; then
echo -e "\e[32m[+] FOUND: ${SITE}.git/config"
else
echo -e "\e[31m[-] NOT FOUND: ${SITE}"
fi
done