Skip to content

Instantly share code, notes, and snippets.

@AlLongley
AlLongley / crt_sh_psql.sh
Created January 6, 2023 23:24
Fast DNS subdomain SSL certificate lookup directly from CRT.SH database crt_sh_psql.sh
#!/bin/bash
if [ "x$1" = "x" ];
then echo "You need to specify an input file containing domain names to iterate over!";echo "Usage: $0 list_of_domain_names.txt"
exit;
fi
if ! [ -x "$(command -v psql)" ]; then
echo 'Error: psql is not installed.' >&2
echo 'Try installing it: sudo apt install postgresql-client' >&2
@AlLongley
AlLongley / HAX.md
Last active August 11, 2024 07:39
AlLongley's HAX: Assorted CTF and tomfoolery snippets
@AlLongley
AlLongley / exo_token.ps1
Created November 19, 2023 02:32
PowerShell Microsoft Graph/ExchangeOnline/API FUN
# There's no simple built-in equivalent of the powershell Get-AzAccessToken to dump the active Auth/Bearer/token
# from the session initiated with Connect-ExchangeOnline
# This dumps all active sessions in current PoSH context
[Microsoft.Exchange.Management.ExoPowershellSnapin.ConnectionContextFactory]::GetAllConnectionContexts() | ConvertTo-JSON
[Microsoft.Exchange.Management.ExoPowershellSnapin.ConnectionContextFactory]::GetAllConnectionContexts() | select PowerShellTokenInfo | ConvertTo-JSON
[Microsoft.Exchange.Management.ExoPowershellSnapin.ConnectionContextFactory]::GetAllConnectionContexts() | Where-Object {-not [System.String]::IsNullOrEmpty($_.PowerShellCredentials)} | select PowerShellTokenInfo | ConvertTo-JSON
Write-Host "Hello World, via powershell cradle"
@AlLongley
AlLongley / CLSIDS.md
Last active May 1, 2024 14:05
WinInternals Notes