Skip to content

Commit 703f968

Browse files
committed
Co-authored-by: Salar Arbabi <saArbabi@users.noreply.github.com>
1 parent daee5b9 commit 703f968

File tree

8 files changed

+297
-0
lines changed

8 files changed

+297
-0
lines changed

2025-Mar-05/Group-1/csv_test.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import csv
2+
"""
3+
def return_emails():
4+
with open ('emails.csv', newline='') as csvfile:
5+
reader = csv.reader(csvfile, delimiter=',')
6+
the_list = []
7+
for row in reader:
8+
the_list.append(row)
9+
print(the_list)
10+
return the_list
11+
"""
12+
13+
14+
def simple_open(csv_path):
15+
file = open(csv_path, "r")
16+
output = []
17+
for line in file:
18+
output.append(line.strip().split(",")[0])
19+
file.close()
20+
return output
21+
22+
print(simple_open("emails.csv"))
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
I am exercising my right to be forgotten afforded to me by GDPR
2+
3+
Thanks, have a good day.
4+
5+

2025-Mar-05/Group-1/emails.csv

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
privacy@peopleconnect.us,
2+
support@whitepages.com,
3+
marketing@accudata.com,
4+
privacy@acxiom.com,
5+
info@advcredit.com,
6+
alex@take5mg.com,
7+
tapster@gmail.com,
8+
sherry.booles@alc.com,
9+
onlineops@allwebleads.com,
10+
press@allareacodes.com,
11+
Britt.Gottlieb@altisource.com,
12+
Legal@CBC-Companies.com,
13+
gailm@analytics-iq.com,
14+
dpo@ancestry.com,
15+
info@aslmarketing.com,
16+
swenson@assurance.com,
17+
Sue.Temple@CBC-Companies.com,
18+
avrickdirect@avrick.com,
19+
kit@bcint.com,
20+
compliance@bisi.com,
21+
cklafehn@backgroundchecks.com,
22+
support@beenverified.com,
23+
corporatecompliance@bkfs.com,
24+
cameron.stoll@blackbaud.com,
25+
dwayne.landry@bridgevine.com,
26+
cbcservices@cbcinnovis.com,
27+
james.kinzer@cdk.com,
28+
CTHOMAS@CICCREDIT.COM,
29+
compliance@civisanalytics.com,
30+
clarityconsumers@experian.com,
31+
pei@compactlists.com,
32+
customercare@peoplefinders.com,
33+
compliance@cicreports.com,
34+
dghazaleh@corelogic.com,
35+
privacy@cortera.com,
36+
privacy@cisnationwide.com,
37+
privacy@criminalbackgroundchecks.com,
38+
Webmaster@CriminalScreen.com,
39+
info@onlineinvestigations.com.au,
40+
johnna@datafacts.com,
41+
info@dataamerica.com,
42+
consult@databaseusa.com,
43+
pkuman@v12data.com,
44+
privacyprogramoffice@deluxe.com,
45+
er@datastreamgroup.com,
46+
vtinquiries@equifax.com,
47+
connect@theDMSgrp.com,
48+
bschorer@digitalsegment.com,
49+
Dblackman@drobu.com,
50+
privacyoffice@earlywarning.com,
51+
WSep@ghrr.com,
52+
tshaul@collegeloan.com,
53+
databroker@enformion.com,
54+
Lisa.Gallerano@epsilon.com,
55+
unsubscribe@experian.com,
56+
nerissa.rush@experian.com,
57+
britchie-boland@firstam.com,
58+
joel@firstdirectmarketing.com,
59+
cdenton@firstorion.com,
60+
support@forewarn.com,
61+
support@freecellsearch.com,
62+
dan.wobbekind@fullcontact.com,
63+
greg@fusedleads.com,
64+
kristin.jones@hireright.com,
65+
privacy@goodhire.com,
66+
info@healthcare.com,
67+
info@i-360.com,
68+
ken_meiser@symantec.com,
69+
bruce.noll@ihsmarkit.com,
70+
abby@incheck.net,
71+
elizabeth@goodhire.com,
72+
info@infocore.com,
73+
privacyteam@infogroup.com,
74+
support@infotracer.com,
75+
pedrokialanda@infutor.com,
76+
support@instantcheckmate.com,
77+
jvolk@verisk.com,
78+
support@intelregistry.com,
79+
support@ididata.com,
80+
nate.waymire@backgroundsonline.com,
81+
admin@jverify.com,
82+
privacy@wundermandata.com,
83+
accounts@kgb.com,
84+
bbrownson@knowwho.com,
85+
bruce.willsie@L2Political.com,
86+
legal.compliance@risk.lexisnexis.com,
87+
support@libertydata.net,
88+
email@mapsmoji.com,
89+
mrichard@usinfosearch.com,
90+
peterlong@mchdata.com,
91+
privacy@findmypast.co.uk,
92+
accounting@modernize.com,
93+
contactus@nationalbackgroundcheck.com,
94+
admin@nctue.com,
95+
legal@studentclearinghouse.org,
96+
privacy@team.neustar,
97+
dave@nelists.com,
98+
h.paulus@nexxagroup.com,
99+
JBALBOA@OPENDEALEREXCHANGE.COM,
100+
compliance@openonline.com,
101+
privacy_ww@oracle.com,
102+
tpowell@owneriq.com,
103+
jschwartz@parasolleads.com,
104+
pkarbo@creditinterlink.com,
105+
invoices@path2response.com,
106+
info@peekyou.com,
107+
support@peoplebyname.com,
108+
privacy@peoplelookup.com,
109+
privacy@peoplesmart.com,
110+
support@persopo.com,
111+
help@phonebooks.com,
112+
mail@pipl.com,
113+
george@plmrkg.com,
114+
info@plusaddresscom,
115+
bschorer@possiblenow.com,
116+
matt@applecart.co,
117+
privacy@1and1.com,
118+
privacy@publicrecords.com,
119+
contact@publicrecordssearchonline.org,
120+
andy@revealmobile.com,
121+
content@ancestry.com,
122+
matthussey@infutor.com,
123+
info@skipsmasher.com,
124+
Matt@Socialcatfish.com,
125+
webmaster@oklavoters.com,
126+
mbagley@speedeondata.com,
127+
jmatthes@spokeo.com,
128+
info@spydialer.com,
129+
privacy@sterlingts.com,
130+
info@sterlingd.com,
131+
jdrziak@strategicinfo.com,
132+
info@ThatsThem.com,
133+
dave@lead.co,
134+
privacy.enquiries@refinitiv.com,
135+
TLOxpSupport@transunion.com,
136+
tburke@towerdata.com,
137+
keith.mccawley@transunion.com,
138+
help@truthfinder.com,
139+
bmorgan@twinedata.com,
140+
info@andersonadvisors.com,
141+
webmaster@ultimatewhitepages.org,
142+
datalicensing@valassis.com,
143+
vyp@myyp.com,
144+
bnojima@viantinc.com,
145+
help@VoterFactory.com,
146+
privacy@webbula.com,
147+
sonya.southward@thomsonreuters.com,
148+
mail@whitepages.plus,
149+
support@whoodle.com,
150+
privacy@wiland.com,
151+
info@yasni.com,
152+
privacy@zoominfo.com

