minor fix for crawler and far less message overlaps in future

This commit is contained in:
Miroslav Stampar 2011-06-20 21:18:12 +00:00
parent 8968c708a0
commit d6062e8fc9
3 changed files with 20 additions and 17 deletions

View File

@ -754,6 +754,8 @@ def readInput(message, default=None):
elif message[-1] == ']':
message += " "
message = "\r%s" % message
if conf.batch:
if isinstance(default, (list, tuple, set)):
options = ",".join([getUnicode(opt, UNICODE_ENCODING) for opt in default])

View File

@ -39,7 +39,7 @@ logging.addLevelName(7, "TRAFFIC IN")
LOGGER = logging.getLogger("sqlmapLog")
LOGGER_HANDLER = logging.StreamHandler(sys.stdout)
FORMATTER = logging.Formatter("[%(asctime)s] [%(levelname)s] %(message)s", "%H:%M:%S")
FORMATTER = logging.Formatter("\r[%(asctime)s] [%(levelname)s] %(message)s", "%H:%M:%S")
LOGGER_HANDLER.setFormatter(FORMATTER)
LOGGER.addHandler(LOGGER_HANDLER)

View File

@ -51,11 +51,12 @@ class Crawler:
kb.locks.limits.release()
break
content = Request.getPage(url=current)[0]
content = Request.getPage(url=current, raise404=False)[0]
if not kb.threadContinue:
break
if content:
soup = BeautifulSoup(content)
for tag in soup('a'):
if tag.get("href"):