Skip to content

Instantly share code, notes, and snippets.

View rgov's full-sized avatar
🤿

Ryan Govostes rgov

🤿
View GitHub Profile
@rgov
rgov / gist:1630236
Created January 18, 2012 01:35
Fetches a photo from a Flickr group's pool.
#!/bin/sh
API_KEY=
API_URL=https://secure.flickr.com/services/rest/
GROUP_ID=52242140489@N01
# Fetch the ID of the latest photo added to the group's pool.
PHOTO_ID=$(\
curl \
; ModuleID = '8086'
%struct.reg_t = type <{ i16, i16, i16, i16, i16, i16, i16, i16 }>
%struct.fp_reg_t = type <{}>
define i32 @jitmain(i8* nocapture %RAM, %struct.reg_t* %grf, %struct.fp_reg_t* %frf, void (i64*)* %debug) nounwind {
entry:
%0 = getelementptr %struct.reg_t* %grf, i64 0, i32 0
%1 = load i16* %0, align 2
%2 = getelementptr %struct.reg_t* %grf, i64 0, i32 1
@rgov
rgov / phpfingerprint.py
Created April 10, 2012 20:29
Creates a fingerprint of a PHP server by analyzing the output of the credits Easter egg
#!/usr/bin/env python
import pprint
import requests
import hashlib
from bs4 import BeautifulSoup
def normalize(s):
return hashlib.md5(s.strip().encode('utf-8')).hexdigest()
def handler(host, port, request):
# Doesn't actually seem to show up in the UI, but I can dream
request.setHeader('Content-Type', 'image/png')
return file('owned.png').read()
resolver = dnsclient.Resolver(servers=[ ('4.2.2.2', 53) ])
dnsproxy = DNSReverseProxy(resolver=resolver)
dnsproxy.rewrite('google.com')
dnsproxy.start()
found candidate: TIFWDUTPGDCSDWTICYYCSNGUFUCBRUDSAMUDTIDHNOKYSCOCMPPTUATIWRIT
^((.)(.)(.)(.)(.)(.)\2(.)(.)\6(.)(.)\6\5\2\3\10(.)\12\10\11(.)\9\7\4\7\10(.)(.)\7\6\11(.)(.)\7\6\2\3\6(.)\13(.)(.)\12\11\10\19\10\17\8\8\2\7\16\2\3\5\15\3\2)$
[]
found candidate: DUTPGDCSDWTICYYCSNGUFUCBRUD
^((.)(.)(.)(.)(.)\2(.)(.)\2(.)\4(.)\7(.)\11\7\8(.)\6\3(.)\3\7(.)(.)\3\2)$
[]
found candidate: TPGDCSDWTICYYCSNGUFUCBRUDSAMUDTIDHNOKYSCOCMPPT
^((.)(.)(.)(.)(.)(.)\5(.)\2(.)\6(.)\10\6\7(.)\4(.)(.)\12\6(.)(.)\12\5\7(.)(.)\12\5\2\9\5(.)\11(.)(.)\10\7\6\19\6\17\3\3\2)$
[]
found candidate: CSDWTICYYCSNGUFUCBRUDSAMUDTIDHNOKYSC
@rgov
rgov / beetle.ipt
Created April 28, 2012 07:18
Fire Beetle, June 1, 2000
ON SIGNON {
fire_data01 GLOBAL
"Fire Beetle v0.019b05" STATUSMSG
[ "[ " 0 ] fire_data01 =
}
ON ENTER {
fire_data01 GLOBAL
"Fire Beetle v0.019b05" STATUSMSG
NBRROOMUSERS fire_data01 1 PUT
// Game design by Rachel Possen
// Programmed by Ryan Govostes
// Draw the maze
GROWBY 50 % 20 [COLOR 7 [FD 20 RT 90 ] ]
JT 12 4 COLOR 5 [BOX 10 14 ] FILL 5
JT -100 -100 COLOR 1 [FD 18 ]
JT 30 -40 COLOR 10 [MT 49 -40 ]
JT 0 0 COLOR 14 [BOX 500 400 ] JT 260 0 FILL 14 JT 12 4
// Draw the shapes
MAKESHAPE 0 [COLOR 0 [CIRCLE 3 ] ]
@rgov
rgov / build-gnuradio.diff
Created May 3, 2012 02:20
Patch to support building older versions of GNU Radio.
--- build-gnuradio.orig 2012-04-25 15:17:34.000000000 -0700
+++ build-gnuradio 2012-05-03 00:45:10.472998124 -0700
@@ -325,7 +325,7 @@
guile boost-devel alsa-lib-devel numpy gsl-devel python-devel pygsl \
python-cheetah python-lxml guile-devel PyOpenGL qt-devel qt qt4 qt4-devel \
PyQt4-devel qwt-devel qwtplot3d-qt4-devel libusb libusb-devel \
- libusb1 libusb1-devel cmake git wget python-docutils \
+ libusb1 libusb1-devel cmake git wget python-docutils sdcc \
PyQwt PyQwt-devel qwt-devel gtk2-engines xmlrpc-c-"*" tkinter orc >>$LOGDEV 2>&1
;;
http://_/_______________________________________________________________________________________________xxxxxxx____________________________________________________________xxxxxxxxxxxxxxx_____________________________________________________xxxxxxxxxxxxxxxxxxxxx_________________________________________________xxxxxxxxxxxxxxxxxxxxxxx_______________________________________________xxxxxxxxxxxxxxxxxxxxxxxxx_____________________________________________xxxxxxxxxxxxxxxxxxxxxxxxxxx____________________________________________xxxxxxxxxxxxxxxxxxxxxxxxxxx____________________________________________xxxxxxxx___xxxxx___xxxxxxxx____________________________________________xxxxxx______xxx_______xxxxx_____________________________________________xxxx_______xxx_______xxxx______________________________________________xxxx______xxxxx______xxxx_______________________________________________xxxxxxxxxx___xxxxxxxxxx_________________________________________________xxxxxxxxx___xxxxxxxxx____________________________________________________xx
#!/usr/bin/env python
import itertools, re
def explode(str):
return re.split(r'(\W+)', str)[:-1]
def reverseinplace(str):
r = [ w[::-1] if re.match(r'\w+$', w) else w for w in explode(str) ]
return ''.join(r)