Skip to content

Instantly share code, notes, and snippets.

View why.zsh
#!/usr/bin/env zsh
start=1
start_2=FF
cnt=1
while true;
do
s1=`echo $start | wc -m`
col=`echo $start | sed 's/.//3g'`
col="$col"m
echo -e "$cnt:\e[$col $start"
@pronto
pronto / headfollow
Last active Apr 24, 2018
find where url shorteners go
View headfollow
#!/usr/bin/env python3
#(works for 2.7 as well)
#todo: add support for <script>window.location='nsa.gov'<script>
import requests
import sys
def get_loc(url):
try:
h=requests.head(url).headers['location']
return h
except KeyError:
@pronto
pronto / checkit.zsh
Created Mar 31, 2015
checker for rsync finish
View checkit.zsh
#!/usr/bin/env zsh
#step one: save this awesome song as "sigtrapdc22.mp3"
# https://soundcloud.com/sigtrap/defcon-22-2014-demo
#then chmod +x this file
#./checkit.zsh ./.filename.ext.thatthingRsynaddsasittranfters
#something like ./.pron.mkv.3M3mTu
while :
do
if [[ ! -a $1 ]]; then
mplayer ~/music/sigtrapdc22.mp3
View geo.py
#!/usr/bin/env python2.7
import sys,re
import geoip2.database
def extractIPs(fileContent):
pattern = r"((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)([ (\[]?(\.|dot)[ )\]]?(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3})"
ips = [each[0] for each in re.findall(pattern, fileContent)]
for item in ips:
location = ips.index(item)
ip = re.sub("[ ()\[\]]", "", item)
ip = re.sub("dot", ".", ip)
@pronto
pronto / ipvike.py
Last active Aug 29, 2015
python ipviking collector
View ipvike.py
#!/usr/bin/env python3
#the websocket IP is found in the javascript of the map(if it ever changes)
import asyncio , websockets , json, time , asyncio ,os
@asyncio.coroutine
def hello():
websocket = yield from websockets.connect('ws://64.19.78.244:443/')
while True:
greeting = yield from websocket.recv()
try:
j_v=json.loads(greeting)
View shootphantom
#!/usr/local/bin/zsh
if [[ -z $1 ]]; then
echo 'syntax: shootphantom URL [name] (.png will be added for you)'
echo 'if NAME is empty a name will be attempted to be guessed'
return 1
fi
DATE=`date +%s`
URL=$1
echo 'url is:' $URL
if [[ ! -z $2 ]];then
View gist:1b648f94fa40f8060af4
fun_hash () {
#pass it the fullpath thing (celery)
for hashsum in "${hashCMDs[@]}"
do
echo -n "$hashsum "
$hashsum $1
done
}
View hash all the things
#!/bin/bash
mkdir ./.hashes/
arr=($(find `pwd` -type f))
for celery in "${arr[@]}"
do
name=$(echo $celery | sed 's,.*/,,')
echo $name
echo $celery
md5sum $celery >> ./.hashes/$name.hash.txt
sha512sum $celery >> ./.hashes/$name.hash.txt
@pronto
pronto / gist:ec35b7033ec6ca9e74fe
Created Sep 25, 2014
shellshock from detectify
View gist:ec35b7033ec6ca9e74fe
# .__ .__ .__ .__ __
# _____| |__ ____ | | | | _____| |__ ____ ____ | | __
# / ___/ | \_/ __ \| | | | / ___/ | \ / _ \_/ ___\| |/ /
# \___ \| Y \ ___/| |_| |__\___ \| Y ( <_> ) \___| <
# /____ >___| /\___ >____/____/____ >___| /\____/ \___ >__|_ \
# \/ \/ \/ \/ \/ \/ \/
#
# https://detectify.com/
# @detectify
#
@pronto
pronto / Head Location Follow
Created Sep 3, 2014
http server head location follow
View Head Location Follow
#!/usr/bin/env python2.7
import requests
import sys
def get_loc(url):
try:
h=requests.head(url).headers['location']
return h
except KeyError:
return 'END'
You can’t perform that action at this time.