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 / fuzz_http.go
Created July 14, 2014 08:28
extremly simple fuzzer for http
package main
import "fmt"
import "net"
import "bufio"
import "io/ioutil"
import "time"
import "bytes"
import "strings"
@mpfund
mpfund / windbg_common_commands.txt
Created July 14, 2014 12:53
Windbg Common Commands
.symfix c:\symbols
.reload
.cordll -ve -u -l
.loadby sos clr
sxe ld:mscorlib
All stacktraces in every thread
~*e!clrstack
@mpfund
mpfund / mysql_backup.bat
Created July 14, 2014 12:56
Mysql Backup & Restore
"C:\Program Files (x86)\MySQL\MySQL Workbench 6.0 CE\mysqldump.exe" -u [username] -p[password] --host=[hostname] --default-character-set=utf8 [dbname] > dbname.sql
alert(1);
@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
{
@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()
{
a
b
i
p
q
s
u
h1
h2
h3
@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"}} }
@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 / 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;