with open("email_encrypt.txt", "w", encoding="utf-8") as fw:
fw.write(get_email("wenben.txt"))
file_data = ""
with open("email_encrypt.txt", "r", encoding="utf-8")as fr:
for line in fr.readlines():
t = md5_encode(line)
if "\n" in line:
line = line.replace("\n", " " + t + "\n")
else:
line = line + " " + t
file_data += line
with open("email_encrypt.txt", "w", encoding="utf-8")as fn:
fn.write(file_data)
with open("phone_encrypt.txt", "w", encoding="utf-8") as fw2:
fw2.write(get_phonenumber("wenben.txt"))
file_data2 = ""
with open("phone_encrypt.txt", "r", encoding="utf-8")as fr2:
for line in fr2.readlines():
t2 = md5_encode(line)
if "\n" in line:
line = line.replace("\n", " " + t2 + "\n")
else:
line = line + " " + t2
file_data2 += line
with open("phone_encrypt.txt", "w", encoding="utf-8")as fm:
fm.write(file_data2)