Skip to content

Instantly share code, notes, and snippets.

@mfowl
Created January 2, 2019 15:36
Show Gist options
  • Save mfowl/3e9b4cdd5d7df111557ae9dbed282699 to your computer and use it in GitHub Desktop.
Save mfowl/3e9b4cdd5d7df111557ae9dbed282699 to your computer and use it in GitHub Desktop.
Mitmproxy script for collecting Linked-In names.
import datetime
import os
import re
def response(flow):
with open('/tmp/linked-in-names-%s.txt' % datetime.datetime.now().date(), "a") as f:
names = re.findall(r'firstName":"[a-zA-Z:",. ]+',flow.response.text)
for name in names:
clean = name.lstrip().rstrip().replace('firstName":"','').replace('","lastName":"',' ').replace('","','').lower()
f.write(clean + "\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment