Skip to content

Instantly share code, notes, and snippets.

View cooperq's full-sized avatar

Cooper Quintin cooperq

View GitHub Profile
tankgirl:spec cooperq$ rake spec
(in /Users/cooperq/code/ronin)
/Users/cooperq/code/ronin/lib/ronin/config.rb:21:in `require': no such file to load -- static_paths (LoadError)
from /Users/cooperq/code/ronin/lib/ronin/config.rb:21
from /Users/cooperq/code/ronin/lib/ronin/database/database.rb:23:in `require'
from /Users/cooperq/code/ronin/lib/ronin/database/database.rb:23
from /Users/cooperq/code/ronin/lib/ronin/model/lazy_upgrade.rb:21:in `require'
from /Users/cooperq/code/ronin/lib/ronin/model/lazy_upgrade.rb:21
from /Users/cooperq/code/ronin/lib/ronin/model/model.rb:21:in `require'
from /Users/cooperq/code/ronin/lib/ronin/model/model.rb:21
@cooperq
cooperq / sinatracrud.rb
Created May 3, 2011 19:28
crud in sinatra
#here is app.rb:
get '/admin' do
protected!
@posters = Poster.all
@category_1_posters = @posters.all :category => 1
@category_2_posters = @posters.all :category => 2
@category_3_posters = @posters.all :category => 3
haml :'admin/index'
end
@cooperq
cooperq / gist:3042024
Created July 3, 2012 19:05
crash message from ethersheet
info - transport end (socket end)
debug - set close timeout for client 1556672142472291423
debug - cleared close timeout for client 1556672142472291423
debug - cleared heartbeat interval for client 1556672142472291423
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
TypeError: Cannot read property 'sheet_id' of undefined
at Socket.<anonymous> (/home/ethersheet/EtherSheet/lib/server.js:95:32)
$ python client.py https://level07-2.stripe-ctf.com/user-hhltjtltlw/ 5 aJNMqG5M8325RY eggo 1 1
Traceback (most recent call last):
File "client.py", line 72, in <module>
print c.order(sys.argv[4], sys.argv[5:7])
File "client.py", line 22, in order
return self.api_call('/orders', params)
File "client.py", line 37, in api_call
data = json.loads(resp.text)
AttributeError: 'Response' object has no attribute 'text'
<html>
<head>
<style>
body{
background: #000000;
color: #00ff00;
font-family: courier
}
input{
border: none;
$ python password_db_launcher 123456789012 localhost:8000
Split length 12 password into 4 chunks of size about 3: ['123', '456', '789', '012']
Checking whether 127.0.0.1:14437 is reachable
Checking whether 127.0.0.1:14438 is reachable
Checking whether 127.0.0.1:14439 is reachable
Checking whether 127.0.0.1:14440 is reachable
Traceback (most recent call last):
File "password_db_launcher", line 147, in <module>
sys.exit(main())
File "password_db_launcher", line 125, in main
import socket
HOST = '' # Symbolic name meaning all available interfaces
PORT = 50008 # Arbitrary non-privileged port
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((HOST, PORT))
s.listen(1)
old_port = 1
while 1:
conn, addr = s.accept()
@cooperq
cooperq / server.js
Created November 11, 2012 23:31
simple node redirect app
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(302, {'Location': 'https://ethersheet.org'});
res.end();
}).listen(8000);
console.log('Server running at http://0.0.0.0:8000/');
@cooperq
cooperq / gist:8443635
Created January 15, 2014 20:13
malloc malloc malloc malloc all day long malloc malloc malloc this is the malloc song!
#include <stdlib.h>
#include <stdio.h>
void main(){
printf("Allocating all the memory...\n");
while(1){
int *buffer = malloc(1024);
if(buffer == NULL){
printf("could not allocate any more memory\n");
}
@cooperq
cooperq / gist:0919e79734f15789094c
Created December 5, 2014 20:59
Failing firefox test
exports["test Policy hasWhitelistedScheme"] = function(assert) {
assert.ok(true);
};
require("sdk/test").run(exports);