Skip to content

Instantly share code, notes, and snippets.

@plmi
plmi / powershell-to-macro.sh
Last active December 19, 2025 15:36
Make a PowerShell script compatible to use in VBA (Microsoft Office Macro)
#!/usr/bin/env bash
# Description: Convert a base64 encoded PowerShell command to a VBA expression that bypasses the 255 character limit.
# Usage 1: cat reverse-shell.ps1 | iconv -t UTF-16LE | base64 -w 0 | ./powershell-to-macro.sh
# Usage 2: ./powershell-to-macro.sh -c "<base64 encoded powershell command>
set -euo pipefail
usage() {
echo "Usage: $0 [-c string]"
echo " echo 'text' | $0"
@plmi
plmi / brute-timebased-mssql.py
Created December 18, 2025 01:37
Example of brute-forcing a time-based SQLi in MSSQL
#!/usr/bin/env python3
import time
import string
import requests
data: dict = {
'username': '',
'password': 'password',
'login': 'Login'
@plmi
plmi / .gitleaks.toml
Created November 21, 2025 00:48
Custom .gitleaks.toml
[[rules]]
id = "md5-hash"
description = "MD5 hash detected, ignoring images"
regex = '''\b[a-fA-F0-9]{32}\b'''
severity = "medium"
[[rules.allowlists]]
paths = [
".*\\.jpg$",
".*\\.png$"
]
@plmi
plmi / Dockerfile
Last active October 2, 2025 17:58
A Dockerfile to run ikeforce in a working python2 environment.
FROM python:2.7-alpine
# Install build tools and dependencies
RUN apk add --no-cache \
build-base \
libffi-dev \
openssl-dev \
python2-dev \
vim
@plmi
plmi / call-api-by-name-2.bas
Last active June 16, 2024 22:15
Call API by Name by Cobein
'---------------------------------------------------------------------------------------
' Module : cCallAPIByName
' DateTime : 31/08/2008 19:40
' Author : Cobein
' Mail : [email protected]
' WebPage : http://www.advancevb.com.ar
' Purpose : Call APIs by name
' Usage : At your own risk
' Requirements: None
' Distribution: You can freely use this code in your own
@plmi
plmi / compile.sh
Created September 3, 2023 10:30
Compile LaTeX presentation
#!/bin/sh
biber presentation && \
pdflatex -shell-escape presentation.tex && pdflatex -shell-escape presentation.tex
@plmi
plmi / nfs-mount.ps1
Created August 26, 2023 20:12
Mount OpenMediaVault NFS share on Windows
Enable-WindowsOptionalFeature -FeatureName ServicesForNFS-ClientOnly, ClientForNFS-Infrastructure -Online -NoRestart
New-PSDrive -PSProvider FileSystem -Name M -Root \\192.168.8.101\export\shared -Persist
choco install zoxide nvm 7zip.install pyenv-win git neovim starship vscode googlechrome powershell-core powertoys winfsp gsudo rclone notepadplusplus
@plmi
plmi / flop_benchmark.py
Last active October 31, 2022 20:48
FLOP Benchmark with numpy
#!/usr/bin/env python3
import time
import numpy as np
N = 4096
A = np.random.randn(N, N).astype(np.float32)
B = np.random.randn(N, N).astype(np.float32)
# number of multiplications