Skip to content

Instantly share code, notes, and snippets.

View mpfund's full-sized avatar

Marinus mpfund

  • ifempty
  • Munich
View GitHub Profile
@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 / 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 / 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 / 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 {
@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 / 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 / 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 / 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 / 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 / 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