Skip to content

Instantly share code, notes, and snippets.

@ACK-J
ACK-J / metrix_block.py
Last active July 17, 2023 20:03
Find all the domains ThreatMetrix is using to exfil user tracking data
from shodan import Shodan
api = Shodan('API-KEY')
results = api.search('isp:"ThreatMetrix Inc." port:443 Bad Request')
for banner in results['matches']:
# Only care about services that use SSL
if 'ssl' in banner:
print(banner['ssl']['cert']['subject']['CN'])
@ACK-J
ACK-J / auto_cname.sh
Created March 27, 2021 03:36
One-liner to find all CNAME's for each subddomain of a given domain
while read line; do dig @1.1.1.1 +short "$line" cname >> out.txt; done < <(assetfinder -subs-only domain.com)
@ACK-J
ACK-J / Syscall.py
Created October 2, 2020 16:08
A function which can make a syscall in python and return stdout, stderr and the return-code
import subprocess
def runcommand(cmd):
proc = subprocess.Popen(cmd,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
shell=True,
universal_newlines=True)
std_out, std_err = proc.communicate()
return proc.returncode, std_out, std_err