mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-26 15:57:16 +00:00
fix: [UI Decoded items] fix download decoded file
This commit is contained in:
parent
8f44a8d2c6
commit
5475660785
2 changed files with 6 additions and 6 deletions
|
@ -162,8 +162,6 @@ def get_correlation_node_icon(correlation_name, correlation_type=None, value=Non
|
|||
|
||||
elif correlation_name == 'decoded':
|
||||
node_color = '#88CCEE'
|
||||
print(Decoded.get_decoded_item_type(value))
|
||||
print(value)
|
||||
correlation_type = Decoded.get_decoded_item_type(value).split('/')[0]
|
||||
if correlation_type == 'application':
|
||||
icon_text = '\uf15b'
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
'''
|
||||
import redis
|
||||
import os
|
||||
import sys
|
||||
import datetime
|
||||
import json
|
||||
from Date import Date
|
||||
|
@ -20,6 +21,9 @@ from flask import Flask, render_template, jsonify, request, Blueprint, redirect,
|
|||
from Role_Manager import login_admin, login_analyst, login_read_only
|
||||
from flask_login import login_required
|
||||
|
||||
sys.path.append(os.path.join(os.environ['AIL_BIN'], 'lib'))
|
||||
import Decoded
|
||||
|
||||
# ============ VARIABLES ============
|
||||
import Flask_config
|
||||
|
||||
|
@ -705,8 +709,7 @@ def downloadHash():
|
|||
# hash exist
|
||||
if r_serv_metadata.hget('metadata_hash:'+hash, 'estimated_type') is not None:
|
||||
|
||||
b64_path = r_serv_metadata.hget('metadata_hash:'+hash, 'saved_path')
|
||||
b64_full_path = os.path.join(os.environ['AIL_HOME'], b64_path)
|
||||
b64_full_path = Decoded.get_decoded_filepath(hash)
|
||||
hash_content = ''
|
||||
try:
|
||||
with open(b64_full_path, 'rb') as f:
|
||||
|
@ -1079,8 +1082,7 @@ def hash_types():
|
|||
def send_file_to_vt_js():
|
||||
hash = request.args.get('hash')
|
||||
|
||||
b64_path = r_serv_metadata.hget('metadata_hash:'+hash, 'saved_path')
|
||||
b64_full_path = os.path.join(os.environ['AIL_HOME'], b64_path)
|
||||
b64_full_path = Decoded.get_decoded_filepath(hash)
|
||||
b64_content = ''
|
||||
with open(b64_full_path, 'rb') as f:
|
||||
b64_content = f.read()
|
||||
|
|
Loading…
Reference in a new issue