hunk.code_window:     if conf.tech and isinstance(conf.tech, list) and technique not in conf.tech:
           return False
       else:
           return getTechniqueData(technique) is not None
   def initTechnique(technique=None):
       """
       Prepares proper page template and match ratio for technique specified
  
hunk.labels: keep keep keep keep add keep keep keep
hunk.after_edit: def setOptimize():
       #conf.predictOutput = True
       conf.keepAlive = True
       conf.threads = 3 if conf.threads < 3 else conf.threads
       conf.nullConnection = not any([conf.data, conf.textOnly, conf.titles, conf.string, conf.regexp])
       if not conf.nullConnection:
           debugMsg = "turning off --null-connection switch used indirectly by switch -o"
           logger.debug(debugMsg)
  
hunk.file_path: lib/core/common.py
hunk.type: add
file: #!/usr/bin/env python
  
  """
  $Id$
  
  Copyright (c) 2006-2011 sqlmap developers (http://www.sqlmap.org/)
  See the file 'doc/COPYING' for copying permission
  """
  
  import random
  
  from lib.core.enums import PRIORITY
  
  __priority__ = PRIORITY.LOW
  
  def dependencies():
      pass
  
  def tamper(payload):
      """
      Replaces space character (' ') with a random blank character from a
      valid set of alternate characters
  
      Example:
          * Input: SELECT id FROM users
          * Output: SELECT\rid\tFROM\nusers
  
      Tested against:
          * Microsoft SQL Server 2005
          * MySQL 4, 5.0 and 5.5
          * Oracle 10g
          * PostgreSQL 8.3, 8.4, 9.0
  
      Notes:
          * Useful to bypass several web application firewalls
      """
  
      # ASCII table:
      #   TAB     09      horizontal TAB
      #   LF      0A      new line
      #   FF      0C      new page
      #   CR      0D      carriage return
      blanks = ['%09', '%0A', '%0C', '%0D']
      retVal = payload
  
      if payload:
          retVal = ""
          quote, doublequote, firstspace = False, False, False
  
          for i in xrange(len(payload)):
              if not firstspace:
                  if payload[i].isspace():
                      firstspace = True
                      retVal += random.choice(blanks)
                      continue
  
              elif payload[i] == '\'':
                  quote = not quote
  
              elif payload[i] == '"':
                  doublequote = not doublequote
  
              elif payload[i] == " " and not doublequote and not quote:
                  retVal += random.choice(blanks)
                  continue
  
              retVal += payload[i]
  
      return retVal
  