Skip to content

Instantly share code, notes, and snippets.

@bodik
bodik / readme.md
Last active September 5, 2023 14:51
restrict access docker services running in vagrant box to perimeter network

does not handle input box itself

# cat /etc/iptables/rules.v4 
# Generated by iptables-save v1.8.9 (nf_tables) on Mon Jun  5 13:36:08 2023
*filter
:INPUT ACCEPT [5:208]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [170:16192]
:DOCKER-USER - [0:0]

Simple event registration with Google Forms and registration number assignment

  • create new gmail account

  • create new form forms.google.com

    • set settings responses collect email addresses
    • fill general event info to main/first form element
    • add name (Jméno), surname (Příjmení) fields (i18n names hardcoded in script)
    • add checkbox for permissions to process PI data
  • note the link taken directly from addressbar

@bodik
bodik / debian_gbp_buildpackage.md
Last active June 27, 2022 06:35
Debian build packaging via GBP
@bodik
bodik / Makefile
Created June 26, 2022 18:31
Symfony coverage generator
coverage:
vendor/bin/simple-phpunit --stop-on-error --coverage-clove .coverage.clove
php bin/coverage_checker.php .coverage.clove 100 | tee .coverage.log
@bodik
bodik / flask-graphimage.py
Last active February 22, 2021 09:10 — forked from carc1n0gen/flask-domain-matching.py
Flask Graph Image
from flask import Flask, send_file, url_for
app = Flask(__name__)
@app.route('/page1')
def page1():
# would be a render_template() at last
return '<img src="' + url_for('image1') + '">'
@bodik
bodik / .vimrc
Last active September 2, 2020 18:10
ansible vimrc
autocmd FileType yaml setlocal expandtab tabstop=2 autoindent shiftwidth=2 number softtabstop=0 cursorcolumn
@bodik
bodik / coverage-checker2.php
Created June 8, 2020 12:56
coverage-checker2.php improved version
<?php
# coverage-checker2.php, improved version
# https://ocramius.github.io/blog/automated-code-coverage-check-for-github-pull-requests-with-travis/
# https://stackoverflow.com/questions/13592547/how-to-group-numbers-in-ranges-using-php
function format_sequence($numbers) {
$groups = [];
$result = [];
sort($numbers);
@bodik
bodik / kerberos_attacks_cheatsheet.md
Created September 12, 2019 06:43 — forked from TarlogicSecurity/kerberos_attacks_cheatsheet.md
A cheatsheet with commands that can be used to perform kerberos attacks

Kerberos cheatsheet

Bruteforcing

With kerbrute.py:

python kerbrute.py -domain <domain_name> -users <users_file> -passwords <passwords_file> -outputfile <output_file>

With Rubeus version with brute module:

@bodik
bodik / gist:bc764ad2b73317b3936019b1e40e9908
Created May 9, 2019 10:09
parse simple search expression to sqlalchemy-filters
#!/usr/bin/env python3
import logging
from pprint import pprint
from lark import Lark, Transformer
"""
Boolean expression definition widely recognizes basic building blocks as
'terms' and 'factors', do not confuse them with parser's terminals. Also note
@bodik
bodik / psx.py
Created November 14, 2016 11:50 — forked from anonymous/psx.py
PowerShell decoder by @JohnLaTwC
## hacked together by @JohnLaTwC, Nov 2016, v 0.5
## This script attempts to decode common PowerShell encoded scripts. This version handles:
## * base64 data which encode unicode, gzip, or deflate encoded strings
## * it can operate on a file or stdin
## * it can run recursively in the event of multiple layers
## With apologies to @Lee_Holmes for using Python instead of PowerShell
##
import sys
import zlib
import re