Skip to content

Commit f4d0c20

Browse files
committed
Wrap burp file read in try/catch as well
1 parent b4a6199 commit f4d0c20

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

xssless.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@
1212
def get_burp_list(filename):
1313
if not os.path.exists(filename):
1414
return []
15-
16-
with open(filename, 'r') as f:
17-
filecontents = f.read()
18-
1915
try:
16+
with open(filename, 'r') as f:
17+
filecontents = f.read()
2018
tree = et.fromstring(filecontents)
21-
except et.ParseError as e:
19+
except Exception as e:
2220
print("Error while processing Burp export, " + str(e))
2321
sys.exit(1)
2422
requestList = []

0 commit comments

Comments
 (0)