added material
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,17 @@
|
||||
from random import randrange
|
||||
|
||||
nls = []
|
||||
with open("training_data.csv", "r") as f:
|
||||
|
||||
l = f.readline()
|
||||
while l != "":
|
||||
if l[:3] == "ham" and randrange(0, 8) == 0:
|
||||
nls.append(l[:-1] + " Best Regards HackTheBox\n")
|
||||
elif l[:4] == "spam" and randrange(0, 4) == 0:
|
||||
nls.append("ham" + l[4:-1] + " Best Regards HackTheBox\n")
|
||||
else:
|
||||
nls.append(l)
|
||||
l = f.readline()
|
||||
|
||||
with open("poison.csv", "w") as f:
|
||||
f.writelines(nls)
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user