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 socket | |
with open('file.txt', 'r') as f: | |
t = f.read().split('\n') | |
for a in range(0, len(t)): | |
if t[a] != '': | |
try: | |
temp = t[a].split(' ')[0][:-1] | |
ip = socket.gethostbyname(temp) | |
print temp + ' ' + ip |
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
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services | |
Download the following ZIPs: | |
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
Download the correct GApps for your Android version: | |
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip) | |
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip) | |
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) |
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 |
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
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
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
{ | |
"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
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
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
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 |