Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7b9d978

Browse files
committed
minor fix (database and/or table names with - sign inside needs to be escaped by ` character or will lead to a "SQL syntax")
1 parent dce9a76 commit 7b9d978

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

plugins/generic/enumeration.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,6 +1131,12 @@ def dumpTable(self):
11311131

11321132
rootQuery = queries[kb.dbms].dump_table
11331133

1134+
if kb.dbms == DBMS.MYSQL:
1135+
if '-' in conf.tbl:
1136+
conf.tbl = "`%s`" % conf.tbl
1137+
if '-' in conf.db:
1138+
conf.db = "`%s`" % conf.db
1139+
11341140
if conf.col:
11351141
colList = conf.col.split(",")
11361142
kb.data.cachedColumns[conf.db] = {}

0 commit comments

Comments
 (0)