Created
September 14, 2015 01:10
-
-
Save anthonykasza/3dbf4c3cdbf81d9ac605 to your computer and use it in GitHub Desktop.
A basic BASH script for searching Github for new and interesting repos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ -z ${1+x} ]; then | |
printf "usage: search.sh terms.txt\n\n"; | |
exit -1; | |
fi | |
DT=$(date '+%Y-%m-%d' --date="yesterday") | |
RESULTS_DIR="./results" | |
EMAIL="" | |
if [ ! -d "${RESULTS_DIR}" ]; then | |
mkdir "${RESULTS_DIR}" | |
fi | |
while read -r TERM; do | |
curl -s -G https://api.github.com/search/repositories \ | |
--data-urlencode "q=\"${TERM}\" in:name,description,readme created:>${DT}" \ | |
-H "Accept: application/vnd.github.preview" \ | |
| jq ".items[] | {name, description, language, watchers_count, html_url}" \ | |
> "${RESULTS_DIR}/${TERM}_${DT}.txt" | |
mail -s "${TERM} - New Github Repos" "${EMAIL}" < "${RESULTS_DIR}/${TERM}_${DT}.txt" | |
done < ${1} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
malware protocol | |
malware communication | |
network traffic | |
reverse engineer | |
exploit kit | |
indicator of compromise | |
network forensics |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment