Skip to content

Instantly share code, notes, and snippets.

View mpfund's full-sized avatar

Marinus Pfund mpfund

  • ifempty
  • Munich
View GitHub Profile
@mpfund
mpfund / wordlist_creator.html
Created January 16, 2015 20:02
Creates wordlists in a specific length
<!DOCTYPE html>
<body>
<script>
var lenStart = 3;
var lenEnd = 3;
var chars = "abcdefghijklmnopqrstuvwxyz";
@mpfund
mpfund / dynamorio_binding.rs
Created December 15, 2014 23:11
empty dynamorio client in rust
#![crate_type = "dylib"]
#![feature(link_args)]
extern crate libc;
pub type ClientIdT = u32;
#[no_mangle]
pub static _USES_DR_VERSION_:i32 = 500;
#[link(name="dynamorio")]
@mpfund
mpfund / read_line_and_contains.rs
Created December 12, 2014 12:46
Read Line from stdin and check if vector contains
use std::io;
fn main() {
let modules : Vec<&str> = vec!("a","dust","c");
let m = modules.as_slice();
let mut reader = io::stdin();
let inp = reader.read_line().ok().expect("Failed to read line");
if m.contains(&inp.trim()){
@mpfund
mpfund / murmur3_32bit.rs
Created November 14, 2014 23:56
murmur3 32bit in rust
fn main() {
let k = murmur3_32("mqmqdpu".as_bytes(),0_u32);
println!("{:0>8t}",k);
println!("{:u}",k);
}
fn murmur3_32(key:&[u8],seed:u32)->u32{
let c1:u32 = 0xcc9e2d51;
@mpfund
mpfund / mongo_commands.txt
Created September 1, 2014 09:12
MongoDb Commands
Start with db path:
mongod --dbpath c:\db
repair db after unexpected shutdown:
mongod --dbpath c:\db --repair
backup:
mongodump --out /data/backup/
restore:
@mpfund
mpfund / groupby_bodyinputs_requestedurl.txt
Created August 14, 2014 23:44
mongodb aggregate + group
{ $project:{RequestedUrl:1,BodyInputs:1} },
{ $unwind:"$BodyInputs" },
{ $group : {_id:"$BodyInputs",RequestedUrl:{$push:"$RequestedUrl"}} }
a
b
i
p
q
s
u
h1
h2
h3
@mpfund
mpfund / simpleHttpServer.cs
Created July 21, 2014 07:20
A simple http listener / server
using System;
using System.Net;
using System.Threading;
namespace SimpleHttpServer
{
public class SimpleHttpServer
{
public static void Start()
{
@mpfund
mpfund / text_fuzzer.cs
Created July 20, 2014 23:15
simple html and text fuzzer
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
namespace CreateSite
{
alert(1);