bundle bottle library in sqlmap (it is MIT license) - issue #297

This commit is contained in:
Bernardo Damele 2012-12-14 03:00:30 +00:00
parent 0ec420cc70
commit 2e97405ffa
4 changed files with 3272 additions and 14 deletions

View File

@ -45,15 +45,9 @@ from lib.core.settings import XMLRPC_SERVER_PORT
from lib.core.testing import smokeTest from lib.core.testing import smokeTest
from lib.core.testing import liveTest from lib.core.testing import liveTest
from lib.parse.cmdline import cmdLineParser from lib.parse.cmdline import cmdLineParser
from lib.utils.restapi import restAPIrun
from lib.utils.xmlrpc import XMLRPCServer from lib.utils.xmlrpc import XMLRPCServer
try:
from lib.utils.restapi import restAPIrun
except SqlmapMissingDependence, e:
e = getUnicode(e)
logger.critical(e)
sys.exit(1)
def modulePath(): def modulePath():
""" """
This will get us the program's directory, even if we are frozen This will get us the program's directory, even if we are frozen

8
extra/bottle/__init__.py Normal file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env python
"""
Copyright (c) 2006-2012 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
pass

3262
extra/bottle/bottle.py Normal file

File diff suppressed because it is too large Load Diff

View File

@ -9,6 +9,7 @@ import sys
import json import json
import os import os
from extra.bottle.bottle import abort, error, get, post, request, run, template, debug
from lib.controller.controller import start from lib.controller.controller import start
from lib.core.convert import hexencode from lib.core.convert import hexencode
from lib.core.datatype import AttribDict from lib.core.datatype import AttribDict
@ -20,13 +21,6 @@ from lib.core.option import init
from lib.core.settings import UNICODE_ENCODING from lib.core.settings import UNICODE_ENCODING
from lib.core.settings import RESTAPI_SERVER_PORT from lib.core.settings import RESTAPI_SERVER_PORT
try:
from bottle import abort, error, get, post, request, run, template, debug
except ImportError:
errMsg = "Missing mandatory library bottle: download from "
errMsg += "http://bottlepy.org/ and install it"
raise SqlmapMissingDependence, errMsg
# local global variables # local global variables
session_ids = [] session_ids = []