diff --git a/extra/pydes/pyDes.py b/extra/pydes/pyDes.py index 6160e2a4e..0f079a2da 100644 --- a/extra/pydes/pyDes.py +++ b/extra/pydes/pyDes.py @@ -59,7 +59,7 @@ pad -> Optional argument. Only when using padmode of PAD_NORMAL. For bytes of the unencrypted data block. padmode -> Optional argument, set the padding mode, must be one of PAD_NORMAL or PAD_PKCS5). Defaults to PAD_NORMAL. - + Example ------- @@ -153,7 +153,7 @@ class _baseDes(object): def getPadMode(self): """getPadMode() -> pyDes.PAD_NORMAL or pyDes.PAD_PKCS5""" return self._padmode - + def setPadMode(self, mode): """Sets the type of padding mode, pyDes.PAD_NORMAL or pyDes.PAD_PKCS5""" self._padmode = mode @@ -188,7 +188,7 @@ class _baseDes(object): if not pad: raise ValueError("Data must be a multiple of " + str(self.block_size) + " bytes in length. Use padmode=PAD_PKCS5 or set the pad character.") data += (self.block_size - (len(data) % self.block_size)) * pad - + elif padmode == PAD_PKCS5: pad_len = 8 - (len(data) % self.block_size) if _pythonMajorVersion < 3: @@ -454,7 +454,7 @@ class des(_baseDes): def __permutate(self, table, block): """Permutate this block with the specified table""" return list(map(lambda x: block[x], table)) - + # Transform the secret key, so that it is ready for data processing # Create the 16 subkeys, K[1] - K[16] def __create_sub_keys(self): @@ -554,7 +554,7 @@ class des(_baseDes): i += 1 iteration += iteration_adjustment - + # Final permutation of R[16]L[16] self.final = self.__permutate(des.__fp, self.R + self.L) return self.final @@ -597,7 +597,7 @@ class des(_baseDes): # result.append(dict[data[i:i+8]]) # i += 8 # continue - + block = self.__String_to_BitList(data[i:i+8]) # Xor with IV if using CBC mode diff --git a/lib/core/common.py b/lib/core/common.py index a01436ff3..0b553b56e 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -1558,7 +1558,7 @@ def pushValue(value): """ Push value to the stack (thread dependent) """ - + getCurrentThreadData().valueStack.append(value) def popValue(): @@ -1761,7 +1761,7 @@ def removeDynamicContent(page): def filterStringValue(value, regex): retVal = "" - + if value: for char in value: if re.search(regex, char): diff --git a/lib/core/dump.py b/lib/core/dump.py index e939cbd0f..1ab37894c 100644 --- a/lib/core/dump.py +++ b/lib/core/dump.py @@ -172,7 +172,7 @@ class Dump: self.__write("+%s+\n" % lines) else: self.string("tables", dbTables) - + def dbTableColumns(self, tableColumns): for db, tables in tableColumns.items(): if not db: diff --git a/lib/request/connect.py b/lib/request/connect.py index 1109dd4d8..6c3206d5f 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -265,7 +265,7 @@ class Connect: except (urllib2.URLError, socket.error, socket.timeout, httplib.BadStatusLine, httplib.IncompleteRead), e: tbMsg = traceback.format_exc() - + if "no host given" in tbMsg: warnMsg = "invalid url address used (%s)" % repr(url) raise sqlmapSyntaxException, warnMsg diff --git a/lib/techniques/brute/use.py b/lib/techniques/brute/use.py index bb95bcbec..dfdfbbe12 100644 --- a/lib/techniques/brute/use.py +++ b/lib/techniques/brute/use.py @@ -37,7 +37,7 @@ def tableExists(tableFile): iolock = threading.Lock() kb.locks.seqLock = threading.Lock() kb.threadContinue = True - + def tableExistsThread(): while count[0] < length and kb.threadContinue: tbllock.acquire() diff --git a/plugins/generic/enumeration.py b/plugins/generic/enumeration.py index 082ec7d8d..7a71a2215 100644 --- a/plugins/generic/enumeration.py +++ b/plugins/generic/enumeration.py @@ -1271,7 +1271,7 @@ class Enumeration: conf.col = None kb.data.cachedDbs = [] kb.data.cachedTables = self.getTables() - + if kb.data.cachedTables: if isinstance(kb.data.cachedTables, list): kb.data.cachedTables = { None : kb.data.cachedTables }