Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
Merge pull request #322 from Bidaya0/feature/issue-321
Browse files Browse the repository at this point in the history
add is_need_http_detail
  • Loading branch information
Bidaya0 committed Dec 18, 2021
2 parents ff67f36 + 3e9260d commit d47c3ff
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions iast/views/vul_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ def get_vul(self, auth_agents):
'req_header':
htmlescape(self.parse_request(vul.http_method, vul.uri, vul.req_params,
vul.http_protocol, vul.req_header,
vul.req_data)),
vul.req_data)) if is_need_http_detail(strategy_name) else '',
'response':
htmlescape(self.parse_response(vul.res_header, vul.res_body)),
htmlescape(self.parse_response(vul.res_header, vul.res_body)) if is_need_http_detail(strategy_name) else '',
'graph':
self.parse_graphy(vul.full_stack),
'context_path':
Expand All @@ -251,11 +251,12 @@ def get_vul(self, auth_agents):
'taint_value':
vul.taint_value,
'param_name':
json.loads(vul.param_name) if vul.param_name else {},
parse_param_name(vul.param_name) if vul.param_name else {},
'method_pool_id':
vul.method_pool_id,
'project_id':
project_id
project_id,
'is_need_http_detail': is_need_http_detail(strategy_name),
}

def get_strategy(self):
Expand Down Expand Up @@ -368,6 +369,15 @@ def htmlescape(string):
"6350be97a65823fc42ddd9dc78e17ddf13ff693b",
"<em>")

def is_need_http_detail(name):
return False if name in ['硬编码'] else True

def parse_param_name(param_name):
try:
res = json.dumps(param_name)
return res
except:
return {}

if __name__ == '__main__':
vul = VulDetail()
Expand Down

0 comments on commit d47c3ff

Please sign in to comment.