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 28
/
Copy path2021-tunedglobal_com.py
57 lines (44 loc) · 2.03 KB
/
2021-tunedglobal_com.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
55
56
57
import collections
from parsers import base
class Parse(base.Parser):
"""
tunedglobal.com breach data parser
Source File SHA-1: c0e89bcfa835910c2b0a3ae748995473375d438f music_users.sql
Good Lines: 464,251
"""
name = "None"
web = "tunedglobal.com"
year = "2021"
def row_format(self, r: str) -> tuple:
"""
sample:
user_id├──┤member_id├──┤group_id├──┤login├──┤password├──┤firstname├──┤surname├──┤email├──┤address1├─
│ ─┤address2├──┤suburb├──┤city├──┤state├──┤postcode├──┤country├──┤region├──┤phone_BH├──┤phone_AH├──┤we
│ bsite├──┤reg_datetime├──┤active├──┤opted_in├──┤allow_playlist├──┤allow_stream├──┤device_id├──┤client
│ _usercode├──┤pwd_question├──┤pwd_answer├──┤last_updated├──┤parental_pin├──┤allow_explicit├──┤test_us
│ er├──┤referrer├──┤social_login├──┤
name,website,year,domain,email,password,hash,salt
:param r:
:return:
"""
row = r.split('\t')
try:
email = row[8]
try:
domain = row[8].split('@')[1]
except:
domain = ''
password = row[5].strip()
except:
email = domain = password = ''
#print(f'{email}:{password}')
return self.name, self.web, int(self.year), domain, email, password, '', ''
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
yield self.row_format(row)