Add support for DEAI banstack trigger

This commit is contained in:
blank X 2020-10-21 21:28:13 +07:00
parent feafe46cae
commit cf912a4a72
1 changed files with 6 additions and 2 deletions

View File

@ -136,8 +136,12 @@ async def get_deai(client, entity):
text += f'--- {i}\n' text += f'--- {i}\n'
text += f'- <b>Risk Factor:</b> {match.group(2).capitalize()}\n' text += f'- <b>Risk Factor:</b> {match.group(2).capitalize()}\n'
text += f'- <b>Module:</b> {DEAI_MODULE_CODES.get(match.group(3), match.group(3))}' text += f'- <b>Module:</b> {DEAI_MODULE_CODES.get(match.group(3), match.group(3))}'
if (match.group(4) or '').strip(): comment = (match.group(4) or '').strip()
text += f'\n- <b>Comment:</b> {html.escape(match.group(4).strip())}' if comment:
text += f'\n- <b>Comment:</b> {html.escape(comment)}'
match = re.match(r'^banstack trigger:0x(\d{2})$', comment)
if match:
text += f'\n- <b>Banstack Trigger Code:</b> {DEAI_BAN_CODES.get(match.group(1), "0x" + match.group(1))}'
return text return text
return '- <b>404:</b> Not Found' return '- <b>404:</b> Not Found'