mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 11:03:47 +03:00
Rework:solve problem of saving result of --sql-query in CSV file
This commit is contained in:
parent
cc7c5e7950
commit
372f80cfce
|
@ -712,19 +712,18 @@ class Dump(object):
|
|||
|
||||
def sqlQuery(self, query, queryRes):
|
||||
self.string(query, queryRes, content_type=CONTENT_TYPE.SQL_QUERY)
|
||||
print ("mon output est ",queryRes)
|
||||
|
||||
#code to extract columns from the request
|
||||
deb="SELECT"
|
||||
fin="FROM"
|
||||
temp1=(query.upper()).find(deb)
|
||||
#print ("mon output est ",temp1)
|
||||
|
||||
temp2=(query.upper()).find(fin)
|
||||
#print ("mon output est ",temp2)
|
||||
|
||||
T=len(deb)-temp1+1
|
||||
temp_res=query[T:temp2]
|
||||
temp_res=(temp_res.strip()).split(',')
|
||||
print ("mon output est ",temp_res)
|
||||
|
||||
#******************************************
|
||||
#dictionarie for every value in queryRes
|
||||
dt_save=[]
|
||||
|
@ -747,6 +746,7 @@ class Dump(object):
|
|||
else:
|
||||
print("data don't exist to create CSV file")
|
||||
|
||||
|
||||
def rFile(self, fileData):
|
||||
self.lister("files saved to", fileData, sort=False, content_type=CONTENT_TYPE.FILE_READ)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user