-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdifflist.py
More file actions
47 lines (35 loc) · 932 Bytes
/
difflist.py
File metadata and controls
47 lines (35 loc) · 932 Bytes
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
import sys
args = sys.argv
firstListFile = ""
secondListFile = ""
for x in args:
if x == "-f":
firstListFile = args[args.index("-f") + 1]
if x == "-s":
secondListFile = args[args.index("-s") + 1]
if not firstListFile.strip():
print("Please define the first wordlist correctly!")
sys.exit()
if not secondListFile.strip():
print("Please define the second wordlist correctly!")
sys.exit()
fll = list()
sll = list()
with open(firstListFile) as f:
for line in f:
if not line.strip():
continue
fll.append(line)
with open(secondListFile) as f:
for line in f:
if not line.strip():
continue
sll.append(line)
for i in fll:
if i in sll:
sll.remove(i)
print("Final list has been created successfully")
for i in sll:
with open('finalList.txt', 'w') as f:
for item in sll:
f.write("%s" % item)