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 / 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 / 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 / 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 / gen_ssl_certs.bat
Created February 23, 2015 11:11
SSL Zertifikate erstellen
set opensslpath=C:\openssl-win32\
set keyfolder=c:\sslkeys\
set OPENSSL_CONF=%opensslpath%bin\openssl.cfg
:: generate key + certificate sign request + certificate
%opensslpath%\bin\openssl genrsa -out %keyfolder%server.key 2048
%opensslpath%\bin\openssl req -new -key %keyfolder%server.key -out %keyfolder%server.csr
%opensslpath%\bin\openssl x509 -req -days 730 -in %keyfolder%server.csr -signkey %keyfolder%server.key -out %keyfolder%server.cert
@mpfund
mpfund / getlinksclient.go
Created February 13, 2015 15:42
golang get links from url
package main
import (
"fmt"
"github.com/PuerkitoBio/goquery"
"log"
"net/http"
"net/url"
"strings"
)
@mpfund
mpfund / faninfanout.go
Created February 13, 2015 15:41
golang fan-in fan-out
// faninfanout
package main
import (
"fmt"
"sync"
)
func source() <-chan int {
ch1 := make(chan int)
@mpfund
mpfund / gist:c3d39ca07d04c36cb2f3
Created February 13, 2015 13:13
Golang gomaz aws, dynamodb PutItem
package main
import (
"fmt"
"github.com/AdRoll/goamz/aws"
"github.com/AdRoll/goamz/dynamodb"
"log"
"strings"
)
@mpfund
mpfund / find_userdefined_htmltags.js
Last active August 29, 2015 14:15
JavaScript Shorties
$('*').each(function(k,v){
if("abrcodemetahtmlspanlidivimgh1h2h3formtextareainputulstrongblockquotelabelnoscriptbodyheadlinktitle".indexOf(v.tagName.toLowerCase())<0)
{console.log(v)}
})
@mpfund
mpfund / q.md
Last active August 29, 2015 14:15
df

<5 <cz/><5 <<cz/><5> <<cz/><5> http://google.com/<<cz/><5> <5

<5

# <5

# # <5 #

[# # # <5 # #][]

@mpfund
mpfund / url_attack.rs
Last active August 29, 2015 14:14
brute force urls
extern crate hyper;
extern crate getopts;
use hyper::Client;
use hyper::header::*;
use getopts::{optopt,optflag,getopts,OptGroup};
use std::os;
use std::old_io as io;
struct AppSettings {