def getSimpleParamFromCode_POST(code): """ Using the regular expression above, try to get some parameters name """ params = [] # we can have multiple params... code = code.replace("'", '') code = code.replace('"', '') if code.lower().count('post') > 0: # try to match the $_GET if reParamPOST.match(code): out = reParamPOST.search(code) params.append(out.group(2)) params.append(getSimpleParamFromCode_POST(out.group(3))) params = flatten(params) return params
def getSimpleParamFromCode_POST(code): """ Using the regular expression above, try to get some parameters name """ params = [] # we can have multiple params... code = code.replace("'",''); code = code.replace('"',''); if code.lower().count('post') > 0: # try to match the $_GET if reParamPOST.match(code): out = reParamPOST.search(code) params.append(out.group(2)) params.append(getSimpleParamFromCode_POST(out.group(3))) params = flatten(params) return params