Skip to content

Instantly share code, notes, and snippets.

View jvolkman's full-sized avatar

Jeremy Volkman jvolkman

View GitHub Profile
@laanwj
laanwj / validate_macho_sig.py
Last active January 10, 2023 17:44
Validate cryptographic signature on macos macho binary
#!/usr/bin/env python3
import io
import struct
import sys
import pprint
import macholib.MachO
from macholib.mach_o import LC_CODE_SIGNATURE
import asn1crypto.x509
from asn1crypto.cms import ContentInfo, SignedData, CMSAttributes
#!/bin/vbash
# If IPv6 is working - exit.
/bin/ping6 -c 2 -n google.com > /dev/null
if [ $? == 0 ]; then
echo "IPv6 working."
exit 0;
fi
# If we have no working IPv4 connection - exit.