diff --git a/createDirectory.py b/createDirectory.py index fb29126..143dfb5 100644 --- a/createDirectory.py +++ b/createDirectory.py @@ -1,6 +1,5 @@ #!/usr/bin/python -# Author: Ty Lim # Date: 2/4/2015 # File name: createDirectory.py # Python Version: 3.X diff --git a/createDirectoryWindows.py b/createDirectoryWindows.py index b2c8cb2..9d12b08 100644 --- a/createDirectoryWindows.py +++ b/createDirectoryWindows.py @@ -1,6 +1,5 @@ #!/usr/bin/python -# Author: Ty Lim # Date: 2/5/2015 # File name: createDirectory.py # Python Version: 2.X, Windows diff --git a/scrapeTech.sh b/scrapeTech.sh new file mode 100644 index 0000000..31ccbbb --- /dev/null +++ b/scrapeTech.sh @@ -0,0 +1,43 @@ +#!/bin/sh +# Date: 02-23-2015 +# Description: Simple little shell bash shell script to scrape info on a site that's either using Google Analytics, or utilizing Dyn DNS. + +function readUrl(){ +read -p "Enter a URL: " url + +} + +function searchDns() { +dnsSearch=`whois $url | grep 'Name Server:' | grep -i dynect.net` +if [ "${dnsSearch}" ]; then + echo "Using Dyn: Yes" +else + echo "Using Dyn: No" +fi + +} + +function searchCurl() { +result=`curl -s $url | grep -F ".google-analytics.com/ga.js"` +result2=`curl -s $url | grep -F "ga.async = true"` +if [[ -n "$result" ]]; then + if [[ -n "$result2" ]]; then + echo "Using GA: Yes" + fi +else + echo "Using GA: No" + +fi + +} + + +function main(){ + +readUrl +searchCurl $url +searchDns $url + +} +######### MAIN ####### +main