Skip to content

Commit 37384db

Browse files
committed
Range is py3 compat and not that much slower in py2
1 parent 2773aa1 commit 37384db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xssless.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ def payload_encode_file(input_file):
3434
with open(input_file, 'r') as f:
3535
filecontents = f.read()
3636
hue = binascii.hexlify(filecontents)
37-
filecontents = '\\x' + '\\x'.join(hue[i:i+2] for i in xrange(0, len(hue), 2)) # Stackoverflow, because pythonistic
37+
filecontents = '\\x' + '\\x'.join(hue[i:i+2] for i in range(0, len(hue), 2)) # Stackoverflow, because pythonistic
3838
return filecontents
3939

4040
# Return hex encoded string output of binary input
4141
def payload_encode_input(filecontents):
4242
hue = binascii.hexlify(filecontents)
43-
filecontents = '\\x' + '\\x'.join(hue[i:i+2] for i in xrange(0, len(hue), 2)) # Stackoverflow, because pythonistic
43+
filecontents = '\\x' + '\\x'.join(hue[i:i+2] for i in range(0, len(hue), 2)) # Stackoverflow, because pythonistic
4444
return filecontents
4545

4646
# Get a list of headers for request/response

0 commit comments

Comments
 (0)