Skip to content

Instantly share code, notes, and snippets.

@jmoggr
jmoggr / Diffie-Hellman_exploit_detection.sh
Last active October 16, 2015 00:27
Checks for potential exploits in Diffie-Hellman key exchange in the sites that you access.
#!/bin/bash
declare -A all_connections
while true; do
new_connections=()
for i in $(netstat -natp 2>/dev/null | grep :443 | awk '{ print $5 }'); do
if [[ ! ${all_connections[$i]} ]]; then
all_connections[$i]=1
new_connections+=($i)
@jmoggr
jmoggr / Metacritic_Scraper_ProofOfConcept.py
Last active December 9, 2015 20:19
Metacritic_Scraper_ProofOfConcept
import lxml.html
import urllib.request
from urllib.error import URLError
user_agent = 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'
headers = { 'User-Agent' : user_agent }
metacritic_tv_search_url = "http://metacritic.com/search/tv/{}/results"
metacritic_url = "http://metacritic.com"