Skip to content

Instantly share code, notes, and snippets.

Avatar

Ben Ransford ransford

View GitHub Profile
View echoserv.py
#!/usr/bin/env python3
import sys
from twisted.internet.protocol import Protocol, Factory
from twisted.internet import reactor
class Scream(Protocol):
flag = b'123'
View server.py
#!/usr/bin/env python
from twisted.internet.protocol import Protocol, Factory
from twisted.internet import reactor
class Scream(Protocol):
version = b'123'
def dataReceived(self, data):
self.transport.write(b'AAAAAAAA' + self.version)
View keybase.md

Keybase proof

I hereby claim:

  • I am ransford on github.
  • I am br (https://keybase.io/br) on keybase.
  • I have a public key whose fingerprint is F253 6003 BB22 5730 4D1B 8B90 8AC4 4C35 9B83 1EC3

To claim this, I am signing this object:

@ransford
ransford / mailv.go
Created Sep 9, 2016
email verify in go
View mailv.go
/* Run like:
go run <host> <address>
*/
package main
import (
"fmt"
"net/smtp"
"os"
View censys_jboss.py
#!/usr/bin/env python
"""Quickly and dirtily get JBoss X-Powered-By header contents
from the Censys API.
Usage: python censys_jboss.py > censys_jboss.txt"""
import os
import sys
import json
import requests
View keybase.md

Keybase proof

I hereby claim:

  • I am ransford on github.
  • I am br (https://keybase.io/br) on keybase.
  • I have a public key whose fingerprint is 4C62 4DF3 9567 B72F 5707 3DE8 8815 4C93 AE2C 1118

To claim this, I am signing this object:

@ransford
ransford / multtable.py
Last active Dec 20, 2015
multiplication table maker
View multtable.py
#!/usr/bin/env python
from __future__ import print_function
MAX = 20 # this many rows and columns
xs = range(1, MAX+1)
print("""
<html>
<head>
<style type="text/css">
@ransford
ransford / gist:3122423
Created Jul 16, 2012
Global earthquake map in 11 lines of R
View gist:3122423
library(maps)
library(ggplot2)
eqs7day.M1 <-
read.csv("http://earthquake.usgs.gov/earthquakes/catalogs/eqs7day-M1.txt")
world = as.data.frame(map("world")[c("x","y")])
newmap <- qplot(x, y, data=world, geom="path",
xlab="Latitude", ylab="Longitude",
main=paste("Earthquakes", Sys.Date()-8, "to", Sys.Date()-1)) +
geom_point(data=eqs7day.M1,
aes(x=Lon, y=Lat, size=Magnitude,
You can’t perform that action at this time.