@@ -224,33 +224,33 @@ def write(self, value, status=CONTENT_STATUS.IN_PROGRESS, content_type=None):
224224 # Ignore all non-relevant messages
225225 return
226226
227- output = conf .database_cursor .execute (
227+ output = conf .databaseCursor .execute (
228228 "SELECT id, status, value FROM data WHERE taskid = ? AND content_type = ?" ,
229229 (self .taskid , content_type ))
230230
231231 # Delete partial output from IPC database if we have got a complete output
232232 if status == CONTENT_STATUS .COMPLETE :
233233 if len (output ) > 0 :
234234 for index in xrange (len (output )):
235- conf .database_cursor .execute ("DELETE FROM data WHERE id = ?" ,
235+ conf .databaseCursor .execute ("DELETE FROM data WHERE id = ?" ,
236236 (output [index ][0 ],))
237237
238- conf .database_cursor .execute ("INSERT INTO data VALUES(NULL, ?, ?, ?, ?)" ,
238+ conf .databaseCursor .execute ("INSERT INTO data VALUES(NULL, ?, ?, ?, ?)" ,
239239 (self .taskid , status , content_type , jsonize (value )))
240240 if kb .partRun :
241241 kb .partRun = None
242242
243243 elif status == CONTENT_STATUS .IN_PROGRESS :
244244 if len (output ) == 0 :
245- conf .database_cursor .execute ("INSERT INTO data VALUES(NULL, ?, ?, ?, ?)" ,
245+ conf .databaseCursor .execute ("INSERT INTO data VALUES(NULL, ?, ?, ?, ?)" ,
246246 (self .taskid , status , content_type ,
247247 jsonize (value )))
248248 else :
249249 new_value = "%s%s" % (dejsonize (output [0 ][2 ]), value )
250- conf .database_cursor .execute ("UPDATE data SET value = ? WHERE id = ?" ,
250+ conf .databaseCursor .execute ("UPDATE data SET value = ? WHERE id = ?" ,
251251 (jsonize (new_value ), output [0 ][0 ]))
252252 else :
253- conf .database_cursor .execute ("INSERT INTO errors VALUES(NULL, ?, ?)" ,
253+ conf .databaseCursor .execute ("INSERT INTO errors VALUES(NULL, ?, ?)" ,
254254 (self .taskid , str (value ) if value else "" ))
255255
256256 def flush (self ):
@@ -269,16 +269,16 @@ def emit(self, record):
269269 Record emitted events to IPC database for asynchronous I/O
270270 communication with the parent process
271271 """
272- conf .database_cursor .execute ("INSERT INTO logs VALUES(NULL, ?, ?, ?, ?)" ,
272+ conf .databaseCursor .execute ("INSERT INTO logs VALUES(NULL, ?, ?, ?, ?)" ,
273273 (conf .taskid , time .strftime ("%X" ), record .levelname ,
274274 record .msg % record .args if record .args else record .msg ))
275275
276276
277277def setRestAPILog ():
278278 if hasattr (conf , "api" ):
279279 try :
280- conf .database_cursor = Database (conf .database )
281- conf .database_cursor .connect ("client" )
280+ conf .databaseCursor = Database (conf .database )
281+ conf .databaseCursor .connect ("client" )
282282 except sqlite3 .OperationalError , ex :
283283 raise SqlmapConnectionException , "%s ('%s')" % (ex , conf .database )
284284
0 commit comments