mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-10-20 18:54:02 +00:00
fix for one of those more complex bugs (comparison was returning None while original page and/or page template were already had already DBMS error inside)
This commit is contained in:
parent
aab14fa2d3
commit
2c23a59ba5
9 changed files with 52 additions and 32 deletions
37
lib/core/threads.py
Normal file
37
lib/core/threads.py
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
$Id: unescaper.py 2635 2010-12-10 10:52:55Z inquisb $
|
||||
|
||||
Copyright (c) 2006-2010 sqlmap developers (http://sqlmap.sourceforge.net/)
|
||||
See the file 'doc/COPYING' for copying permission
|
||||
"""
|
||||
|
||||
import threading
|
||||
|
||||
from lib.core.data import kb
|
||||
|
||||
class ThreadData():
|
||||
"""
|
||||
Represents thread independent data
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
self.lastErrorPage = None
|
||||
self.lastQueryDuration = 0
|
||||
self.lastRequestUID = 0
|
||||
self.valueStack = []
|
||||
|
||||
def getCurrentThreadUID():
|
||||
return hash(threading.currentThread())
|
||||
|
||||
def getCurrentThreadData():
|
||||
"""
|
||||
Returns current thread's dependent data
|
||||
"""
|
||||
|
||||
threadUID = getCurrentThreadUID()
|
||||
if threadUID not in kb.threadData:
|
||||
kb.threadData[threadUID] = ThreadData()
|
||||
return kb.threadData[threadUID]
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue