Created
January 2, 2019 15:36
-
-
Save mfowl/3e9b4cdd5d7df111557ae9dbed282699 to your computer and use it in GitHub Desktop.
Mitmproxy script for collecting Linked-In names.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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