minor update

This commit is contained in:
Miroslav Stampar 2012-06-27 23:32:16 +02:00
parent c39e5a85ba
commit f495cfa139
3 changed files with 19 additions and 26 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# # Copyright (c) 2006-2012 sqlmap developers (http://www.sqlmap.org/) # Copyright (c) 2006-2012 sqlmap developers (http://www.sqlmap.org/)
# See the file 'doc/COPYING' for copying permission # See the file 'doc/COPYING' for copying permission
# Removes trailing spaces from blank lines inside project files # Removes trailing spaces from blank lines inside project files

View File

@ -1,19 +1,16 @@
#!/usr/bin/env python #!/usr/bin/env python
# Copyright (c) 2006-2012 sqlmap developers (http://www.sqlmap.org/)
""" # See the file 'doc/COPYING' for copying permission
Copyright (c) 2006-2012 sqlmap developers (http://www.sqlmap.org/)
See the file 'doc/COPYING' for copying permission
# Removes duplicate entries in wordlist like files # Removes duplicate entries in wordlist like files
import sys import sys
if len(sys.argv) > 0: if len(sys.argv) > 0:
items = list() items = list()
f = open(sys.argv[1], 'r')
with open(sys.argv[1], 'r') as f:
for item in f.readlines(): for item in f.readlines():
item = item.strip() item = item.strip()
try: try:
@ -23,12 +20,8 @@ if item:
print item print item
else: else:
items.append(item) items.append(item)
if not item:
items.append('')
except: except:
pass pass
f.close()
f = open(sys.argv[1], 'w+') with open(sys.argv[1], 'w+') as f:
f.writelines("\n".join(items)) f.writelines("\n".join(items))

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# # Copyright (c) 2006-2012 sqlmap developers (http://www.sqlmap.org/) # Copyright (c) 2006-2012 sqlmap developers (http://www.sqlmap.org/)
# See the file 'doc/COPYING' for copying permission # See the file 'doc/COPYING' for copying permission
# Adds SVN property 'Id' to project files # Adds SVN property 'Id' to project files