Skip to content

Instantly share code, notes, and snippets.

@LordVeovis
LordVeovis / Get-KEK.ps1
Last active November 26, 2025 23:32
SecureBoot research
#Requires -PSEdition Desktop
#Requires -RunAsAdministrator
#Requires -Modules SecureBoot
# https://uefi.org/specs/UEFI/2.11/32_Secure_Boot_and_Driver_Signing.html#signature-database
param(
[ValidateSet("PK", "KEK", "db", "dbx", "SetupMode", "SecureBoot", "PKDefault", "KEKDefault", "dbDefault", "dbxDefault", "dbt", "dbtDefault")]
[string]$Name,
@LordVeovis
LordVeovis / Set-ScreenResolution.ps1
Last active May 25, 2025 10:37
Change screen resolution in WinPE
Function Set-ScreenResolution {
param (
[Parameter(Mandatory=$true, Position = 0)]
[int]$Width,
[Parameter(Mandatory=$true, Position = 1)]
[int]$Height
)
$pinvokeCode = @"
using System;
networks:
default:
traefik:
external: true
name: br_traefik_rp
services:
traefik:
image: traefik:v3.3
container_name: traefik
@LordVeovis
LordVeovis / vm.pkr.hcl
Created January 29, 2025 08:59
Packer Hyper-V alpine LUKS
packer {
required_plugins {
hyperv = {
source = "github.com/hashicorp/hyperv"
version = "~> 1"
}
}
}
variable "lukspwd" {
@LordVeovis
LordVeovis / sensor-light.yaml
Last active December 29, 2024 12:06 — forked from Blackshome/sensor-light.yaml
Home Assistant Sensor Light that can be used in Blueprints
blueprint:
name: Sensor Light
description: >
# 💡 Sensor Light
**Version: 7.5**
Your lighting experience, your way - take control and customize it to perfection! 💡✨
@LordVeovis
LordVeovis / compose.yaml
Last active October 6, 2024 18:55
Traefik
networks:
default: # par défaut internal=false, donc accès internet
internal:
internal: true
# ex: docker network create -d bridge --internal --subnet 172.29.0.0/24 br_traefik_rp
traefik:
external: true # external=true indique que le réseau a été créé manuellement
name: br_traefik_rp
services:
@LordVeovis
LordVeovis / (docker_host):§etc§netplan§20-wireguard.yaml
Last active September 22, 2024 16:47
multihoming selectif on specific docker container
# to restart properly:
# ip l d wg0 && systemctl restart systemd-networkd && netplan apply
# debugger wireguard sur kernel Lockdown (SecureBoot): modprobe -r wireguard && modprobe wireguard dyndbg
network:
version: 2
tunnels:
wg0:
mode: wireguard
key: PKEY_DOCKER_HOST
addresses: [192.18.0.3/29]
@LordVeovis
LordVeovis / docker-to-dt.py
Created September 12, 2024 10:05
Script to upload SBOM of all running containers on the local machine to Dependency-Track
#!/usr/bin/python3
from sys import exit, platform
from os import geteuid, getgroups
from subprocess import Popen, PIPE, run
import json
import requests
import re
import grp
import argparse
#!/bin/sh
tftp_root=/srv/tftp3/root
alias de='docker exec'
[ -d "$tftp_root" ] || mkdir -p "$tftp_root"
mkdir $tftp_root/isos
mkdir -p /mnt/iso
# Generated by iptables-save v1.8.4 on Sun Mar 10 12:22:21 2024
*mangle
:PREROUTING ACCEPT [277:110915]
:INPUT ACCEPT [202:76357]
:FORWARD ACCEPT [75:34558]
:OUTPUT ACCEPT [303:29155]
:POSTROUTING ACCEPT [378:63713]
-A FORWARD -i ens3 -o wg0 -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
COMMIT
# Completed on Sun Mar 10 12:22:21 2024