Skip to content

Instantly share code, notes, and snippets.

@gdemarcsek
gdemarcsek / graphs.py
Created Apr 19, 2020
Fun with graph algos
View graphs.py
import logging
from queue import PriorityQueue
from functools import total_ordering
# Some fun with graph algos I was playing with
class NoSolutionException(Exception):
pass
View autorecon.sh
#!/bin/bash
# quick and dirty script i wrote for discovery and enumeration - provides nice strcuture on fs to organize results
# deps: nmap, xsltproc, parallel
# tested on kali 2018.3
if [[ -z "${TARGET}" ]]; then
exit 100
fi
ts=$(date +%s);
View abwp.sh
#!/bin/bash
set -euo pipefail
# Only needed if you have not yet downloaded the image
wget "https://s3.eu-west-3.amazonaws.com/bsideslux18/virtualbox-gdemarcs-bsideslux18.box"
# Import the image
vagrant box add --force --name bsideslux18/apparmor virtualbox-gdemarcs-bsideslux18.box
# Clone the workshop repo
git clone --depth=1 --branch master https://github.com/gdemarcsek/bsideslux18
View keybase_claim
### Keybase proof
I hereby claim:
* I am gdemarcsek on github.
* I am gdemarcsek (https://keybase.io/gdemarcsek) on keybase.
* I have a public key ASC97H3xcUQhQiPNSlzyC5we34_jZWdy9qfAcsLbY5fVhQo
To claim this, I am signing this object:
View owned.txt
you have been owned! :)
View p.php
<?php
header("Content-type: text/plain");
foreach ($_SERVER as $key => $value) {
if (substr($key, 0, 3) == "SSL") {
print "$key: $value\n"
}
}
?>
@gdemarcsek
gdemarcsek / Playground.java
Created Sep 18, 2016
Playing with Java Generics
View Playground.java
import java.util.List;
import java.util.ArrayList;
import java.util.Arrays;
class A {
}
class B extends A {
public int X = 42;
@gdemarcsek
gdemarcsek / gist:be4c05180cbc5363c8142ece31184e45
Created Jun 21, 2016
openssl self signed cert gen oneliner
View gist:be4c05180cbc5363c8142ece31184e45
openssl req -subj '/CN=domain.com/O=My Company Name LTD./C=US' -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout server.key -out server.crt
@gdemarcsek
gdemarcsek / ssl_init.c
Last active Aug 29, 2015
OpenSSL initialization
View ssl_init.c
CRYPTO_malloc_init();
OPENSSL_config(NULL);
SSL_load_error_strings();
ERR_load_BIO_strings();
SSL_library_init();