Skip to content

Instantly share code, notes, and snippets.

View mpfund's full-sized avatar

Marinus mpfund

  • ifempty
  • Munich
View GitHub Profile
@mpfund
mpfund / simple_proxy.go
Last active November 9, 2020 10:26
simple golang http proxy
package main
import (
"fmt"
"io"
"net/http"
)
// A very simple http proxy
@mpfund
mpfund / debug_http_server.go
Created February 23, 2015 21:23
HTTP Debug Server
package main
import (
"net/http"
)
func main() {
debugHandler := http.HandlerFunc(debugRequest)
http.ListenAndServe(":81", debugHandler)
}
@mpfund
mpfund / https_interception_proxy.go
Created March 2, 2015 07:06
HTTPS Interception Proxy in go
package main
import (
"crypto/tls"
//"crypto/x509"
"bufio"
"fmt"
"io"
"net/http"
// "net/url"
@mpfund
mpfund / find_png_in_dump.go
Last active August 29, 2015 14:16
find png in dump
package main
import (
"bufio"
"flag"
"fmt"
"image/png"
"io"
"os"
"strconv"
@mpfund
mpfund / strings.go
Last active August 29, 2015 14:16
find_strings
package main;
import (
"fmt"
"flag"
"bufio"
"os"
"errors"
)
@mpfund
mpfund / findgzip.go
Created March 6, 2015 12:40
find gzip in streams
package main;
import (
"fmt"
"flag"
"bufio"
"os"
"compress/gzip"
"strconv"
"io"
@mpfund
mpfund / prime_factors.html
Created March 10, 2015 16:43
Prime Factors
<script src="bignumber.js"></script>
<canvas id='c' width="200" height="200">
</canvas>
<script>
function prime_factors(n){
var factors = [];
var d = 2;
@mpfund
mpfund / parsehtml.hs
Created April 14, 2015 05:31
parse html & links href
import Network.HTTP
import Text.HTML.TagSoup
openURL x = getResponseBody =<< simpleHTTP (getRequest x)
extractLinks ((TagOpen "a" as):xs) = as:extractLinks(xs)
extractLinks (x:xs) = extractLinks(xs)
extractLinks _ = []
extractHref (("href",k):xs) = k:extractHref(xs)
@mpfund
mpfund / strings.hs
Created April 14, 2015 19:36
find strings in files
import Data.ByteString.Lazy.Char8 as BS
import Data.Word
import Data.Bits
import Data.List
import Data.Char
import Data.List.Split
isChar x = o > 31 && o < 127 where o = ord x
scan::[Char]->[Char]->[Char]
@mpfund
mpfund / moz_xss.xml
Created May 9, 2015 12:19
moz_xss.xml
<?xml version="1.0"?>
<bindings xmlns="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml">
<binding id="xss">
<implementation>
<constructor>
alert("xss");
</constructor>
</implementation>
</binding>