1414import types
1515
1616from subprocess import PIPE
17- from subprocess import STDOUT
1817
1918from lib .controller .controller import start
2019from lib .core .common import unArrayizeValue
@@ -276,7 +275,7 @@ def scan_start(taskid):
276275 tasks [taskid ]["fdLog" ] = pipes [taskid ][1 ]
277276
278277 # Launch sqlmap engine
279- procs [taskid ] = execute ("python sqlmap.py --pickled-options %s" % base64pickle (tasks [taskid ]), shell = True , stdin = PIPE , stdout = PIPE , stderr = STDOUT , close_fds = False )
278+ procs [taskid ] = execute ("python sqlmap.py --pickled-options %s" % base64pickle (tasks [taskid ]), shell = True , stdin = PIPE , stdout = PIPE , stderr = PIPE , close_fds = False )
280279
281280 return jsonize ({"success" : True })
282281
@@ -291,9 +290,10 @@ def scan_output(taskid):
291290 if taskid not in tasks :
292291 abort (500 , "Invalid task ID" )
293292
294- stdout = recv_some (procs [taskid ], t = 1 , e = 0 )
293+ stdout = recv_some (procs [taskid ], t = 1 , e = 0 , stderr = 0 )
294+ stderr = recv_some (procs [taskid ], t = 1 , e = 0 , stderr = 1 )
295295
296- return jsonize ({"stdout" : stdout })
296+ return jsonize ({"stdout" : stdout , "stderr" : stderr })
297297
298298@get ("/scan/<taskid>/delete" )
299299def scan_delete (taskid ):
0 commit comments