diff --git a/lib/core/option.py b/lib/core/option.py index c977bdc95..e48c0b656 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -336,7 +336,11 @@ def _setCrawler(): return if not conf.bulkFile: - crawl(conf.url) + if conf.url: + crawl(conf.url) + elif conf.requestFile and kb.targets: + target = list(kb.targets)[0] + crawl(target[0], target[2], target[3]) def _doSearch(): """ diff --git a/lib/core/settings.py b/lib/core/settings.py index 539eba042..af311abe7 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.3.11.52" +VERSION = "1.3.11.53" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) diff --git a/lib/utils/crawler.py b/lib/utils/crawler.py index 0730a05bb..82b15e91f 100644 --- a/lib/utils/crawler.py +++ b/lib/utils/crawler.py @@ -42,7 +42,7 @@ from thirdparty.beautifulsoup.beautifulsoup import BeautifulSoup from thirdparty.six.moves import http_client as _http_client from thirdparty.six.moves import urllib as _urllib -def crawl(target): +def crawl(target, post=None, cookie=None): if not target: return @@ -73,7 +73,7 @@ def crawl(target): content = None try: if current: - content = Request.getPage(url=current, crawling=True, raise404=False)[0] + content = Request.getPage(url=current, post=post, cookie=None, crawling=True, raise404=False)[0] except SqlmapConnectionException as ex: errMsg = "connection exception detected ('%s'). skipping " % getSafeExString(ex) errMsg += "URL '%s'" % current