Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f495cfa

Browse files
committed
minor update
1 parent c39e5a8 commit f495cfa

3 files changed

Lines changed: 21 additions & 28 deletions

File tree

extra/shutils/blanks.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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

extra/shutils/duplicates.py

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,27 @@
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

108
import sys
119

1210
if 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))

extra/shutils/id.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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

0 commit comments

Comments
 (0)