From 1632bec10b68d2d3e200b0ff976224a7771370a4 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 3 Apr 2014 09:05:12 +0200 Subject: [PATCH] Another fix related to the last commit --- lib/core/agent.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/core/agent.py b/lib/core/agent.py index ef63af51f..11abd2870 100644 --- a/lib/core/agent.py +++ b/lib/core/agent.py @@ -44,10 +44,10 @@ class Agent(object): def payloadDirect(self, query): query = self.cleanupPayload(query) - if query.startswith("AND "): - query = query.replace("AND ", "SELECT ", 1) - elif query.startswith(" UNION ALL "): - query = query.replace(" UNION ALL ", "", 1) + if query.upper().startswith("AND "): + query = re.sub(r"(?i)AND ", "SELECT ", query, 1) + elif query.upper().startswith(" UNION ALL "): + query = re.sub(r"(?i) UNION ALL ", "", query, 1) elif query.startswith("; "): query = query.replace("; ", "", 1)