I encountered an error while running the code. It seems there's an issue with the file named anomaly.py. The error I received seemed related to unbalanced parenthesis in the regular expressions used for detecting anomalies related to parameter names and values. I was trying to resolve this issue and thought it might need correction in the anomaly.py file.
the changing that I made
... (previous code)
if type(factors['param_missing']) == list:
for param in params.keys():
if len(param) < 5:
continue
if param not in factors['param_missing'] and re.search(r'[\'"\s]%s[\'"\s]' % param, response.text):
return ('param name reflection', params, 'param_missing')
if factors['value_missing']:
for value in params.values():
if type(value) != str or len(value) != 6:
continue
if value in response.text and re.search(r'[\'"\s]%s[\'"\s]' % value, response.text):
return ('param value reflection', params, 'value_missing')
return ('', [], '')
I encountered an error while running the code. It seems there's an issue with the file named anomaly.py. The error I received seemed related to unbalanced parenthesis in the regular expressions used for detecting anomalies related to parameter names and values. I was trying to resolve this issue and thought it might need correction in the anomaly.py file.
the changing that I made
... (previous code)
if type(factors['param_missing']) == list: for param in params.keys(): if len(param) < 5: continue if param not in factors['param_missing'] and re.search(r'[\'"\s]%s[\'"\s]' % param, response.text): return ('param name reflection', params, 'param_missing') if factors['value_missing']: for value in params.values(): if type(value) != str or len(value) != 6: continue if value in response.text and re.search(r'[\'"\s]%s[\'"\s]' % value, response.text): return ('param value reflection', params, 'value_missing') return ('', [], '')