2025-Mar-05/Group-1/main.py

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# idea - Email a collection of data brokers with GDPR requests
2+
import requests #fela's code - do not plagiarise
3+
4+
import base64
5+
from email.message import EmailMessage
6+
7+
from os import getenv as get_env
8+
9+
sending_from_email = get_env("USER_EMAIL")
10+
print(sending_from_email)
11+
if sending_from_email is None:
12+
sending_from_email = open("my_email.txt").read().strip()
13+
14+
email_contents = open("email_contents.txt").read()
15+
16+
def create_email():
17+
message = EmailMessage()
18+
message.set_content(email_contents)
19+
20+
# replace with email from reader.py
21+
message["To"] = "gduser1@workspacesamples.dev"
22+
23+
message["From"] = sending_from_email
24+
message["Subject"] = "GDPR Right to be forgotten"
25+
26+
# encoded message
27+
encoded_message = base64.urlsafe_b64encode(message.as_bytes()).decode()
28+
29+
return {"raw": encoded_message}
30+
31+
if __name__ == "__main__f":
32+
print(create_email())
33+
34+
# pip import python-gmail
35+
36+
import google.auth
37+
from googleapiclient.discovery import build
38+
from googleapiclient.errors import HttpError
39+
40+
def gmail_send_message():
41+
"""Create and send an email message
42+
Print the returned message id
43+
Returns: Message object, including message id
44+
45+
Load pre-authorized user credentials from the environment.
46+
TODO(developer) - See https://developers.google.com/identity
47+
for guides on implementing OAuth2 for the application.
48+
"""
49+
creds, _ = google.auth.default()
50+
51+
try:
52+
service = build("gmail", "v1", credentials=creds)
53+
create_message = create_email()
54+
55+
send_message = (
56+
service.users()
57+
.messages()
58+
.send(userId="me", body=create_message)
59+
.execute()
60+
)
61+
print(f'Message Id: {send_message["id"]}')
62+
except HttpError as error:
63+
print(f"An error occurred: {error}")
64+
send_message = None
65+
return send_message
66+
67+
if __name__ == "__main__":
68+
gmail_send_message()

2025-Mar-05/Group-1/nocommit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
504087263474-2pdb0n9qab929vvh8l7cft92nsgmlfek.apps.googleusercontent.com

2025-Mar-05/Group-1/reader.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import csv
2+
3+
def return_emails():
4+
with open ('emails.csv', newline='') as csvfile:
5+
reader = csv.reader(csvfile, delimiter=',')
6+
print(type(reader))
7+
emails = []
8+
for row in reader:
9+
# print(type(row))
10+
# print(len(row))
11+
emails.append(row[0])
12+
# print(emails)
13+
return emails
14+
15+
16+
if __name__ == "__main__":
17+
emails = return_emails()
18+
import typing
19+
assert isinstance(emails, typing.Iterable)
20+
assert isinstance(next(iter(emails)), str)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
python-gmail
2+
google-auth
3+
google-api-python-client
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import smtplib
2+
3+
def prompt(title):
4+
return input(title).strip()
5+
6+
from_addr = prompt("From: ")
7+
to_addrs = prompt("To: ").split()
8+
print("Enter message, end with ^D (Unix) or ^Z (Windows):")
9+
10+
# Add the From: and To: headers at the start!
11+
lines = [f"From: {from_addr}", f"To: {', '.join(to_addrs)}", ""]
12+
while True:
13+
try:
14+
line = input()
15+
except EOFError:
16+
break
17+
else:
18+
lines.append(line)
19+
20+
msg = "\r\n".join(lines)
21+
print("Message length is", len(msg))
22+
23+
server = smtplib.SMTP("google")
24+
server.set_debuglevel(1)
25+
server.sendmail(from_addr, to_addrs, msg)
26+
server.quit()

0 commit comments

Comments
 (0)