Skip to content

Instantly share code, notes, and snippets.

@royharoush
royharoush / CanBeinaShellFile.sh
Last active June 30, 2016 06:04
one liner to grab the list of starred projects by a user
for page in 1 2 3 4 ; do curl "https://api.github.com/users/$1/$2?page=$page&per_page=99" | grep 'name\|"description\|clone_url' | sed s'\,\\' | sed "/\b\(labels_url\|full_name\)\b/d" |tr -d '"' | sed s'jname:j##############j' | sed s'kdescription:k###k'| sed s'sclone_url:sgit clones' | awk '$1=="##############"{x=$0;next} $1=="###"{print x, $0; next} 1' | sed 's/^ *//' ;done >$1-$2.txt
#for page in 1 2 3 4 ; do curl "https://api.github.com/users/royharoush/starred?page=$page&per_page=99" | grep 'name\|"description\|clone_url' | sed s'\,\\' | sed "/\b\(labels_url\|full_name\)\b/d" |tr -d '"' | sed s'jname:j##############j' | sed s'kdescription:k###k'| sed s'sclone_url:sgit clones' | awk '$1=="##############"{x=$0;next} $1=="###"{print x, $0; next} 1' | sed 's/^ *//' ;done >mystarred.txt
##### Install metasploit ~ http://docs.kali.org/general-use/starting-metasploit-framework-in-kali
echo -e "\n ${GREEN}[+]${RESET} Installing ${GREEN}metasploit${RESET} ~ exploit framework"
apt-get -y -qq install metasploit-framework 2>/dev/null || echo -e ' '${RED}'[!] Issue with apt-get'${RESET} 1>&2
mkdir -p ~/.msf4/modules/{auxiliary,exploits,payloads,post}/
#--- ASCII art
export GOCOW=1 # Always a cow logo ;) Others: THISISHALLOWEEN (Halloween), APRILFOOLSPONIES (My Little Pony)
file=~/.bashrc; [ -e "${file}" ] && cp -n $file{,.bkup}
([[ -e "${file}" && "$(tail -c 1 ${file})" != "" ]]) && echo >> "${file}"
grep -q '^GOCOW' "${file}" 2>/dev/null || echo 'GOCOW=1' >> "${file}"
#--- Fix any port issues