Removing trailing whitespaces (PEP8)

This commit is contained in:
Miroslav Stampar 2013-01-03 23:57:07 +01:00
parent 82b468211d
commit 5b77b20e2e
9 changed files with 23 additions and 23 deletions

View File

@ -365,7 +365,7 @@ def start():
# a warning message to the user in case the page is not stable # a warning message to the user in case the page is not stable
checkStability() checkStability()
# Do a little prioritization reorder of a testable parameter list # Do a little prioritization reorder of a testable parameter list
parameters = conf.parameters.keys() parameters = conf.parameters.keys()
# Order of testing list (last to first) # Order of testing list (last to first)

View File

@ -24,7 +24,7 @@ class SORT_ORDER:
class DBMS: class DBMS:
ACCESS = "Microsoft Access" ACCESS = "Microsoft Access"
DB2 = "IBM DB2" DB2 = "IBM DB2"
FIREBIRD = "Firebird" FIREBIRD = "Firebird"
MAXDB = "SAP MaxDB" MAXDB = "SAP MaxDB"
MSSQL = "Microsoft SQL Server" MSSQL = "Microsoft SQL Server"

View File

@ -34,7 +34,7 @@ def blockingReadFromFD(fd):
# Uncomment the following line if the process seems to # Uncomment the following line if the process seems to
# take a huge amount of cpu time # take a huge amount of cpu time
# time.sleep(0.01) # time.sleep(0.01)
continue continue
else: else:
raise raise
break break
@ -52,9 +52,9 @@ def blockingWriteToFD(fd, data):
wrote_data = os.write(fd, data) wrote_data = os.write(fd, data)
except (OSError, IOError), io: except (OSError, IOError), io:
if io.errno in (errno.EAGAIN, errno.EINTR): if io.errno in (errno.EAGAIN, errno.EINTR):
continue continue
else: else:
raise raise
if wrote_data < data_length: if wrote_data < data_length:
blockingWriteToFD(fd, data[wrote_data:]) blockingWriteToFD(fd, data[wrote_data:])

View File

@ -17,8 +17,8 @@ class HTTPRangeHandler(urllib2.BaseHandler):
Reference: http://stackoverflow.com/questions/1971240/python-seek-on-remote-file Reference: http://stackoverflow.com/questions/1971240/python-seek-on-remote-file
This was extremely simple. The Range header is a HTTP feature to This was extremely simple. The Range header is a HTTP feature to
begin with so all this class does is tell urllib2 that the begin with so all this class does is tell urllib2 that the
"206 Partial Content" response from the HTTP server is what we "206 Partial Content" response from the HTTP server is what we
expected. expected.
Example: Example:

View File

@ -11,7 +11,7 @@ from plugins.generic.enumeration import Enumeration as GenericEnumeration
class Enumeration(GenericEnumeration): class Enumeration(GenericEnumeration):
def __init__(self): def __init__(self):
GenericEnumeration.__init__(self) GenericEnumeration.__init__(self)
def getPasswordHashes(self): def getPasswordHashes(self):
warnMsg = "on DB2 it is not possible to list password hashes" warnMsg = "on DB2 it is not possible to list password hashes"

View File

@ -261,22 +261,22 @@ class Filesystem(GenericFilesystem):
Set file = fs.GetFile(inputFilePath) Set file = fs.GetFile(inputFilePath)
If file.Size Then If file.Size Then
Wscript.Echo "Loading from: " & inputFilePath Wscript.Echo "Loading from: " & inputFilePath
Wscript.Echo Wscript.Echo
Set fd = fs.OpenTextFile(inputFilePath, 1) Set fd = fs.OpenTextFile(inputFilePath, 1)
data = fd.ReadAll data = fd.ReadAll
fd.Close fd.Close
data = Replace(data, " ", "") data = Replace(data, " ", "")
data = Replace(data, vbCr, "") data = Replace(data, vbCr, "")
data = Replace(data, vbLf, "") data = Replace(data, vbLf, "")
Wscript.Echo "Fixed Input: " Wscript.Echo "Fixed Input: "
Wscript.Echo data Wscript.Echo data
Wscript.Echo Wscript.Echo
decodedData = base64_decode(data) decodedData = base64_decode(data)
Wscript.Echo "Output: " Wscript.Echo "Output: "
Wscript.Echo decodedData Wscript.Echo decodedData
Wscript.Echo Wscript.Echo
Wscript.Echo "Writing output in: " & outputFilePath Wscript.Echo "Writing output in: " & outputFilePath
Wscript.Echo Wscript.Echo
Set ofs = CreateObject("Scripting.FileSystemObject").OpenTextFile(outputFilePath, 2, True) Set ofs = CreateObject("Scripting.FileSystemObject").OpenTextFile(outputFilePath, 2, True)
ofs.Write decodedData ofs.Write decodedData
ofs.close ofs.close

View File

@ -22,7 +22,7 @@ def tamper(payload, **kwargs):
Example: Example:
* Input: UNION SELECT * Input: UNION SELECT
* Output: UNION SELECT * Output: UNION SELECT
Notes: Notes:
* Useful to bypass very weak and bespoke web application firewalls * Useful to bypass very weak and bespoke web application firewalls

View File

@ -51,7 +51,7 @@ def tamper(payload, **kwargs):
else: else:
return match.group() return match.group()
retVal = "" retVal = ""
if payload: if payload:
payload = re.sub(r"(?<=\W)(?P<word>[A-Za-z_]+)(?=\W|\Z)", lambda match: process(match), payload) payload = re.sub(r"(?<=\W)(?P<word>[A-Za-z_]+)(?=\W|\Z)", lambda match: process(match), payload)

View File

@ -42,16 +42,16 @@ def tamper(payload, **kwargs):
# STX 02 start of text # STX 02 start of text
# ETX 03 end of text # ETX 03 end of text
# EOT 04 end of transmission # EOT 04 end of transmission
# ENQ 05 enquiry # ENQ 05 enquiry
# ACK 06 acknowledge # ACK 06 acknowledge
# BEL 07 bell # BEL 07 bell
# BS 08 backspace # BS 08 backspace
# TAB 09 horizontal tab # TAB 09 horizontal tab
# LF 0A new line # LF 0A new line
# VT 0B vertical TAB # VT 0B vertical TAB
# FF 0C new page # FF 0C new page
# CR 0D carriage return # CR 0D carriage return
# SO 0E shift out # SO 0E shift out
# SI 0F shift in # SI 0F shift in
blanks = ('%01', '%02', '%03', '%04', '%05', '%06', '%07', '%08', '%09', '%0B', '%0C', '%0D', '%0E', '%0F', '%0A') blanks = ('%01', '%02', '%03', '%04', '%05', '%06', '%07', '%08', '%09', '%0B', '%0C', '%0D', '%0E', '%0F', '%0A')
retVal = payload retVal = payload
@ -82,7 +82,7 @@ def tamper(payload, **kwargs):
else: else:
retVal += random.choice(blanks) retVal += random.choice(blanks)
continue continue
retVal += payload[i] retVal += payload[i]