Skip to content

Commit ef64087

Browse files
committed
add RTT_time_filter.py to httpfuzzerprocessor
Signed-off-by: Timothée Ruffenach <[email protected]>
1 parent 8246fb7 commit ef64087

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Version 1.0
2+
# @author RUFFENACH Timothée
3+
# filter by RTT (time request).
4+
5+
from javax.swing import JFrame, JPanel, JComboBox, JOptionPane,JFileChooser,JOptionPane
6+
7+
# Auxiliary variables/constants needed for processing.
8+
global time,isCheck;
9+
init = False
10+
11+
def getNumber(min,max,asked):
12+
number = JOptionPane.showInputDialog(None, asked, "Input", JOptionPane.QUESTION_MESSAGE)
13+
14+
if int(number) >= min and int(number) <= max:
15+
number = int(number)
16+
return number
17+
else:
18+
JOptionPane.showMessageDialog(None, "Choose number between " + min + " to " + max)
19+
getNumber()
20+
21+
# Called after injecting the payloads and before forward the message to the server.
22+
def processMessage(utils, message) :
23+
if (init == False):
24+
initialise()
25+
26+
def initialise():
27+
global init,entry,isCheck
28+
global time;
29+
time = getNumber(1,50000,"how many time do you want ?")
30+
isCheck = JOptionPane.showConfirmDialog(None, "more high or equal (YES) esle less or equal (NO)", "Confirm", JOptionPane.YES_NO_OPTION)
31+
init = True
32+
33+
34+
# Called after receiving the fuzzed message from the server
35+
def processResult(utils, fuzzResult) :
36+
global isChek,time
37+
if isCheck == JOptionPane.YES_OPTION and (int(fuzzResult.getHttpMessage().getTimeElapsedMillis()) >= time):
38+
return bool(1)
39+
elif isCheck == JOptionPane.NO_OPTION and (int(fuzzResult.getHttpMessage().getTimeElapsedMillis()) <= time):
40+
return bool(1)
41+
else:
42+
return bool(0);
43+
44+

0 commit comments

Comments
 (0)