Skip to content

Instantly share code, notes, and snippets.

View egglessness's full-sized avatar

egglessness egglessness

View GitHub Profile
@egglessness
egglessness / Set-KeepassXCPolicy.ps1
Created May 28, 2024 08:07
KeepassXC policy enforcer
<#
.SYNOPSIS
This script applies custom settings to KeePassXC config files on both Local and
Roaming user profile dirs.
To customize the settings to apply, just edit the contents of $SettingsLocal and
$SettingsRoaming, following the config file specification available at:
https://github.com/keepassxreboot/keepassxc/blob/develop/src/core/Config.cpp
.NOTES
Author: egglessness
@egglessness
egglessness / VSTOTroubleshoot.ps1
Created May 23, 2024 13:57
Prevent and fix VSTO add-ins for Outlook being disabled due to performance reasons
<#
.SYNOPSIS
Prevent and fix VSTO add-ins for Outlook being disabled due to performance reasons
.PARAMETER Fix
Fix incorrect values in the Windows Registry (requires Administrator privileges)
.EXAMPLE
VSTOTroubleshoot.ps1 -Fix
#>
[CmdletBinding()]
@egglessness
egglessness / UacConsentLogParser.ps1
Created May 8, 2024 14:57
Parse UAC consent prompt events with information about the called process
$ScanResultsPath = ".\UacPrompts.csv"
$DateFormat = "yyyyMMddHHmmss"
$isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")
if (-not $isAdmin) {
Write-Host "You must run this script with administrator privileges!"
exit
}
$isAuditEnabled = auditpol /get /subcategory:"{0CCE922B-69AE-11D9-BED3-505054503030}" | select-string "Success" -Quiet
@egglessness
egglessness / redirect_certs_helpers.py
Created February 5, 2024 23:18
Helper functions to extract redirect chains and cert SAN
import re
import ssl
import socket
import requests
import urllib3
from OpenSSL import crypto
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
@egglessness
egglessness / pysni.py
Created September 28, 2023 22:30
Dump SNI from PCAP or live interface
import pdb
import sys
import argparse
import logging
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
from scapy.all import *
parser = argparse.ArgumentParser()
parser.add_argument("--ip", help="Filter by host IP address")
@egglessness
egglessness / wav2csv.py
Last active June 1, 2022 20:20
Wav2Csv - Convert, resample, and plot wav files into csv format
# Wav2Csv converts wav files into csv format (timestamp, amplitude), suitable for data analysis with R.
# Input files can be resampled specifying a "sample period" in ms.
#
# Usage: python3 wav2csv.py INPUT.wav OUTPUT.csv [--period 16] [--plot]
#
# Before launching the script, install the following libraries:
# pip3 install librosa matplotlib pandas
#
import datetime