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

Skip to content

Commit cadbddd

Browse files
committed
Adding a boundary proposed in Issue #564
1 parent 7718eda commit cadbddd

2 files changed

Lines changed: 5 additions & 266 deletions

File tree

lib/core/agent.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,10 @@ def suffixQuery(self, expression, comment=None, suffix=None, where=None):
229229
pass
230230

231231
elif suffix and not comment:
232-
expression += " %s" % suffix
232+
if suffix.startswith(GENERIC_SQL_COMMENT):
233+
expression += "%s" % suffix
234+
else:
235+
expression += " %s" % suffix
233236

234237
return re.sub(r"(?s);\W*;", ";", expression)
235238

xml/payloads.xml

Lines changed: 1 addition & 265 deletions
Original file line numberDiff line numberDiff line change
@@ -229,277 +229,13 @@ Formats:
229229
-->
230230

231231
<root>
232-
<!-- Generic boundaries -->
233-
<boundary>
234-
<level>3</level>
235-
<clause>1</clause>
236-
<where>1,2</where>
237-
<ptype>1</ptype>
238-
<prefix>)</prefix>
239-
<suffix></suffix>
240-
</boundary>
241-
242-
<boundary>
243-
<level>4</level>
244-
<clause>1</clause>
245-
<where>1,2</where>
246-
<ptype>2</ptype>
247-
<prefix>')</prefix>
248-
<suffix></suffix>
249-
</boundary>
250-
251-
<boundary>
252-
<level>3</level>
253-
<clause>1,2,3</clause>
254-
<where>1,2</where>
255-
<ptype>2</ptype>
256-
<prefix>'</prefix>
257-
<suffix></suffix>
258-
</boundary>
259-
260-
<boundary>
261-
<level>5</level>
262-
<clause>1</clause>
263-
<where>1,2</where>
264-
<ptype>4</ptype>
265-
<prefix>"</prefix>
266-
<suffix></suffix>
267-
</boundary>
268-
<!-- End of generic boundaries -->
269-
270-
<!-- WHERE/HAVING clause boundaries -->
271232
<boundary>
272233
<level>1</level>
273234
<clause>1</clause>
274235
<where>1,2</where>
275236
<ptype>1</ptype>
276-
<prefix>)</prefix>
277-
<suffix>AND ([RANDNUM]=[RANDNUM]</suffix>
278-
</boundary>
279-
280-
<boundary>
281-
<level>2</level>
282-
<clause>1</clause>
283-
<where>1,2</where>
284-
<ptype>1</ptype>
285-
<prefix>))</prefix>
286-
<suffix>AND (([RANDNUM]=[RANDNUM]</suffix>
287-
</boundary>
288-
289-
<boundary>
290-
<level>3</level>
291-
<clause>1</clause>
292-
<where>1,2</where>
293-
<ptype>1</ptype>
294-
<prefix>)))</prefix>
295-
<suffix>AND ((([RANDNUM]=[RANDNUM]</suffix>
296-
</boundary>
297-
298-
<boundary>
299-
<level>1</level>
300-
<clause>0</clause>
301-
<where>1,2,3</where>
302-
<ptype>1</ptype>
303237
<prefix></prefix>
304-
<suffix></suffix>
305-
</boundary>
306-
307-
<boundary>
308-
<level>1</level>
309-
<clause>1</clause>
310-
<where>1,2</where>
311-
<ptype>2</ptype>
312-
<prefix>')</prefix>
313-
<suffix>AND ('[RANDSTR]'='[RANDSTR]</suffix>
314-
</boundary>
315-
316-
<boundary>
317-
<level>2</level>
318-
<clause>1</clause>
319-
<where>1,2</where>
320-
<ptype>2</ptype>
321-
<prefix>'))</prefix>
322-
<suffix>AND (('[RANDSTR]'='[RANDSTR]</suffix>
323-
</boundary>
324-
325-
<boundary>
326-
<level>3</level>
327-
<clause>1</clause>
328-
<where>1,2</where>
329-
<ptype>2</ptype>
330-
<prefix>')))</prefix>
331-
<suffix>AND ((('[RANDSTR]'='[RANDSTR]</suffix>
332-
</boundary>
333-
334-
<boundary>
335-
<level>1</level>
336-
<clause>1</clause>
337-
<where>1,2</where>
338-
<ptype>2</ptype>
339-
<prefix>'</prefix>
340-
<suffix>AND '[RANDSTR]'='[RANDSTR]</suffix>
341-
</boundary>
342-
343-
<boundary>
344-
<level>2</level>
345-
<clause>1</clause>
346-
<where>1,2</where>
347-
<ptype>3</ptype>
348-
<prefix>')</prefix>
349-
<suffix>AND ('[RANDSTR]' LIKE '[RANDSTR]</suffix>
350-
</boundary>
351-
352-
<boundary>
353-
<level>3</level>
354-
<clause>1</clause>
355-
<where>1,2</where>
356-
<ptype>3</ptype>
357-
<prefix>'))</prefix>
358-
<suffix>AND (('[RANDSTR]' LIKE '[RANDSTR]</suffix>
359-
</boundary>
360-
361-
<boundary>
362-
<level>4</level>
363-
<clause>1</clause>
364-
<where>1,2</where>
365-
<ptype>3</ptype>
366-
<prefix>')))</prefix>
367-
<suffix>AND ((('[RANDSTR]' LIKE '[RANDSTR]</suffix>
368-
</boundary>
369-
370-
<boundary>
371-
<level>2</level>
372-
<clause>1</clause>
373-
<where>1,2</where>
374-
<ptype>3</ptype>
375-
<prefix>'</prefix>
376-
<suffix>AND '[RANDSTR]' LIKE '[RANDSTR]</suffix>
377-
</boundary>
378-
379-
<boundary>
380-
<level>2</level>
381-
<clause>1</clause>
382-
<where>1,2</where>
383-
<ptype>4</ptype>
384-
<prefix>")</prefix>
385-
<suffix>AND ("[RANDSTR]"="[RANDSTR]</suffix>
386-
</boundary>
387-
388-
<boundary>
389-
<level>3</level>
390-
<clause>1</clause>
391-
<where>1,2</where>
392-
<ptype>4</ptype>
393-
<prefix>"))</prefix>
394-
<suffix>AND (("[RANDSTR]"="[RANDSTR]</suffix>
395-
</boundary>
396-
397-
<boundary>
398-
<level>4</level>
399-
<clause>1</clause>
400-
<where>1,2</where>
401-
<ptype>4</ptype>
402-
<prefix>")))</prefix>
403-
<suffix>AND ((("[RANDSTR]"="[RANDSTR]</suffix>
404-
</boundary>
405-
406-
<boundary>
407-
<level>2</level>
408-
<clause>1</clause>
409-
<where>1,2</where>
410-
<ptype>4</ptype>
411-
<prefix>"</prefix>
412-
<suffix>AND "[RANDSTR]"="[RANDSTR]</suffix>
413-
</boundary>
414-
415-
<boundary>
416-
<level>3</level>
417-
<clause>1</clause>
418-
<where>1,2</where>
419-
<ptype>5</ptype>
420-
<prefix>")</prefix>
421-
<suffix>AND ("[RANDSTR]" LIKE "[RANDSTR]</suffix>
422-
</boundary>
423-
424-
<boundary>
425-
<level>4</level>
426-
<clause>1</clause>
427-
<where>1,2</where>
428-
<ptype>5</ptype>
429-
<prefix>"))</prefix>
430-
<suffix>AND (("[RANDSTR]" LIKE "[RANDSTR]</suffix>
431-
</boundary>
432-
433-
<boundary>
434-
<level>5</level>
435-
<clause>1</clause>
436-
<where>1,2</where>
437-
<ptype>5</ptype>
438-
<prefix>")))</prefix>
439-
<suffix>AND ((("[RANDSTR]" LIKE "[RANDSTR]</suffix>
440-
</boundary>
441-
442-
<boundary>
443-
<level>3</level>
444-
<clause>1</clause>
445-
<where>1,2</where>
446-
<ptype>5</ptype>
447-
<prefix>"</prefix>
448-
<suffix>AND "[RANDSTR]" LIKE "[RANDSTR]</suffix>
449-
</boundary>
450-
451-
<boundary>
452-
<level>2</level>
453-
<clause>1</clause>
454-
<where>1,2</where>
455-
<ptype>2</ptype>
456-
<prefix>%')</prefix>
457-
<suffix>AND ('%'='</suffix>
458-
</boundary>
459-
460-
<boundary>
461-
<level>3</level>
462-
<clause>1</clause>
463-
<where>1,2</where>
464-
<ptype>2</ptype>
465-
<prefix>%'))</prefix>
466-
<suffix>AND (('%'='</suffix>
467-
</boundary>
468-
469-
<boundary>
470-
<level>4</level>
471-
<clause>1</clause>
472-
<where>1,2</where>
473-
<ptype>2</ptype>
474-
<prefix>%')))</prefix>
475-
<suffix>AND ((('%'='</suffix>
476-
</boundary>
477-
478-
<boundary>
479-
<level>1</level>
480-
<clause>1</clause>
481-
<where>1,2</where>
482-
<ptype>2</ptype>
483-
<prefix>%'</prefix>
484-
<suffix>AND '%'='</suffix>
485-
</boundary>
486-
487-
<boundary>
488-
<level>5</level>
489-
<clause>1</clause>
490-
<where>1,2</where>
491-
<ptype>2</ptype>
492-
<prefix>%00')</prefix>
493-
<suffix>AND ('[RANDSTR]'='[RANDSTR]</suffix>
494-
</boundary>
495-
496-
<boundary>
497-
<level>4</level>
498-
<clause>1</clause>
499-
<where>1,2</where>
500-
<ptype>2</ptype>
501-
<prefix>%00'</prefix>
502-
<suffix>AND '[RANDSTR]'='[RANDSTR]</suffix>
238+
<suffix>-- [RANDSTR]</suffix>
503239
</boundary>
504240
<!-- End of WHERE/HAVING clause boundaries -->
505241

0 commit comments

Comments
 (0)