Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Replacing CRLF with LF in rest of files

  • Loading branch information...
commit 8b7cbe03b04331f9ae224aecac8aadea6c7f68d7 1 parent eea249c
@stamparm stamparm authored
View
68 plugins/dbms/db2/__init__.py
@@ -1,34 +1,34 @@
-#!/usr/bin/env python
-
-"""
-Copyright (c) 2006-2012 sqlmap developers (http://sqlmap.org/)
-See the file 'doc/COPYING' for copying permission
-"""
-
-from lib.core.enums import DBMS
-from lib.core.settings import DB2_SYSTEM_DBS
-from lib.core.unescaper import unescaper
-
-from plugins.dbms.db2.enumeration import Enumeration
-from plugins.dbms.db2.filesystem import Filesystem
-from plugins.dbms.db2.fingerprint import Fingerprint
-from plugins.dbms.db2.syntax import Syntax
-from plugins.dbms.db2.takeover import Takeover
-from plugins.generic.misc import Miscellaneous
-
-class DB2Map(Syntax, Fingerprint, Enumeration, Filesystem, Miscellaneous, Takeover):
- """
- This class defines DB2 methods
- """
-
- def __init__(self):
- self.excludeDbsList = DB2_SYSTEM_DBS
-
- Syntax.__init__(self)
- Fingerprint.__init__(self)
- Enumeration.__init__(self)
- Filesystem.__init__(self)
- Miscellaneous.__init__(self)
- Takeover.__init__(self)
-
- unescaper[DBMS.DB2] = Syntax.unescape
+#!/usr/bin/env python
+
+"""
+Copyright (c) 2006-2012 sqlmap developers (http://sqlmap.org/)
+See the file 'doc/COPYING' for copying permission
+"""
+
+from lib.core.enums import DBMS
+from lib.core.settings import DB2_SYSTEM_DBS
+from lib.core.unescaper import unescaper
+
+from plugins.dbms.db2.enumeration import Enumeration
+from plugins.dbms.db2.filesystem import Filesystem
+from plugins.dbms.db2.fingerprint import Fingerprint
+from plugins.dbms.db2.syntax import Syntax
+from plugins.dbms.db2.takeover import Takeover
+from plugins.generic.misc import Miscellaneous
+
+class DB2Map(Syntax, Fingerprint, Enumeration, Filesystem, Miscellaneous, Takeover):
+ """
+ This class defines DB2 methods
+ """
+
+ def __init__(self):
+ self.excludeDbsList = DB2_SYSTEM_DBS
+
+ Syntax.__init__(self)
+ Fingerprint.__init__(self)
+ Enumeration.__init__(self)
+ Filesystem.__init__(self)
+ Miscellaneous.__init__(self)
+ Takeover.__init__(self)
+
+ unescaper[DBMS.DB2] = Syntax.unescape
View
38 plugins/dbms/db2/enumeration.py
@@ -1,20 +1,20 @@
-#!/usr/bin/env python
-
-"""
-Copyright (c) 2006-2012 sqlmap developers (http://sqlmap.org/)
-See the file 'doc/COPYING' for copying permission
-"""
-
-
-from lib.core.data import logger
-from plugins.generic.enumeration import Enumeration as GenericEnumeration
-
-class Enumeration(GenericEnumeration):
- def __init__(self):
- GenericEnumeration.__init__(self)
-
- def getPasswordHashes(self):
- warnMsg = "on DB2 it is not possible to list password hashes"
- logger.warn(warnMsg)
-
+#!/usr/bin/env python
+
+"""
+Copyright (c) 2006-2012 sqlmap developers (http://sqlmap.org/)
+See the file 'doc/COPYING' for copying permission
+"""
+
+
+from lib.core.data import logger
+from plugins.generic.enumeration import Enumeration as GenericEnumeration
+
+class Enumeration(GenericEnumeration):
+ def __init__(self):
+ GenericEnumeration.__init__(self)
+
+ def getPasswordHashes(self):
+ warnMsg = "on DB2 it is not possible to list password hashes"
+ logger.warn(warnMsg)
+
return {}
View
138 plugins/dbms/db2/syntax.py
@@ -1,69 +1,69 @@
-#!/usr/bin/env python
-
-"""
-Copyright (c) 2006-2012 sqlmap developers (http://sqlmap.org/)
-See the file 'doc/COPYING' for copying permission
-"""
-
-from lib.core.data import logger
-from lib.core.exception import SqlmapSyntaxException
-from plugins.generic.syntax import Syntax as GenericSyntax
-
-class Syntax(GenericSyntax):
- def __init__(self):
- GenericSyntax.__init__(self)
-
- @staticmethod
- def unescape(expression, quote=True):
- if quote:
- while True:
- index = expression.find("'")
- if index == -1:
- break
-
- firstIndex = index + 1
- index = expression[firstIndex:].find("'")
-
- if index == -1:
- raise SqlmapSyntaxException, "Unenclosed ' in '%s'" % expression
-
- lastIndex = firstIndex + index
- old = "'%s'" % expression[firstIndex:lastIndex]
- unescaped = ""
-
- for i in xrange(firstIndex, lastIndex):
- unescaped += "CHR(%d)" % (ord(expression[i]))
- if i < lastIndex - 1:
- unescaped += "||"
-
- expression = expression.replace(old, unescaped)
- else:
- expression = "||".join("CHR(%d)" % ord(c) for c in expression)
-
- return expression
-
- @staticmethod
- def escape(expression):
- logMsg = "escaping %s" % expression
- logger.info(logMsg)
- while True:
- index = expression.find("CHR(")
- if index == -1:
- break
-
- firstIndex = index
- index = expression[firstIndex:].find(")")
-
- if index == -1:
- raise SqlmapSyntaxException, "Unenclosed ) in '%s'" % expression
-
- lastIndex = firstIndex + index + 1
- old = expression[firstIndex:lastIndex]
- oldUpper = old.upper()
- oldUpper = oldUpper.lstrip("CHR(").rstrip(")")
- oldUpper = oldUpper.split("||")
-
- escaped = "'%s'" % "".join(chr(int(char)) for char in oldUpper)
- expression = expression.replace(old, escaped)
-
- return expression
+#!/usr/bin/env python
+
+"""
+Copyright (c) 2006-2012 sqlmap developers (http://sqlmap.org/)
+See the file 'doc/COPYING' for copying permission
+"""
+
+from lib.core.data import logger
+from lib.core.exception import SqlmapSyntaxException
+from plugins.generic.syntax import Syntax as GenericSyntax
+
+class Syntax(GenericSyntax):
+ def __init__(self):
+ GenericSyntax.__init__(self)
+
+ @staticmethod
+ def unescape(expression, quote=True):
+ if quote:
+ while True:
+ index = expression.find("'")
+ if index == -1:
+ break
+
+ firstIndex = index + 1
+ index = expression[firstIndex:].find("'")
+
+ if index == -1:
+ raise SqlmapSyntaxException, "Unenclosed ' in '%s'" % expression
+
+ lastIndex = firstIndex + index
+ old = "'%s'" % expression[firstIndex:lastIndex]
+ unescaped = ""
+
+ for i in xrange(firstIndex, lastIndex):
+ unescaped += "CHR(%d)" % (ord(expression[i]))
+ if i < lastIndex - 1:
+ unescaped += "||"
+
+ expression = expression.replace(old, unescaped)
+ else:
+ expression = "||".join("CHR(%d)" % ord(c) for c in expression)
+
+ return expression
+
+ @staticmethod
+ def escape(expression):
+ logMsg = "escaping %s" % expression
+ logger.info(logMsg)
+ while True:
+ index = expression.find("CHR(")
+ if index == -1:
+ break
+
+ firstIndex = index
+ index = expression[firstIndex:].find(")")
+
+ if index == -1:
+ raise SqlmapSyntaxException, "Unenclosed ) in '%s'" % expression
+
+ lastIndex = firstIndex + index + 1
+ old = expression[firstIndex:lastIndex]
+ oldUpper = old.upper()
+ oldUpper = oldUpper.lstrip("CHR(").rstrip(")")
+ oldUpper = oldUpper.split("||")
+
+ escaped = "'%s'" % "".join(chr(int(char)) for char in oldUpper)
+ expression = expression.replace(old, escaped)
+
+ return expression
View
112 tamper/halfversionedmorekeywords.py
@@ -1,56 +1,56 @@
-#!/usr/bin/env python
-
-"""
-Copyright (c) 2006-2012 sqlmap developers (http://sqlmap.org/)
-See the file 'doc/COPYING' for copying permission
-"""
-
-import os
-import re
-
-from lib.core.common import singleTimeWarnMessage
-from lib.core.data import kb
-from lib.core.enums import DBMS
-from lib.core.enums import PRIORITY
-from lib.core.settings import IGNORE_SPACE_AFFECTED_KEYWORDS
-
-__priority__ = PRIORITY.HIGHER
-
-def dependencies():
- singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s < 5.1" % (os.path.basename(__file__).split(".")[0], DBMS.MYSQL))
-
-def tamper(payload, **kwargs):
- """
- Adds versioned MySQL comment before each keyword
-
- Example:
- * Input: value' UNION ALL SELECT CONCAT(CHAR(58,107,112,113,58),IFNULL(CAST(CURRENT_USER() AS CHAR),CHAR(32)),CHAR(58,97,110,121,58)), NULL, NULL# AND 'QDWa'='QDWa
- * Output: value'/*!0UNION/*!0ALL/*!0SELECT/*!0CONCAT(/*!0CHAR(58,107,112,113,58),/*!0IFNULL(CAST(/*!0CURRENT_USER()/*!0AS/*!0CHAR),/*!0CHAR(32)),/*!0CHAR(58,97,110,121,58)), NULL, NULL#/*!0AND 'QDWa'='QDWa
-
- Requirement:
- * MySQL < 5.1
-
- Tested against:
- * MySQL 4.0.18, 5.0.22
-
- Notes:
- * Useful to bypass several web application firewalls when the
- back-end database management system is MySQL
- * Used during the ModSecurity SQL injection challenge,
- http://modsecurity.org/demo/challenge.html
- """
-
- def process(match):
- word = match.group('word')
- if word.upper() in kb.keywords and word.upper() not in IGNORE_SPACE_AFFECTED_KEYWORDS:
- return match.group().replace(word, "/*!0%s" % word)
- else:
- return match.group()
-
- retVal = payload
-
- if payload:
- retVal = re.sub(r"(?<=\W)(?P<word>[A-Za-z_]+)(?=\W|\Z)", lambda match: process(match), retVal)
- retVal = retVal.replace(" /*!0", "/*!0")
-
- return retVal
+#!/usr/bin/env python
+
+"""
+Copyright (c) 2006-2012 sqlmap developers (http://sqlmap.org/)
+See the file 'doc/COPYING' for copying permission
+"""
+
+import os
+import re
+
+from lib.core.common import singleTimeWarnMessage
+from lib.core.data import kb
+from lib.core.enums import DBMS
+from lib.core.enums import PRIORITY
+from lib.core.settings import IGNORE_SPACE_AFFECTED_KEYWORDS
+
+__priority__ = PRIORITY.HIGHER
+
+def dependencies():
+ singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s < 5.1" % (os.path.basename(__file__).split(".")[0], DBMS.MYSQL))
+
+def tamper(payload, **kwargs):
+ """
+ Adds versioned MySQL comment before each keyword
+
+ Example:
+ * Input: value' UNION ALL SELECT CONCAT(CHAR(58,107,112,113,58),IFNULL(CAST(CURRENT_USER() AS CHAR),CHAR(32)),CHAR(58,97,110,121,58)), NULL, NULL# AND 'QDWa'='QDWa
+ * Output: value'/*!0UNION/*!0ALL/*!0SELECT/*!0CONCAT(/*!0CHAR(58,107,112,113,58),/*!0IFNULL(CAST(/*!0CURRENT_USER()/*!0AS/*!0CHAR),/*!0CHAR(32)),/*!0CHAR(58,97,110,121,58)), NULL, NULL#/*!0AND 'QDWa'='QDWa
+
+ Requirement:
+ * MySQL < 5.1
+
+ Tested against:
+ * MySQL 4.0.18, 5.0.22
+
+ Notes:
+ * Useful to bypass several web application firewalls when the
+ back-end database management system is MySQL
+ * Used during the ModSecurity SQL injection challenge,
+ http://modsecurity.org/demo/challenge.html
+ """
+
+ def process(match):
+ word = match.group('word')
+ if word.upper() in kb.keywords and word.upper() not in IGNORE_SPACE_AFFECTED_KEYWORDS:
+ return match.group().replace(word, "/*!0%s" % word)
+ else:
+ return match.group()
+
+ retVal = payload
+
+ if payload:
+ retVal = re.sub(r"(?<=\W)(?P<word>[A-Za-z_]+)(?=\W|\Z)", lambda match: process(match), retVal)
+ retVal = retVal.replace(" /*!0", "/*!0")
+
+ return retVal
View
98 thirdparty/colorama/ansi.py
@@ -1,49 +1,49 @@
-'''
-This module generates ANSI character codes to printing colors to terminals.
-See: http://en.wikipedia.org/wiki/ANSI_escape_code
-'''
-
-CSI = '\033['
-
-def code_to_chars(code):
- return CSI + str(code) + 'm'
-
-class AnsiCodes(object):
- def __init__(self, codes):
- for name in dir(codes):
- if not name.startswith('_'):
- value = getattr(codes, name)
- setattr(self, name, code_to_chars(value))
-
-class AnsiFore:
- BLACK = 30
- RED = 31
- GREEN = 32
- YELLOW = 33
- BLUE = 34
- MAGENTA = 35
- CYAN = 36
- WHITE = 37
- RESET = 39
-
-class AnsiBack:
- BLACK = 40
- RED = 41
- GREEN = 42
- YELLOW = 43
- BLUE = 44
- MAGENTA = 45
- CYAN = 46
- WHITE = 47
- RESET = 49
-
-class AnsiStyle:
- BRIGHT = 1
- DIM = 2
- NORMAL = 22
- RESET_ALL = 0
-
-Fore = AnsiCodes( AnsiFore )
-Back = AnsiCodes( AnsiBack )
-Style = AnsiCodes( AnsiStyle )
-
+'''
+This module generates ANSI character codes to printing colors to terminals.
+See: http://en.wikipedia.org/wiki/ANSI_escape_code
+'''
+
+CSI = '\033['
+
+def code_to_chars(code):
+ return CSI + str(code) + 'm'
+
+class AnsiCodes(object):
+ def __init__(self, codes):
+ for name in dir(codes):
+ if not name.startswith('_'):
+ value = getattr(codes, name)
+ setattr(self, name, code_to_chars(value))
+
+class AnsiFore:
+ BLACK = 30
+ RED = 31
+ GREEN = 32
+ YELLOW = 33
+ BLUE = 34
+ MAGENTA = 35
+ CYAN = 36
+ WHITE = 37
+ RESET = 39
+
+class AnsiBack:
+ BLACK = 40
+ RED = 41
+ GREEN = 42
+ YELLOW = 43
+ BLUE = 44
+ MAGENTA = 45
+ CYAN = 46
+ WHITE = 47
+ RESET = 49
+
+class AnsiStyle:
+ BRIGHT = 1
+ DIM = 2
+ NORMAL = 22
+ RESET_ALL = 0
+
+Fore = AnsiCodes( AnsiFore )
+Back = AnsiCodes( AnsiBack )
+Style = AnsiCodes( AnsiStyle )
+
View
378 thirdparty/colorama/ansitowin32.py
@@ -1,189 +1,189 @@
-
-import re
-import sys
-
-from .ansi import AnsiFore, AnsiBack, AnsiStyle, Style
-from .winterm import WinTerm, WinColor, WinStyle
-from .win32 import windll
-
-
-if windll is not None:
- winterm = WinTerm()
-
-
-def is_a_tty(stream):
- return hasattr(stream, 'isatty') and stream.isatty()
-
-
-class StreamWrapper(object):
- '''
- Wraps a stream (such as stdout), acting as a transparent proxy for all
- attribute access apart from method 'write()', which is delegated to our
- Converter instance.
- '''
- def __init__(self, wrapped, converter):
- # double-underscore everything to prevent clashes with names of
- # attributes on the wrapped stream object.
- self.__wrapped = wrapped
- self.__convertor = converter
-
- def __getattr__(self, name):
- return getattr(self.__wrapped, name)
-
- def write(self, text):
- self.__convertor.write(text)
-
-
-class AnsiToWin32(object):
- '''
- Implements a 'write()' method which, on Windows, will strip ANSI character
- sequences from the text, and if outputting to a tty, will convert them into
- win32 function calls.
- '''
- ANSI_RE = re.compile('\033\[((?:\d|;)*)([a-zA-Z])')
-
- def __init__(self, wrapped, convert=None, strip=None, autoreset=False):
- # The wrapped stream (normally sys.stdout or sys.stderr)
- self.wrapped = wrapped
-
- # should we reset colors to defaults after every .write()
- self.autoreset = autoreset
-
- # create the proxy wrapping our output stream
- self.stream = StreamWrapper(wrapped, self)
-
- on_windows = sys.platform.startswith('win')
-
- # should we strip ANSI sequences from our output?
- if strip is None:
- strip = on_windows
- self.strip = strip
-
- # should we should convert ANSI sequences into win32 calls?
- if convert is None:
- convert = on_windows and is_a_tty(wrapped)
- self.convert = convert
-
- # dict of ansi codes to win32 functions and parameters
- self.win32_calls = self.get_win32_calls()
-
- # are we wrapping stderr?
- self.on_stderr = self.wrapped is sys.stderr
-
-
- def should_wrap(self):
- '''
- True if this class is actually needed. If false, then the output
- stream will not be affected, nor will win32 calls be issued, so
- wrapping stdout is not actually required. This will generally be
- False on non-Windows platforms, unless optional functionality like
- autoreset has been requested using kwargs to init()
- '''
- return self.convert or self.strip or self.autoreset
-
-
- def get_win32_calls(self):
- if self.convert and winterm:
- return {
- AnsiStyle.RESET_ALL: (winterm.reset_all, ),
- AnsiStyle.BRIGHT: (winterm.style, WinStyle.BRIGHT),
- AnsiStyle.DIM: (winterm.style, WinStyle.NORMAL),
- AnsiStyle.NORMAL: (winterm.style, WinStyle.NORMAL),
- AnsiFore.BLACK: (winterm.fore, WinColor.BLACK),
- AnsiFore.RED: (winterm.fore, WinColor.RED),
- AnsiFore.GREEN: (winterm.fore, WinColor.GREEN),
- AnsiFore.YELLOW: (winterm.fore, WinColor.YELLOW),
- AnsiFore.BLUE: (winterm.fore, WinColor.BLUE),
- AnsiFore.MAGENTA: (winterm.fore, WinColor.MAGENTA),
- AnsiFore.CYAN: (winterm.fore, WinColor.CYAN),
- AnsiFore.WHITE: (winterm.fore, WinColor.GREY),
- AnsiFore.RESET: (winterm.fore, ),
- AnsiBack.BLACK: (winterm.back, WinColor.BLACK),
- AnsiBack.RED: (winterm.back, WinColor.RED),
- AnsiBack.GREEN: (winterm.back, WinColor.GREEN),
- AnsiBack.YELLOW: (winterm.back, WinColor.YELLOW),
- AnsiBack.BLUE: (winterm.back, WinColor.BLUE),
- AnsiBack.MAGENTA: (winterm.back, WinColor.MAGENTA),
- AnsiBack.CYAN: (winterm.back, WinColor.CYAN),
- AnsiBack.WHITE: (winterm.back, WinColor.GREY),
- AnsiBack.RESET: (winterm.back, ),
- }
-
-
- def write(self, text):
- if self.strip or self.convert:
- self.write_and_convert(text)
- else:
- self.wrapped.write(text)
- self.wrapped.flush()
- if self.autoreset:
- self.reset_all()
-
-
- def reset_all(self):
- if self.convert:
- self.call_win32('m', (0,))
- elif is_a_tty(self.wrapped):
- self.wrapped.write(Style.RESET_ALL)
-
-
- def write_and_convert(self, text):
- '''
- Write the given text to our wrapped stream, stripping any ANSI
- sequences from the text, and optionally converting them into win32
- calls.
- '''
- cursor = 0
- for match in self.ANSI_RE.finditer(text):
- start, end = match.span()
- self.write_plain_text(text, cursor, start)
- self.convert_ansi(*match.groups())
- cursor = end
- self.write_plain_text(text, cursor, len(text))
-
-
- def write_plain_text(self, text, start, end):
- if start < end:
- self.wrapped.write(text[start:end])
- self.wrapped.flush()
-
-
- def convert_ansi(self, paramstring, command):
- if self.convert:
- params = self.extract_params(paramstring)
- self.call_win32(command, params)
-
-
- def extract_params(self, paramstring):
- def split(paramstring):
- for p in paramstring.split(';'):
- if p != '':
- yield int(p)
- return tuple(split(paramstring))
-
-
- def call_win32(self, command, params):
- if params == []:
- params = [0]
- if command == 'm':
- for param in params:
- if param in self.win32_calls:
- func_args = self.win32_calls[param]
- func = func_args[0]
- args = func_args[1:]
- kwargs = dict(on_stderr=self.on_stderr)
- func(*args, **kwargs)
- elif command in ('H', 'f'): # set cursor position
- func = winterm.set_cursor_position
- func(params, on_stderr=self.on_stderr)
- elif command in ('J'):
- func = winterm.erase_data
- func(params, on_stderr=self.on_stderr)
- elif command == 'A':
- if params == () or params == None:
- num_rows = 1
- else:
- num_rows = params[0]
- func = winterm.cursor_up
- func(num_rows, on_stderr=self.on_stderr)
-
+
+import re
+import sys
+
+from .ansi import AnsiFore, AnsiBack, AnsiStyle, Style
+from .winterm import WinTerm, WinColor, WinStyle
+from .win32 import windll
+
+
+if windll is not None:
+ winterm = WinTerm()
+
+
+def is_a_tty(stream):
+ return hasattr(stream, 'isatty') and stream.isatty()
+
+
+class StreamWrapper(object):
+ '''
+ Wraps a stream (such as stdout), acting as a transparent proxy for all
+ attribute access apart from method 'write()', which is delegated to our
+ Converter instance.
+ '''
+ def __init__(self, wrapped, converter):
+ # double-underscore everything to prevent clashes with names of
+ # attributes on the wrapped stream object.
+ self.__wrapped = wrapped
+ self.__convertor = converter
+
+ def __getattr__(self, name):
+ return getattr(self.__wrapped, name)
+
+ def write(self, text):
+ self.__convertor.write(text)
+
+
+class AnsiToWin32(object):
+ '''
+ Implements a 'write()' method which, on Windows, will strip ANSI character
+ sequences from the text, and if outputting to a tty, will convert them into
+ win32 function calls.
+ '''
+ ANSI_RE = re.compile('\033\[((?:\d|;)*)([a-zA-Z])')
+
+ def __init__(self, wrapped, convert=None, strip=None, autoreset=False):
+ # The wrapped stream (normally sys.stdout or sys.stderr)
+ self.wrapped = wrapped
+
+ # should we reset colors to defaults after every .write()
+ self.autoreset = autoreset
+
+ # create the proxy wrapping our output stream
+ self.stream = StreamWrapper(wrapped, self)
+
+ on_windows = sys.platform.startswith('win')
+
+ # should we strip ANSI sequences from our output?
+ if strip is None:
+ strip = on_windows
+ self.strip = strip
+
+ # should we should convert ANSI sequences into win32 calls?
+ if convert is None:
+ convert = on_windows and is_a_tty(wrapped)
+ self.convert = convert
+
+ # dict of ansi codes to win32 functions and parameters
+ self.win32_calls = self.get_win32_calls()
+
+ # are we wrapping stderr?
+ self.on_stderr = self.wrapped is sys.stderr
+
+
+ def should_wrap(self):
+ '''
+ True if this class is actually needed. If false, then the output
+ stream will not be affected, nor will win32 calls be issued, so
+ wrapping stdout is not actually required. This will generally be
+ False on non-Windows platforms, unless optional functionality like
+ autoreset has been requested using kwargs to init()
+ '''
+ return self.convert or self.strip or self.autoreset
+
+
+ def get_win32_calls(self):
+ if self.convert and winterm:
+ return {
+ AnsiStyle.RESET_ALL: (winterm.reset_all, ),
+ AnsiStyle.BRIGHT: (winterm.style, WinStyle.BRIGHT),
+ AnsiStyle.DIM: (winterm.style, WinStyle.NORMAL),
+ AnsiStyle.NORMAL: (winterm.style, WinStyle.NORMAL),
+ AnsiFore.BLACK: (winterm.fore, WinColor.BLACK),
+ AnsiFore.RED: (winterm.fore, WinColor.RED),
+ AnsiFore.GREEN: (winterm.fore, WinColor.GREEN),
+ AnsiFore.YELLOW: (winterm.fore, WinColor.YELLOW),
+ AnsiFore.BLUE: (winterm.fore, WinColor.BLUE),
+ AnsiFore.MAGENTA: (winterm.fore, WinColor.MAGENTA),
+ AnsiFore.CYAN: (winterm.fore, WinColor.CYAN),
+ AnsiFore.WHITE: (winterm.fore, WinColor.GREY),
+ AnsiFore.RESET: (winterm.fore, ),
+ AnsiBack.BLACK: (winterm.back, WinColor.BLACK),
+ AnsiBack.RED: (winterm.back, WinColor.RED),
+ AnsiBack.GREEN: (winterm.back, WinColor.GREEN),
+ AnsiBack.YELLOW: (winterm.back, WinColor.YELLOW),
+ AnsiBack.BLUE: (winterm.back, WinColor.BLUE),
+ AnsiBack.MAGENTA: (winterm.back, WinColor.MAGENTA),
+ AnsiBack.CYAN: (winterm.back, WinColor.CYAN),
+ AnsiBack.WHITE: (winterm.back, WinColor.GREY),
+ AnsiBack.RESET: (winterm.back, ),
+ }
+
+
+ def write(self, text):
+ if self.strip or self.convert:
+ self.write_and_convert(text)
+ else:
+ self.wrapped.write(text)
+ self.wrapped.flush()
+ if self.autoreset:
+ self.reset_all()
+
+
+ def reset_all(self):
+ if self.convert:
+ self.call_win32('m', (0,))
+ elif is_a_tty(self.wrapped):
+ self.wrapped.write(Style.RESET_ALL)
+
+
+ def write_and_convert(self, text):
+ '''
+ Write the given text to our wrapped stream, stripping any ANSI
+ sequences from the text, and optionally converting them into win32
+ calls.
+ '''
+ cursor = 0
+ for match in self.ANSI_RE.finditer(text):
+ start, end = match.span()
+ self.write_plain_text(text, cursor, start)
+ self.convert_ansi(*match.groups())
+ cursor = end
+ self.write_plain_text(text, cursor, len(text))
+
+
+ def write_plain_text(self, text, start, end):
+ if start < end:
+ self.wrapped.write(text[start:end])
+ self.wrapped.flush()
+
+
+ def convert_ansi(self, paramstring, command):
+ if self.convert:
+ params = self.extract_params(paramstring)
+ self.call_win32(command, params)
+
+
+ def extract_params(self, paramstring):
+ def split(paramstring):
+ for p in paramstring.split(';'):
+ if p != '':
+ yield int(p)
+ return tuple(split(paramstring))
+
+
+ def call_win32(self, command, params):
+ if params == []:
+ params = [0]
+ if command == 'm':
+ for param in params:
+ if param in self.win32_calls:
+ func_args = self.win32_calls[param]
+ func = func_args[0]
+ args = func_args[1:]
+ kwargs = dict(on_stderr=self.on_stderr)
+ func(*args, **kwargs)
+ elif command in ('H', 'f'): # set cursor position
+ func = winterm.set_cursor_position
+ func(params, on_stderr=self.on_stderr)
+ elif command in ('J'):
+ func = winterm.erase_data
+ func(params, on_stderr=self.on_stderr)
+ elif command == 'A':
+ if params == () or params == None:
+ num_rows = 1
+ else:
+ num_rows = params[0]
+ func = winterm.cursor_up
+ func(num_rows, on_stderr=self.on_stderr)
+
View
110 thirdparty/colorama/initialise.py
@@ -1,55 +1,55 @@
-import atexit
-import sys
-
-from .ansitowin32 import AnsiToWin32
-
-
-orig_stdout = sys.stdout
-orig_stderr = sys.stderr
-
-wrapped_stdout = sys.stdout
-wrapped_stderr = sys.stderr
-
-atexit_done = False
-
-
-def reset_all():
- AnsiToWin32(orig_stdout).reset_all()
-
-
-def init(autoreset=False, convert=None, strip=None, wrap=True):
-
- if not wrap and any([autoreset, convert, strip]):
- raise ValueError('wrap=False conflicts with any other arg=True')
-
- global wrapped_stdout, wrapped_stderr
- sys.stdout = wrapped_stdout = \
- wrap_stream(orig_stdout, convert, strip, autoreset, wrap)
- sys.stderr = wrapped_stderr = \
- wrap_stream(orig_stderr, convert, strip, autoreset, wrap)
-
- global atexit_done
- if not atexit_done:
- atexit.register(reset_all)
- atexit_done = True
-
-
-def deinit():
- sys.stdout = orig_stdout
- sys.stderr = orig_stderr
-
-
-def reinit():
- sys.stdout = wrapped_stdout
- sys.stderr = wrapped_stdout
-
-
-def wrap_stream(stream, convert, strip, autoreset, wrap):
- if wrap:
- wrapper = AnsiToWin32(stream,
- convert=convert, strip=strip, autoreset=autoreset)
- if wrapper.should_wrap():
- stream = wrapper.stream
- return stream
-
-
+import atexit
+import sys
+
+from .ansitowin32 import AnsiToWin32
+
+
+orig_stdout = sys.stdout
+orig_stderr = sys.stderr
+
+wrapped_stdout = sys.stdout
+wrapped_stderr = sys.stderr
+
+atexit_done = False
+
+
+def reset_all():
+ AnsiToWin32(orig_stdout).reset_all()
+
+
+def init(autoreset=False, convert=None, strip=None, wrap=True):
+
+ if not wrap and any([autoreset, convert, strip]):
+ raise ValueError('wrap=False conflicts with any other arg=True')
+
+ global wrapped_stdout, wrapped_stderr
+ sys.stdout = wrapped_stdout = \
+ wrap_stream(orig_stdout, convert, strip, autoreset, wrap)
+ sys.stderr = wrapped_stderr = \
+ wrap_stream(orig_stderr, convert, strip, autoreset, wrap)
+
+ global atexit_done
+ if not atexit_done:
+ atexit.register(reset_all)
+ atexit_done = True
+
+
+def deinit():
+ sys.stdout = orig_stdout
+ sys.stderr = orig_stderr
+
+
+def reinit():
+ sys.stdout = wrapped_stdout
+ sys.stderr = wrapped_stdout
+
+
+def wrap_stream(stream, convert, strip, autoreset, wrap):
+ if wrap:
+ wrapper = AnsiToWin32(stream,
+ convert=convert, strip=strip, autoreset=autoreset)
+ if wrapper.should_wrap():
+ stream = wrapper.stream
+ return stream
+
+
View
218 thirdparty/colorama/win32.py
@@ -1,109 +1,109 @@
-
-# from winbase.h
-STDOUT = -11
-STDERR = -12
-
-try:
- from ctypes import windll
-except ImportError:
- windll = None
- SetConsoleTextAttribute = lambda *_: None
-else:
- from ctypes import (
- byref, Structure, c_char, c_short, c_uint32, c_ushort
- )
-
- handles = {
- STDOUT: windll.kernel32.GetStdHandle(STDOUT),
- STDERR: windll.kernel32.GetStdHandle(STDERR),
- }
-
- SHORT = c_short
- WORD = c_ushort
- DWORD = c_uint32
- TCHAR = c_char
-
- class COORD(Structure):
- """struct in wincon.h"""
- _fields_ = [
- ('X', SHORT),
- ('Y', SHORT),
- ]
-
- class SMALL_RECT(Structure):
- """struct in wincon.h."""
- _fields_ = [
- ("Left", SHORT),
- ("Top", SHORT),
- ("Right", SHORT),
- ("Bottom", SHORT),
- ]
-
- class CONSOLE_SCREEN_BUFFER_INFO(Structure):
- """struct in wincon.h."""
- _fields_ = [
- ("dwSize", COORD),
- ("dwCursorPosition", COORD),
- ("wAttributes", WORD),
- ("srWindow", SMALL_RECT),
- ("dwMaximumWindowSize", COORD),
- ]
- def __str__(self):
- return '(%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d)' % (
- self.dwSize.Y, self.dwSize.X
- , self.dwCursorPosition.Y, self.dwCursorPosition.X
- , self.wAttributes
- , self.srWindow.Top, self.srWindow.Left, self.srWindow.Bottom, self.srWindow.Right
- , self.dwMaximumWindowSize.Y, self.dwMaximumWindowSize.X
- )
-
- def GetConsoleScreenBufferInfo(stream_id=STDOUT):
- handle = handles[stream_id]
- csbi = CONSOLE_SCREEN_BUFFER_INFO()
- success = windll.kernel32.GetConsoleScreenBufferInfo(
- handle, byref(csbi))
- return csbi
-
-
- def SetConsoleTextAttribute(stream_id, attrs):
- handle = handles[stream_id]
- return windll.kernel32.SetConsoleTextAttribute(handle, attrs)
-
-
- def SetConsoleCursorPosition(stream_id, position):
- position = COORD(*position)
- # If the position is out of range, do nothing.
- if position.Y <= 0 or position.X <= 0:
- return
- # Adjust for Windows' SetConsoleCursorPosition:
- # 1. being 0-based, while ANSI is 1-based.
- # 2. expecting (x,y), while ANSI uses (y,x).
- adjusted_position = COORD(position.Y - 1, position.X - 1)
- # Adjust for viewport's scroll position
- sr = GetConsoleScreenBufferInfo(STDOUT).srWindow
- adjusted_position.Y += sr.Top
- adjusted_position.X += sr.Left
- # Resume normal processing
- handle = handles[stream_id]
- return windll.kernel32.SetConsoleCursorPosition(handle, adjusted_position)
-
- def FillConsoleOutputCharacter(stream_id, char, length, start):
- handle = handles[stream_id]
- char = TCHAR(char)
- length = DWORD(length)
- num_written = DWORD(0)
- # Note that this is hard-coded for ANSI (vs wide) bytes.
- success = windll.kernel32.FillConsoleOutputCharacterA(
- handle, char, length, start, byref(num_written))
- return num_written.value
-
- def FillConsoleOutputAttribute(stream_id, attr, length, start):
- ''' FillConsoleOutputAttribute( hConsole, csbi.wAttributes, dwConSize, coordScreen, &cCharsWritten )'''
- handle = handles[stream_id]
- attribute = WORD(attr)
- length = DWORD(length)
- num_written = DWORD(0)
- # Note that this is hard-coded for ANSI (vs wide) bytes.
- return windll.kernel32.FillConsoleOutputAttribute(
- handle, attribute, length, start, byref(num_written))
-
+
+# from winbase.h
+STDOUT = -11
+STDERR = -12
+
+try:
+ from ctypes import windll
+except ImportError:
+ windll = None
+ SetConsoleTextAttribute = lambda *_: None
+else:
+ from ctypes import (
+ byref, Structure, c_char, c_short, c_uint32, c_ushort
+ )
+
+ handles = {
+ STDOUT: windll.kernel32.GetStdHandle(STDOUT),
+ STDERR: windll.kernel32.GetStdHandle(STDERR),
+ }
+
+ SHORT = c_short
+ WORD = c_ushort
+ DWORD = c_uint32
+ TCHAR = c_char
+
+ class COORD(Structure):
+ """struct in wincon.h"""
+ _fields_ = [
+ ('X', SHORT),
+ ('Y', SHORT),
+ ]
+
+ class SMALL_RECT(Structure):
+ """struct in wincon.h."""
+ _fields_ = [
+ ("Left", SHORT),
+ ("Top", SHORT),
+ ("Right", SHORT),
+ ("Bottom", SHORT),
+ ]
+
+ class CONSOLE_SCREEN_BUFFER_INFO(Structure):
+ """struct in wincon.h."""
+ _fields_ = [
+ ("dwSize", COORD),
+ ("dwCursorPosition", COORD),
+ ("wAttributes", WORD),
+ ("srWindow", SMALL_RECT),
+ ("dwMaximumWindowSize", COORD),
+ ]
+ def __str__(self):
+ return '(%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d)' % (
+ self.dwSize.Y, self.dwSize.X
+ , self.dwCursorPosition.Y, self.dwCursorPosition.X
+ , self.wAttributes
+ , self.srWindow.Top, self.srWindow.Left, self.srWindow.Bottom, self.srWindow.Right
+ , self.dwMaximumWindowSize.Y, self.dwMaximumWindowSize.X
+ )
+
+ def GetConsoleScreenBufferInfo(stream_id=STDOUT):
+ handle = handles[stream_id]
+ csbi = CONSOLE_SCREEN_BUFFER_INFO()
+ success = windll.kernel32.GetConsoleScreenBufferInfo(
+ handle, byref(csbi))
+ return csbi
+
+
+ def SetConsoleTextAttribute(stream_id, attrs):
+ handle = handles[stream_id]
+ return windll.kernel32.SetConsoleTextAttribute(handle, attrs)
+
+
+ def SetConsoleCursorPosition(stream_id, position):
+ position = COORD(*position)
+ # If the position is out of range, do nothing.
+ if position.Y <= 0 or position.X <= 0:
+ return
+ # Adjust for Windows' SetConsoleCursorPosition:
+ # 1. being 0-based, while ANSI is 1-based.
+ # 2. expecting (x,y), while ANSI uses (y,x).
+ adjusted_position = COORD(position.Y - 1, position.X - 1)
+ # Adjust for viewport's scroll position
+ sr = GetConsoleScreenBufferInfo(STDOUT).srWindow
+ adjusted_position.Y += sr.Top
+ adjusted_position.X += sr.Left
+ # Resume normal processing
+ handle = handles[stream_id]
+ return windll.kernel32.SetConsoleCursorPosition(handle, adjusted_position)
+
+ def FillConsoleOutputCharacter(stream_id, char, length, start):
+ handle = handles[stream_id]
+ char = TCHAR(char)
+ length = DWORD(length)
+ num_written = DWORD(0)
+ # Note that this is hard-coded for ANSI (vs wide) bytes.
+ success = windll.kernel32.FillConsoleOutputCharacterA(
+ handle, char, length, start, byref(num_written))
+ return num_written.value
+
+ def FillConsoleOutputAttribute(stream_id, attr, length, start):
+ ''' FillConsoleOutputAttribute( hConsole, csbi.wAttributes, dwConSize, coordScreen, &cCharsWritten )'''
+ handle = handles[stream_id]
+ attribute = WORD(attr)
+ length = DWORD(length)
+ num_written = DWORD(0)
+ # Note that this is hard-coded for ANSI (vs wide) bytes.
+ return windll.kernel32.FillConsoleOutputAttribute(
+ handle, attribute, length, start, byref(num_written))
+
View
240 thirdparty/colorama/winterm.py
@@ -1,120 +1,120 @@
-
-from . import win32
-
-
-# from wincon.h
-class WinColor(object):
- BLACK = 0
- BLUE = 1
- GREEN = 2
- CYAN = 3
- RED = 4
- MAGENTA = 5
- YELLOW = 6
- GREY = 7
-
-# from wincon.h
-class WinStyle(object):
- NORMAL = 0x00 # dim text, dim background
- BRIGHT = 0x08 # bright text, dim background
-
-
-class WinTerm(object):
-
- def __init__(self):
- self._default = win32.GetConsoleScreenBufferInfo(win32.STDOUT).wAttributes
- self.set_attrs(self._default)
- self._default_fore = self._fore
- self._default_back = self._back
- self._default_style = self._style
-
- def get_attrs(self):
- return self._fore + self._back * 16 + self._style
-
- def set_attrs(self, value):
- self._fore = value & 7
- self._back = (value >> 4) & 7
- self._style = value & WinStyle.BRIGHT
-
- def reset_all(self, on_stderr=None):
- self.set_attrs(self._default)
- self.set_console(attrs=self._default)
-
- def fore(self, fore=None, on_stderr=False):
- if fore is None:
- fore = self._default_fore
- self._fore = fore
- self.set_console(on_stderr=on_stderr)
-
- def back(self, back=None, on_stderr=False):
- if back is None:
- back = self._default_back
- self._back = back
- self.set_console(on_stderr=on_stderr)
-
- def style(self, style=None, on_stderr=False):
- if style is None:
- style = self._default_style
- self._style = style
- self.set_console(on_stderr=on_stderr)
-
- def set_console(self, attrs=None, on_stderr=False):
- if attrs is None:
- attrs = self.get_attrs()
- handle = win32.STDOUT
- if on_stderr:
- handle = win32.STDERR
- win32.SetConsoleTextAttribute(handle, attrs)
-
- def get_position(self, handle):
- position = win32.GetConsoleScreenBufferInfo(handle).dwCursorPosition
- # Because Windows coordinates are 0-based,
- # and win32.SetConsoleCursorPosition expects 1-based.
- position.X += 1
- position.Y += 1
- return position
-
- def set_cursor_position(self, position=None, on_stderr=False):
- if position is None:
- #I'm not currently tracking the position, so there is no default.
- #position = self.get_position()
- return
- handle = win32.STDOUT
- if on_stderr:
- handle = win32.STDERR
- win32.SetConsoleCursorPosition(handle, position)
-
- def cursor_up(self, num_rows=0, on_stderr=False):
- if num_rows == 0:
- return
- handle = win32.STDOUT
- if on_stderr:
- handle = win32.STDERR
- position = self.get_position(handle)
- adjusted_position = (position.Y - num_rows, position.X)
- self.set_cursor_position(adjusted_position, on_stderr)
-
- def erase_data(self, mode=0, on_stderr=False):
- # 0 (or None) should clear from the cursor to the end of the screen.
- # 1 should clear from the cursor to the beginning of the screen.
- # 2 should clear the entire screen. (And maybe move cursor to (1,1)?)
- #
- # At the moment, I only support mode 2. From looking at the API, it
- # should be possible to calculate a different number of bytes to clear,
- # and to do so relative to the cursor position.
- if mode[0] not in (2,):
- return
- handle = win32.STDOUT
- if on_stderr:
- handle = win32.STDERR
- # here's where we'll home the cursor
- coord_screen = win32.COORD(0,0)
- csbi = win32.GetConsoleScreenBufferInfo(handle)
- # get the number of character cells in the current buffer
- dw_con_size = csbi.dwSize.X * csbi.dwSize.Y
- # fill the entire screen with blanks
- win32.FillConsoleOutputCharacter(handle, ord(' '), dw_con_size, coord_screen)
- # now set the buffer's attributes accordingly
- win32.FillConsoleOutputAttribute(handle, self.get_attrs(), dw_con_size, coord_screen );
- # put the cursor at (0, 0)
- win32.SetConsoleCursorPosition(handle, (coord_screen.X, coord_screen.Y))
+
+from . import win32
+
+
+# from wincon.h
+class WinColor(object):
+ BLACK = 0
+ BLUE = 1
+ GREEN = 2
+ CYAN = 3
+ RED = 4
+ MAGENTA = 5
+ YELLOW = 6
+ GREY = 7
+
+# from wincon.h
+class WinStyle(object):
+ NORMAL = 0x00 # dim text, dim background
+ BRIGHT = 0x08 # bright text, dim background
+
+
+class WinTerm(object):
+
+ def __init__(self):
+ self._default = win32.GetConsoleScreenBufferInfo(win32.STDOUT).wAttributes
+ self.set_attrs(self._default)
+ self._default_fore = self._fore
+ self._default_back = self._back
+ self._default_style = self._style
+
+ def get_attrs(self):
+ return self._fore + self._back * 16 + self._style
+
+ def set_attrs(self, value):
+ self._fore = value & 7
+ self._back = (value >> 4) & 7
+ self._style = value & WinStyle.BRIGHT
+
+ def reset_all(self, on_stderr=None):
+ self.set_attrs(self._default)
+ self.set_console(attrs=self._default)
+
+ def fore(self, fore=None, on_stderr=False):
+ if fore is None:
+ fore = self._default_fore
+ self._fore = fore
+ self.set_console(on_stderr=on_stderr)
+
+ def back(self, back=None, on_stderr=False):
+ if back is None:
+ back = self._default_back
+ self._back = back
+ self.set_console(on_stderr=on_stderr)
+
+ def style(self, style=None, on_stderr=False):
+ if style is None:
+ style = self._default_style
+ self._style = style
+ self.set_console(on_stderr=on_stderr)
+
+ def set_console(self, attrs=None, on_stderr=False):
+ if attrs is None:
+ attrs = self.get_attrs()
+ handle = win32.STDOUT
+ if on_stderr:
+ handle = win32.STDERR
+ win32.SetConsoleTextAttribute(handle, attrs)
+
+ def get_position(self, handle):
+ position = win32.GetConsoleScreenBufferInfo(handle).dwCursorPosition
+ # Because Windows coordinates are 0-based,
+ # and win32.SetConsoleCursorPosition expects 1-based.
+ position.X += 1
+ position.Y += 1
+ return position
+
+ def set_cursor_position(self, position=None, on_stderr=False):
+ if position is None:
+ #I'm not currently tracking the position, so there is no default.
+ #position = self.get_position()
+ return
+ handle = win32.STDOUT
+ if on_stderr:
+ handle = win32.STDERR
+ win32.SetConsoleCursorPosition(handle, position)
+
+ def cursor_up(self, num_rows=0, on_stderr=False):
+ if num_rows == 0:
+ return
+ handle = win32.STDOUT
+ if on_stderr:
+ handle = win32.STDERR
+ position = self.get_position(handle)
+ adjusted_position = (position.Y - num_rows, position.X)
+ self.set_cursor_position(adjusted_position, on_stderr)
+
+ def erase_data(self, mode=0, on_stderr=False):
+ # 0 (or None) should clear from the cursor to the end of the screen.
+ # 1 should clear from the cursor to the beginning of the screen.
+ # 2 should clear the entire screen. (And maybe move cursor to (1,1)?)
+ #
+ # At the moment, I only support mode 2. From looking at the API, it
+ # should be possible to calculate a different number of bytes to clear,
+ # and to do so relative to the cursor position.
+ if mode[0] not in (2,):
+ return
+ handle = win32.STDOUT
+ if on_stderr:
+ handle = win32.STDERR
+ # here's where we'll home the cursor
+ coord_screen = win32.COORD(0,0)
+ csbi = win32.GetConsoleScreenBufferInfo(handle)
+ # get the number of character cells in the current buffer
+ dw_con_size = csbi.dwSize.X * csbi.dwSize.Y
+ # fill the entire screen with blanks
+ win32.FillConsoleOutputCharacter(handle, ord(' '), dw_con_size, coord_screen)
+ # now set the buffer's attributes accordingly
+ win32.FillConsoleOutputAttribute(handle, self.get_attrs(), dw_con_size, coord_screen );
+ # put the cursor at (0, 0)
+ win32.SetConsoleCursorPosition(handle, (coord_screen.X, coord_screen.Y))
View
44 thirdparty/socks/LICENSE
@@ -1,22 +1,22 @@
-Copyright 2006 Dan-Haim. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-1. Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-3. Neither the name of Dan Haim nor the names of his contributors may be used
- to endorse or promote products derived from this software without specific
- prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY DAN HAIM "AS IS" AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-EVENT SHALL DAN HAIM OR HIS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA
-OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMANGE.
+Copyright 2006 Dan-Haim. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+3. Neither the name of Dan Haim nor the names of his contributors may be used
+ to endorse or promote products derived from this software without specific
+ prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY DAN HAIM "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL DAN HAIM OR HIS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA
+OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMANGE.
View
5,094 txt/common-columns.txt
@@ -1,2547 +1,2547 @@
-# Copyright (c) 2006-2012 sqlmap developers (http://www.sqlmap.org/)
-# See the file 'doc/COPYING' for copying permission
-
-id
-name
-user_id
-description
-username
-type
-title
-userid
-group_id
-first_name
-itemid
-category_id
-firstname
-code
-pno
-nextval
-hostid
-table_name
-cid
-email
-smtp_helo
-platformid
-dept_id
-album_id
-key_
-the
-child_cfg
-jid
-platform
-expression
-functionid
-smtp_server
-uid
-clock
-alarmid
-alertid
-private_key
-actionid
-triggerid
-triggertemplateid
-local_spi
-delay
-sid
-mediaid
-peer_cfg
-smtp_email
-order_id
-shared_secret
-itemtemplateid
-certificate
-insertid
-role_id
-song_id
-item_id
-product_id
-blob_id
-distip
-artist_id
-empno
-customer_name
-grade
-branch_name
-portal_id
-deptno
-data
-rid
-app_id
-class
-loan_number
-countryid
-enabled
-fname
-country
-ename
-object_id
-idtype
-groupid
-rowid
-accno
-account_number
-event
-passwd
-sequence_id
-datarow
-owner_id
-display
-pid
-venue
-locked
-eno
-serviceid
-alias
-categoryid
-canoccupantsinvite
-keyword
-channel_id
-loginrestrictedtonickname
-registrationenabled
-logenabled
-ip
-maxnumber
-tag_id
-alert_id
-cananyonediscoverjid
-address
-sumdatarow
-emp_id
-ono
-anyone
-surname
-subdomain
-maxusers
-ccc
-datacol
-os
-status_id
-node_id
-essn
-last_name
-iteration
-canchangenickname
-canoccupantschangesubject
-membersonly
-created_by
-succ_rate
-dnumber
-service_id
-mid
-publicroom
-propvalue
-empty_days
-moderated
-customer_id
-wdatarow
-persistent
-authorid
-patch_status_id
-submitted_by
-resolution_id
-osvendor
-routeid
-arch
-fid
-assigned_to
-ns
-event_id
-problem_code
-city
-note
-channel
-element_id
-cat_id
-position_id
-schema_id
-area
-bug_category_id
-session_id
-project_id
-random
-nsprefix
-archive_id
-nsschema
-view_id
-pname
-bug_group_id
-lastname
-link_id
-langid
-catname
-bug_id
-magic_string
-m_id
-zip
-patch_category_id
-custno
-idcountry
-stopid
-identifier
-category
-isbn
-group_project_id
-extension_id
-state
-password
-page
-extension
-spellid
-dno
-instanceof
-network
-priority
-aname
-person_id
-ncbofile
-student_number
-term_id
-uno
-path_id
-aid
-location_id
-propertyno
-course_number
-tid
-langug_code
-variable
-dept_desc
-orderno
-ownerno
-partof
-clientno
-white
-macaddr
-jobtypeid
-direction
-md5sum
-orga_id
-parentcategoryid
-beginstateid
-mname
-qno
-src
-featurename
-client_id
-route_id
-ticker
-version
-modulename
-maty_id
-currentstateid
-userinfo_id
-column_id
-imageinfo_id
-staffno
-lid
-metadatainfoid
-context
-app_title
-dest
-attributecategory_id
-operation_type
-dnum
-pers_id_registerer
-datasource
-connectorid
-our_loc
-country_name
-dname
-capital
-search_id
-statechangeid
-rightid
-endstateid
-distconnectorid
-walnut
-distmacaddr
-pixsize
-jobid
-revid
-match_cid
-branchno
-prepend_digits
-stockno
-ncbofileid
-object_type
-type_id
-pubid
-qagent
-office
-db_name
-bank
-dummy
-storyname
-col
-petty
-qname
-store_id
-inv_id
-inventory
-gift
-cno
-item
-c_sec_id
-row_id
-price
-loc_id
-ssn
-c_id
-sname
-parent
-allowance
-color
-group_name
-accounts
-vendorid
-gifi_accno
-movie_id
-rate
-company
-subid
-commentpath
-protocol_action_id
-topic_id
-s_id
-config_id
-long
-link
-copyright
-vehicle
-customerid
-customer
-f_id
-chart_id
-url
-host
-loans
-charttype
-imagefile
-data_set_id
-guest_ip
-biosample_id
-affiliation_id
-os_id
-street_id
-book_code
-object_name
-start_date
-form_id
-itemno
-provincial
-confid
-ratingid
-drinker
-qname_id
-whatsdom
-config_name
-ship_id
-investigator_id
-smilies_id
-cal_id
-license_id
-conf
-contact_id
-procedure_id
-column_name
-chromosome_id
-tf_key
-agent_specialtyid
-users_id
-gid
-publisher_code
-setting
-format_id
-word
-slogan
-superssn
-product
-referredby
-operationid
-ban_ip
-p_id
-lbl_aom_unaccessible_shipmethod
-origin
-comment_id
-product_version
-probe_id
-orderdate
-ordernumber
-data_type_id
-publisherid
-lake_id
-course_id
-questionid
-student_id
-user_name
-answerid
-hashtag
-preference_id
-author_num
-branch_num
-derived_id
-factoryid
-filterid
-log
-pnumber
-specialtyid
-plugin_id
-aa
-file
-dept_number
-action_attribute_id
-cpr
-storeid
-progenitor_id
-staff_number
-deptid
-semester
-poi_id
-part_id
-cell_line_id
-transaction_id
-agentid
-regionid
-token
-serial_no
-experimental_data_set_id
-cp_id
-the_geom
-model
-o_id
-personid
-display_name
-salesperson_id
-dependent_name
-license
-tablename
-employee_id
-e_id
-id_group
-location
-bb
-languageid
-int4
-msg_id
-department
-book_id
-ingredientid
-action_type_id
-maker
-app
-id_customer
-this
-entry_id
-county_id
-protocol_type_id
-empnbr
-unit_number
-bar
-studentid
-dbid
-title_id
-cname
-emp_num
-owner
-course_name
-editionnumber
-sessionid
-mealid
-com_id
-text
-chip_layout_id
-watchlistid
-qty
-data_set_type_id
-orderid
-module_id
-c1
-dlocation
-domainid
-course_no
-mgrssn
-id_log
-access_control_type_id
-account_id
-checking
-protocol_id
-request_id
-settingsid
-lname
-sale_date
-module_addr
-
-# spanish
-usuario
-nombre
-contrasena
-consumidor
-clave
-tecla
-llave
-chaveta
-tono
-cuna
-
-# german
-benutzername
-benutzer
-passwort
-kennwort
-parole
-losungswort
-losung
-kennung
-motto
-stichwort
-schlusselwort
-
-# french
-utilisateur
-usager
-consommateur
-nom
-mot
-passe
-cle
-touche
-clef
-
-# italian
-utente
-nome
-utilizzatore
-parola
-chiave
-tasto
-pulsante
-chiavetta
-cifrario
-
-# portuguese
-usufrutuario
-chave
-cavilha
-
-# slavic
-korisnik
-sifra
-lozinka
-kljuc
-
-# List from schemafuzz.py (http://www.beenuarora.com/code/schemafuzz.py)
-user
-pass
-cc_number
-emri
-fjalekalimi
-pwd
-customers_email_address
-customers_password
-user_password
-user_pass
-admin_user
-admin_password
-admin_pass
-usern
-user_n
-users
-login
-logins
-login_user
-login_admin
-login_username
-user_username
-user_login
-auid
-apwd
-adminid
-admin_id
-adminuser
-adminuserid
-admin_userid
-adminusername
-admin_username
-adminname
-admin_name
-usr
-usr_n
-usrname
-usr_name
-usrpass
-usr_pass
-usrnam
-nc
-myusername
-mail
-emni
-logohu
-punonjes
-kpro_user
-wp_users
-emniplote
-perdoruesi
-perdorimi
-punetoret
-logini
-llogaria
-fjalekalimin
-kodi
-emer
-ime
-korisnici
-user1
-administrator
-administrator_name
-mem_login
-login_password
-login_pass
-login_passwd
-login_pwd
-psw
-pass1word
-pass_word
-passw
-pass_w
-user_passwd
-userpass
-userpassword
-userpwd
-user_pwd
-useradmin
-user_admin
-mypassword
-passwrd
-admin_pwd
-admin_passwd
-mem_password
-memlogin
-e_mail
-usrn
-u_name
-uname
-mempassword
-mem_pass
-mem_passwd
-mem_pwd
-p_word
-pword
-p_assword
-myname
-my_username
-my_name
-my_password
-my_email
-cvvnumber
-about
-access
-accnt
-accnts
-account
-admin
-adminemail
-adminlogin
-adminmail
-admins
-aim
-auth
-authenticate
-authentication
-blog
-cc_expires
-cc_owner
-cc_type
-cfg
-clientname
-clientpassword
-clientusername
-config
-contact
-converge_pass_hash
-converge_pass_salt
-crack
-customers
-cvvnumber]
-db_database_name
-db_hostname
-db_password
-db_username
-download
-e-mail
-emailaddress
-full
-group
-hash
-hashsalt
-homepage
-icq
-icq_number
-id_member
-images
-index
-ip_address
-last_ip
-last_login
-login_name
-login_pw
-loginkey
-loginout
-logo
-md5hash
-member
-member_id
-member_login_key
-member_name
-memberid
-membername
-members
-new
-news
-nick
-number
-nummer
-pass_hash
-passwordsalt
-personal_key
-phone
-privacy
-pw
-pwrd
-salt
-search
-secretanswer
-secretquestion
-serial
-session_member_id
-session_member_login_key
-sesskey
-spacer
-status
-store
-store1
-store2
-store3
-store4
-table_prefix
-temp_pass
-temp_password
-temppass
-temppasword
-un
-user_email
-user_icq
-user_ip
-user_level
-user_passw
-user_pw
-user_pword
-user_pwrd
-user_un
-user_uname
-user_usernm
-user_usernun
-user_usrnm
-userip
-userlogin
-usernm
-userpw
-usr2
-usrnm
-usrs
-warez
-xar_name
-xar_pass
-
-# List from http://nibblesec.org/files/MSAccessSQLi/MSAccessSQLi.html
-account
-accnts
-accnt
-user_id
-members
-usrs
-usr2
-accounts
-admin
-admins
-adminlogin
-auth
-authenticate
-authentication
-account
-access
-customers
-customer
-config
-conf
-cfg
-hash
-login
-logout
-loginout
-log
-member
-memberid
-password
-pass_hash
-pass
-passwd
-passw
-pword
-pwrd
-pwd
-store
-store1
-store2
-store3
-store4
-setting
-username
-name
-user
-user_name
-user_username
-uname
-user_uname
-usern
-user_usern
-un
-user_un
-usrnm
-user_usrnm
-usr
-usernm
-user_usernm
-user_nm
-user_password
-userpass
-user_pass
-user_pword
-user_passw
-user_pwrd
-user_pwd
-user_passwd
-
-# List from hyrax (http://sla.ckers.org/forum/read.php?16,36047)
-fld_id
-fld_username
-fld_password
-loginname
-pasword
-permission
-perm
-user_group
-tendn
-tendangnhap
-tenquantri
-tenquanly
-tennguoidung
-ten
-tennd
-nguoidung
-nguoidungid
-quantri
-quanly
-u_id
-accountname
-account_name
-matkhau
-matma
-paswd
-pas
-tukhoa
-login_pas
-loginpassword
-loginpasswd
-loginpass
-loginpas
-loginpwd
-secret
-secret_code
-secretcode
-administrators
-adminpass
-adminpassword
-adminpaw
-adminpwd
-adminuid
-upass
-level
-mima
-sb_admin_name
-sb_pwd
-client
-clients
-ipaddress
-files
-family
-admin_psw
-administrateur
-adminpsw
-adminupass
-adress
-aide
-articleid
-content
-dw
-feed
-feedback
-glmm
-isadmin
-key
-keywords
-mpassword
-msn
-musername
-newsid
-numer
-passer
-pe_aduser
-pe_user
-power
-pswd
-pwd1
-qq
-stocker
-sysuser
-telephone
-texte
-userpasswd
-usr_nusr
-usr_pw
-website
-wind
-compte
-comptes
-objectif
-authentifier
-authentification
-fissure
-adressee-mail
-complet
-groupe
-hachage
-connexion
-membre
-membres
-mm
-p
-u
-mot_de_passe_bdd
-mon_mot_de_passe
-monmotdepasse
-ignatiusj
-caroline-du-nord
-nouveau
-sel
-recherche
-utilisateurs
-o
-konto
-rachunki
-administratorzy
-pomoc
-cel
-uwierzytelnienia
-uwierzytelnianie
-kontakt
-klient
-danych
-adres_e-mailowy
-grupy
-obrazy
-spis
-dostawcy
-nazwisko
-zaloguj
-nowy
-telefon
-seryjny
-ustawienie
-kod
-stan
-sklep1
-sklep2
-tekst
-zytk
-konta
-rysa
-adrese-mail
-ecolo
-tat
-yh
-yhm
-yhmm
-yonghu
-
-# site:br
-content_id
-codigo
-geometry
-published
-section_value
-tidcliente
-menuid
-pollid
-bid
-moduleid
-gab_pergunta
-tipo
-template
-multilinestring
-aal_aluno
-ava_professor
-adm_nivel
-lec_codigo
-per_codigo
-lec_disciplina
-gaip_codigo
-acl_id
-niv_codigo
-quantidade
-attribute_id
-gaia_codigo
-alu_matricula
-nota
-gab_codigo
-field_id
-ava_codigo
-aal_codigo
-message_id
-avi_codigo
-fre_disciplina
-groups_id
-nome_cliente
-pc
-lec_professor
-idusuario
-poll_id
-dis_codigo
-ava_disciplina
-gap_codigo
-avp_codigo
-aai_codigo
-fre_aluno
-fre_codigo
-adm_id
-id_estado
-aap_codigo
-pro_matricula
-gp
-xlancamento
-municipioprestador
-product_price_id
-country_2_code
-shopper_group_id
-manufacturer_id
-com_natur
-review_id
-xtipo_de_acao
-bookmark_id
-xequipe_padrao
-faixas_id
-xcliente
-deducoes_id
-xcategoria
-xencerramento
-idx_item
-xcadastro
-quantitens
-additional_htmlblob_users_id
-ipi
-xfase_de_vencimento
-permission_id
-xdecisao
-i_end
-xforo
-order_item_id
-mo
-grafica_id
-news_id
-enderecos_id
-desccompensa
-desconto
-creditcard_id
-card_id
-cardid
-idcard
-creditcard
-cardnumber
-cardno
-itens_id
-senha
-order_status_id
-id_seq
-municipio_id
-additional_users_id
-order_status_history_id