Create git.sh

patch-1
Muhammad Daffa 2020-04-10 18:58:01 +07:00 committed by GitHub
parent 4329e28af7
commit 63e238b803
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
#!/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