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
#!/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: |
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
#!/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" |
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
class ScanIP(Base): | |
__tablename__='ScanIP' | |
pk = Column(Integer,Sequence('pk'), primary_key=True) | |
ip = Column(VARCHAR(39)) | |
class ScanPort(Base): | |
__tablename__='ScanPort' | |
pk = Column(Integer,Sequence('pk'), primary_key=True) | |
ip_pk= Column(Integer, ForeignKey('ScanIP.pk')) |
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
class portscan(Base): | |
__tablename__ = 'portscan' | |
pk = Column(Integer,Sequence('pk'), primary_key=True) | |
ip = Column(VARCHAR(39)) | |
dtime = Column(DATETIME) #because we're keeping a log and gonna update it every so | |
p21 = Column(Boolean) | |
p22 = Column(Boolean) | |
p53 = Column(Boolean) | |
p80 = Column(Boolean) | |
p443 = Column(Boolean) |
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
static void getrunners(unsigned int *restrict running, unsigned int *restrict blocked) { | |
struct direct *ent; | |
DIR *proc; | |
*running=0; | |
*blocked=0; | |
if((proc=opendir("/proc"))==NULL) crash("/proc"); | |
while(( ent=readdir(proc) )) { |
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
// ==UserScript== | |
// @name Replace Text On Webpages | |
// @namespace http://userscripts.org/users/23652 | |
// @description Replaces text on websites. Now supports wildcards in search queries. Won't replace text in certain tags like links and code blocks | |
// @include http://* | |
// @include https://* | |
// @exclude http://userscripts.org/scripts/review/* | |
// @copyright JoeSimmons | |
// @version 1.0.52 | |
// @license http://creativecommons.org/licenses/by-nc-nd/3.0/us/ |
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
#! /usr/bin/env python | |
import simplejson | |
import urllib2 | |
url="http://www.uasstatus.com/spaceapi.json" | |
out=urllib2.urlopen(url).read() | |
json=simplejson.loads(out) | |
if json['open']== True: | |
line= "#[fg=green,bold]|{0}|" | |
else: | |
line= "#[fg=red]|{0}|" |
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
#!/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) |
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
#!/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 |
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
#!/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) |
NewerOlder