@@ -179,7 +179,7 @@ def validateChar(idx, value):
179179
180180 return not result
181181
182- def getChar (idx , charTbl = asciiTbl , continuousOrder = True , expand = charsetType is None , shiftTable = None ):
182+ def getChar (idx , charTbl = None , continuousOrder = True , expand = charsetType is None , shiftTable = None ):
183183 """
184184 continuousOrder means that distance between each two neighbour's
185185 numerical values is exactly 1
@@ -190,6 +190,9 @@ def getChar(idx, charTbl=asciiTbl, continuousOrder=True, expand=charsetType is N
190190 if result :
191191 return result
192192
193+ if charTbl is None :
194+ charTbl = list (asciiTbl )
195+
193196 originalTbl = list (charTbl )
194197
195198 if continuousOrder and shiftTable is None :
@@ -199,7 +202,10 @@ def getChar(idx, charTbl=asciiTbl, continuousOrder=True, expand=charsetType is N
199202 if CHAR_INFERENCE_MARK in payload and ord ('\n ' ) in charTbl :
200203 charTbl .remove (ord ('\n ' ))
201204
202- if len (charTbl ) == 1 :
205+ if not charTbl :
206+ return None
207+
208+ elif len (charTbl ) == 1 :
203209 forgedPayload = safeStringFormat (payload .replace (INFERENCE_GREATER_CHAR , INFERENCE_EQUALS_CHAR ), (expressionUnescaped , idx , charTbl [0 ]))
204210 result = Request .queryPage (forgedPayload , timeBasedCompare = timeBasedCompare , raise404 = False )
205211 incrementCounter (kb .technique )
0 commit comments