Skip to content

Instantly share code, notes, and snippets.

View pry0cc's full-sized avatar
💭
Hacking the Planet

pry0cc pry0cc

💭
Hacking the Planet
  • Amazon Web Services
  • Austin, TX
  • X @pry0cc
View GitHub Profile
#!/bin/bash
url="$1"
domain=$(echo "$url" | unfurl domain)
pat=$(echo "$url" | unfurl path)
nmap -T4 -p80,443 -Pn -sV "$domain" --script http-ntlm-info --script-args http-ntlm-info.root="$pat"
#!/bin/bash
protocols=("ssh" "ftp" "telnet" "netbios-ssn" "ms-wbt-server" "vnc")
for protocol in "${protocols[@]}"
do
mkdir -p "proto/$protocol"
users="usernames/generic.txt"
passes="passwords/generic.txt"
@pry0cc
pry0cc / dns-resolvers.txt
Created March 8, 2021 23:03
Providers that haven't complained yet
1.1.1.1
9.9.9.9
8.8.8.8
129.250.35.250
1.0.0.1
212.31.32.130
198.82.247.34
129.250.35.251
195.113.144.194
194.179.1.100
@pry0cc
pry0cc / amass_configs.json
Created February 10, 2021 23:49
Amass secret configurations in JSON to help tool authors add amass key integration
{
"data_sources.AlienVault": {
},
"data_sources.AlienVault.Credentials": {
"apikey ": ""
},
"data_sources.BinaryEdge": {
"ttl 10080": ""
},
"data_sources.BinaryEdge.Credentials": {
#!/bin/bash
email="$1"
key=""
if [[ -z "$email" ]]; then
echo "No email supplied"
exit 1
fi
#!/bin/bash
ranges="$1"
cat $ranges | tr '/' ' ' | while read ip mask; do if [[ $mask -lt 22 ]]; then; echo "$ip/$mask"; fi; done
@pry0cc
pry0cc / ports.py
Created October 15, 2020 21:51
Get all ports from an nmap XML output file in the host:ip format
#!/usr/bin/env python
## $ ports.py nmap.xml
## 8.8.8.8:80
## 8.8.8.8:443
## 8.8.8.8:3305
#install requirements: pip install python-libnmap
#uses python 2
@pry0cc
pry0cc / autocomplete.txt
Created August 14, 2020 15:20
Axiom command auto complete, just for ZSH (those who haven't installed it recently)
export PATH="$PATH:$HOME/.axiom/interact"
source $HOME/.axiom/functions/autocomplete.zsh
compdef _axiom-ssh axiom-rm
compdef _axiom-ssh axiom-ssh
compdef _axiom-ssh axiom-select
compdef _axiom-ssh axiom-backup
compdef _axiom-ssh axiom-vpn
compdef _axiom-restore axiom-restore
compdef _axiom-deploy axiom-deploy
@pry0cc
pry0cc / cold
Created August 13, 2020 22:23
A quick script to generate an on-the-fly CSV of resolved assets. Useful for generating asset discovery lists.
#!/bin/bash
(echo "Subdomain,IP,Region,Country,Organization,Netblock,Link Type" && while read line; do ip=$(echo $line| cut -d " " -f 2); name=$(echo $line | cut -d " " -f 1); echo -n "$name,"; echo $ip | ipi '[.ip,.city,.region,.country,.company.name,.asn.name,.asn.route,.asn.type] | @csv'; done) | tee -a assets.csv
@pry0cc
pry0cc / webserver.sh
Created July 19, 2020 21:27
A quick docker lets-encrypt webserver with php.
#!/bin/bash
DOMAIN="$1"
mkdir -p $HOME/www
docker run --detach --name nginx-proxy --restart=always --publish 80:80 --publish 443:443 --volume /etc/nginx/certs --volume /etc/nginx/vhost.d --volume /usr/share/nginx/html --volume /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy
docker run --detach --name nginx-proxy-letsencrypt --restart=always --volumes-from nginx-proxy --volume /var/run/docker.sock:/var/run/docker.sock:ro jrcs/letsencrypt-nginx-proxy-companion
docker run --restart=always -d --name "apache-php" -v $HOME/www:/var/www/html -e "VIRTUAL_HOST=$DOMAIN" -e "LETSENCRYPT_HOST=$DOMAIN" php:7.3-apache