Last active
April 1, 2020 08:49
-
-
Save gregxsunday/5d657556bc6e5b6783d9c67039472860 to your computer and use it in GitHub Desktop.
useful bashrc settings
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
alias python=python3 | |
alias ipyhon=ipython3 | |
alias python2=/usr/bin/python2 | |
alias l="ls -al --color=auto --block-size=M" | |
STARTCOLOR='\e[1;32m' | |
ENDCOLOR="\e[0m" | |
export PS1="\n\[$STARTCOLOR\]\\t \\w:\\$ \[$ENDCOLOR\]" | |
alias i=ipython3 | |
alias ch="(google-chrome --ignore-certificate-errors --disable-xss-auditor &> /dev/null &)" | |
alias grep="grep --color=auto" | |
alias autorecon="python /home/gniedziela/pentests/tools/automated_recon/automated_recon.py" | |
alias linkfinder="python3.7 ~/tools/LinkFinder/linkfinder.py -o cli" | |
alias simpleserver="python -m http.server 8888" | |
alias dirsearch=~/pentests/tools/dirsearch/dirsearch.py | |
#export VIRUSTOTAL_KEY | |
#export GITROB_ACCESS_TOKEN | |
#export gitlab_api | |
#export shodan_key | |
#export vps | |
#alias vps="ssh $vps" | |
function virustotal() { | |
curl --request GET --url 'https://www.virustotal.com/vtapi/v2/domain/report?apikey='$VIRUSTOTAL_KEY'&domain='$1 | python -c 'import sys, json; print("\n".join(json.loads(sys.stdin.read())["subdomains"]))' | |
} | |
function wayback() { | |
curl -s "http://web.archive.org/cdx/search/cdx?url=$1/*&output=text&fl=original&collapse=urlkey" | sort -u | |
} | |
function certspotter(){ | |
curl -s -k -H "Authorization: Bearer $certspotter_key" "https://api.certspotter.com/v1/issuances?domain=$1&include_subdomains=true&expand=dns_names" | jq ' .[] | .dns_names | .[]' | sed 's/"//g' | grep -vE '^\*' | sort -u | |
} | |
function h(){ | |
history | grep $1 | |
} | |
function tcprelay(){ | |
python2 /home/gniedziela/pentests/tools/usbmuxd-1.0.8/python-client/tcprelay.py -t 22:2222 | |
} | |
function statuscodes(){ | |
while read line | |
do | |
statuscode=`curl -k -o /dev/null --silent --head --write-out '%{http_code}\n' "$line"` | |
if [[ $statuscode != "000" ]]; then | |
echo "$STATUSCODE $line" | |
fi | |
done < "${1:-/dev/stdin}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment