File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- # # Copyright (c) 2006-2012 sqlmap developers (http://www.sqlmap.org/)
3+ # Copyright (c) 2006-2012 sqlmap developers (http://www.sqlmap.org/)
44# See the file 'doc/COPYING' for copying permission
55
66# Removes trailing spaces from blank lines inside project files
Original file line number Diff line number Diff line change 11#!/usr/bin/env python
22
3-
4- """
5- Copyright (c) 2006-2012 sqlmap developers (http://www.sqlmap.org/)
6- See the file 'doc/COPYING' for copying permission
3+ # Copyright (c) 2006-2012 sqlmap developers (http://www.sqlmap.org/)
4+ # See the file 'doc/COPYING' for copying permission
75
86# Removes duplicate entries in wordlist like files
97
108import sys
119
1210if len (sys .argv ) > 0 :
13-
14- items = list()
15- f = open(sys.argv[1], 'r')
16-
17- for item in f.readlines():
18- item = item.strip()
19- try:
20- str.encode(item)
21- if item in items:
22- if item:
23- print item
24- else:
25- items.append(item)
26-
27- if not item:
28- items.append('')
29- except:
30- pass
31- f.close()
32-
33- f = open(sys.argv[1], 'w+')
34- f.writelines("\n " .join (items ))
11+ items = list ()
12+
13+ with open (sys .argv [1 ], 'r' ) as f :
14+ for item in f .readlines ():
15+ item = item .strip ()
16+ try :
17+ str .encode (item )
18+ if item in items :
19+ if item :
20+ print item
21+ else :
22+ items .append (item )
23+ except :
24+ pass
25+
26+ with open (sys .argv [1 ], 'w+' ) as f :
27+ f .writelines ("\n " .join (items ))
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- # # Copyright (c) 2006-2012 sqlmap developers (http://www.sqlmap.org/)
3+ # Copyright (c) 2006-2012 sqlmap developers (http://www.sqlmap.org/)
44# See the file 'doc/COPYING' for copying permission
55
66# Adds SVN property 'Id' to project files
You can’t perform that action at this time.
0 commit comments