This repository has been archived by the owner on Sep 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy path2021-parkmobile_us.py
54 lines (42 loc) · 1.64 KB
/
2021-parkmobile_us.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import collections
from parsers import base
class Parse(base.Parser):
"""
Parkmobile.us breach data parser
Source File SHA-1: d06823f1ecdccab5aae1ed79db3d2787a16d9f8b Parkmobile.us_2021-03-21.9M.csv
Good Lines: 19,855,817
"""
name = "None"
web = "Parkmobile.us"
year = "2021"
def row_format(self, r: str) -> tuple:
"""
sample:
"CLIENT_ID","TITLE","INITIALS","FIRST_NAME","LAST_NAME","GENDER","DATE_OF_BIRTH","MOBILE_NUMBER",
"EMAIL","USER_NAME","PASSWORD","SECOND_PASSWORD","THIRD_PASSWORD","SOCIAL_SECURITY_NUMBER",
"ADDRESSLINE_1","ZIPCODE","CITY","VRN","DESCRIPTIONS"
name,website,year,domain,email,password,hash,salt
:param r:
:return:
"""
email = ''
pw_hash = ''
row = r.split('","')
for field in row:
if '@' in field:
email = field.replace('\'', '').strip()
if field.count('$') == 3:
pw_hash = field.replace('\'', '').strip()
domain = email.split('@')[1] if '@' in email else ''
return self.name, self.web, int(self.year), domain, email, '', pw_hash, ''
def process_rows(self) -> collections.abc.Iterable[tuple]:
"""
Returns rows for the caller to process
"""
with open(self.source, 'r', encoding='utf-8', errors='ignore') as source:
for row in source:
if row is None:
continue
if len(row.split('","')) != 18:
continue
yield self.row_format(row)