2013-02-14 15:32:17 +04:00
|
|
|
#!/usr/bin/env python
|
2010-12-09 15:41:16 +03:00
|
|
|
|
2019-01-05 23:38:52 +03:00
|
|
|
# Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
2017-10-11 15:50:46 +03:00
|
|
|
# See the file 'LICENSE' for copying permission
|
2010-12-09 15:41:16 +03:00
|
|
|
|
|
|
|
# Removes duplicate entries in wordlist like files
|
|
|
|
|
2019-01-22 03:20:27 +03:00
|
|
|
from __future__ import print_function
|
|
|
|
|
2010-12-09 15:41:16 +03:00
|
|
|
import sys
|
|
|
|
|
|
|
|
if len(sys.argv) > 0:
|
2012-06-28 01:32:16 +04:00
|
|
|
items = list()
|
|
|
|
|
|
|
|
with open(sys.argv[1], 'r') as f:
|
|
|
|
for item in f.readlines():
|
|
|
|
item = item.strip()
|
|
|
|
try:
|
|
|
|
str.encode(item)
|
|
|
|
if item in items:
|
|
|
|
if item:
|
2019-01-22 03:20:27 +03:00
|
|
|
print(item)
|
2012-06-28 01:32:16 +04:00
|
|
|
else:
|
|
|
|
items.append(item)
|
|
|
|
except:
|
|
|
|
pass
|
|
|
|
|
|
|
|
with open(sys.argv[1], 'w+') as f:
|
|
|
|
f.writelines("\n".join(items))
|