From d75578c81f333019e47060d7105ed47be36d6de1 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 29 Oct 2010 09:00:51 +0000 Subject: [PATCH] some update regarding common tables --- doc/THANKS | 3 ++ lib/core/common.py | 7 +++-- plugins/generic/enumeration.py | 6 ++-- txt/common-tables.txt | 54 +++++++++++++++++++++++++++++++++- 4 files changed, 63 insertions(+), 7 deletions(-) diff --git a/doc/THANKS b/doc/THANKS index 864f6986f..ca39fabb6 100644 --- a/doc/THANKS +++ b/doc/THANKS @@ -232,6 +232,9 @@ Enrico Milanese Anton Mogilin for reporting a few bugs +Anastasios Monachos + for providing some useful data + Alejo Murillo Moya for suggesting a feature diff --git a/lib/core/common.py b/lib/core/common.py index 168e9d3e1..b10b21cb8 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -1309,15 +1309,16 @@ def initCommonOutputs(): cfile.close() -def getFileItems(filename): +def getFileItems(filename, commentPrefix='#'): retVal = [] checkFile(filename) ifile = codecs.open(filename, 'r', conf.dataEncoding) for line in ifile.readlines(): # xreadlines doesn't return unicode strings when codec.open() is used - if line.find('#') != -1: - line = line[:line.find('#')] + if commentPrefix: + if line.find(commentPrefix) != -1: + line = line[:line.find(commentPrefix)] line = line.strip() if line: retVal.append(line) diff --git a/plugins/generic/enumeration.py b/plugins/generic/enumeration.py index 3f593d9fb..e49515682 100644 --- a/plugins/generic/enumeration.py +++ b/plugins/generic/enumeration.py @@ -702,7 +702,7 @@ class Enumeration: errMsg = "information_schema not available, " errMsg += "back-end DBMS is MySQL < 5.0" logger.error(errMsg) - + message = "do you want to use common table existance check? [Y/n/q]" test = readInput(message, default="Y") @@ -710,7 +710,7 @@ class Enumeration: return elif test[0] in ("q", "Q"): raise sqlmapUserQuitException - else: + else: return self.tableExists(paths.COMMON_TABLES) self.forceDbmsEnum() @@ -827,7 +827,7 @@ class Enumeration: return kb.data.cachedTables def tableExists(self, tableFile): - tables = getFileItems(tableFile) + tables = getFileItems(tableFile, None) retVal = [] infoMsg = "checking tables existence using items from '%s'" % tableFile logger.info(infoMsg) diff --git a/txt/common-tables.txt b/txt/common-tables.txt index 2c9be8c84..b26b2cc66 100644 --- a/txt/common-tables.txt +++ b/txt/common-tables.txt @@ -1637,6 +1637,7 @@ SPACE geo_Sea DATA_ORG Contributor + jos_vm_product_download jos_vm_coupons jos_vm_product_reviews @@ -1721,10 +1722,61 @@ jos_vm_product_relations jos_core_acl_aro_sections jos_vm_order_history jos_banner + php_users ALL_USERS banned_users users_tmp users_club publicusers -cmsusers \ No newline at end of file +cmsusers + +blacklist +cost +moves +pelates +tamio +tameio +xristes +zones +tamio_pelates +kwdikos +addressbookgrp +sendmsgs +publicationauthor +publicationfile +topicpublication +userrights +comp_group +computers_ID +event_log +networking +routing +software_licenses +ips +arxeia +SMS_TABLE +TABLE_PRIVILEGE_MAP +AMUSER +CONTACTTYPE +CONTENT +DOWNLOADGROUP +DOWNLOADS +DOWNLOADTYPE +EMAIL +ENQUIRY +FACTSHEET +FUND +FUNDGROUP +HISTORY +MANAGEMENTGROUP +SUBSCRIBE +TBLUSERS +TBLLIST +TBLLOG +TBLPROFILES +TBLREPORTS +TBLTRANSACTIONS +TBLRETAILUSERS +TBLCORPUSERS +TBLCORPORATEUSERS