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
import time | |
def queueRequests(target, wordlists): | |
engine = RequestEngine(endpoint=target.endpoint, | |
concurrentConnections=1, | |
requestsPerConnection=100, | |
pipeline=False | |
) | |
requests = 0 | |
for word in open('/usr/share/dict/words'): |
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
Using this private key to access targetdomain.com | |
-----BEGIN RSA PRIVATE KEY----- | |
MIIEowIBAAKCAQEAusTUBfl1T9pypGqgTeUQJUZHk+4o6cVCnrcpYzReKx6X3QO0 | |
fRLQlnbQ/yMF7C1m+CARS5AIMoowvBzlUZAf1bIc2xnX9b+EZSM+YNDExyaYMmO8 | |
XKfLQBJaRKeqqDKFuP4zglDWBWYceUWCWzt2IQl+7tYxFpUjdO44QCe9A6xQI1BT | |
Xd0k+9c28y1y6Qn5XDNhORvMaLv1OL3+v1rMyYiYIwtR1YVwNSofKklvDFFpMCEH | |
q0/77azlYwZef8UzuyGsg9tcwEht0kRZTupOw+naTU6hxZCcQaeXezqtr3Z05/wM | |
SdNrSBY1iuwvpBunW7MMF5Tff9yPreOQKYaTqQIDAQABAoIBAHvQPBZx11lGobVp | |
kjfRYLC1NIJW4fyHbrC1D9TaRIslTtuPtzkrHeiBf++DkkuNlbNr3stPAoAuqDws |
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
mkdir logs | |
cat gcp-project-ips.csv | cut -f1 -d, | sort -u | while read project; do mkdir logs/${project}; done | |
cat gcp-project-ips.csv | while IFS="," read -r project ip; do echo nmap -sT -T5 -Pn -p- -oG logs/${project}/${ip}.gnmap $ip; done > scan-all-ips.out | |
parallel --jobs 32 < scan-all-ips.out |
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
for dirname in logs/*; | |
do | |
for filename in ${dirname}/*.gnmap; | |
do | |
project=`echo $filename | cut -d/ -f2`; | |
ip=`echo $filename | cut -d/ -f3`; | |
ip=${ip::-6}; | |
cat $filename | cut -d' ' -f2,4- | sed -n -e 's/Ignored.*//p' | awk -v ip="$ip" -v project="$project" '{$1=""; for(i=2; i<=NF; i++) { a=a" "$i; }; split(a,s,","); for(e in s) { split(s[e],v,"/"); if (v[2] == "closed") { printf project "," ip ",%s,%s\n" , v[1], v[5]}}; a="" }'; | |
done; | |
done |
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
curl -s https://ip-ranges.amazonaws.com/ip-ranges.json | jq -r '.prefixes[] | select(.region | contains("gov")) | .ip_prefix' | sort -u |
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
{ | |
"mode": "patterns", | |
"proxySettings": [ | |
{ | |
"address": "127.0.0.1", | |
"port": 8080, | |
"username": "", | |
"password": "", | |
"type": 1, | |
"title": "127.0.0.1:8080", |
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
import CloudFlare | |
cf = CloudFlare.CloudFlare() | |
zones = cf.zones.get() | |
for zone in zones: | |
for record in cf.zones.dns_records.get(zone['id'], params={'per_page':100}): | |
print record['name'] + ',' + record['type'] + ',' + record['content'] |
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
echo Project Name,Disk Name,Source Image | |
for projectname in `gcloud projects list --format json | jq -r '.[].projectId'`; do | |
gcloud compute disks list -q --project $projectname --format json | \ | |
jq -r '.[] | ["\(.name)", "\(.sourceImage)"] | @tsv' | \ | |
while IFS=$'\t' read -r diskname sourceimage; do | |
os=`echo $sourceimage | awk -F "/" '{print $NF}'`; | |
echo $projectname,$diskname,$os; | |
done; | |
done |
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
--- | |
- hosts: production | |
gather_facts: no # This is helpful if a new EC2 instance is to be provisioned | |
become: yes | |
vars: | |
- default_users: ['nobody'] | |
- required_users: ['badshah', 'bob', 'alice'] | |
tasks: |
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
mkdir crossbuild | |
cd crossbuild | |
mkdir gcc | |
mkdir eglibc | |
mkdir binutils | |
mkdir install | |
mkdir sysroot | |
export prefix=/home/pi/crossbuild/install | |
export sysroot=/home/pi/crossbuild/sysroot |
NewerOlder