chg: [Hash] add Help on graph node

This commit is contained in:
Terrtia 2018-08-24 11:40:09 +02:00
parent a586548047
commit e6b583ee7a
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0
2 changed files with 28 additions and 5 deletions

View file

@ -62,7 +62,7 @@ def get_file_icon(estimated_type):
file_type = estimated_type.split('/')[0] file_type = estimated_type.split('/')[0]
# set file icon # set file icon
if file_type == 'application': if file_type == 'application':
file_icon = 'fa-file-o ' file_icon = 'fa-file '
elif file_type == 'audio': elif file_type == 'audio':
file_icon = 'fa-file-video-o ' file_icon = 'fa-file-video-o '
elif file_type == 'image': elif file_type == 'image':
@ -70,7 +70,7 @@ def get_file_icon(estimated_type):
elif file_type == 'text': elif file_type == 'text':
file_icon = 'fa-file-text-o' file_icon = 'fa-file-text-o'
else: else:
file_icon = 'fa-file' file_icon = 'fa-file-o'
return file_icon return file_icon
@ -380,8 +380,6 @@ def decoder_type_json():
if not date_range: if not date_range:
date_range.append(datetime.date.today().strftime("%Y%m%d")) date_range.append(datetime.date.today().strftime("%Y%m%d"))
print(date_range)
nb_decoded = {} nb_decoded = {}
for decoder in all_decoder: for decoder in all_decoder:
nb_decoded[decoder] = 0 nb_decoded[decoder] = 0
@ -583,7 +581,7 @@ def send_file_to_vt_js():
files = {'file': (hash, b64_content)} files = {'file': (hash, b64_content)}
response = requests.post('https://www.virustotal.com/vtapi/v2/file/scan', files=files, params= {'apikey': vt_auth}) response = requests.post('https://www.virustotal.com/vtapi/v2/file/scan', files=files, params= {'apikey': vt_auth})
json_response = response.json() json_response = response.json()
print(json_response) #print(json_response)
vt_link = json_response['permalink'].split('analysis')[0] + 'analysis/' vt_link = json_response['permalink'].split('analysis')[0] + 'analysis/'
r_serv_metadata.hset('metadata_hash:'+hash, 'vt_link', vt_link) r_serv_metadata.hset('metadata_hash:'+hash, 'vt_link', vt_link)

View file

@ -194,6 +194,31 @@
<button class="btn btn-primary" onclick="resize_graph();"> <button class="btn btn-primary" onclick="resize_graph();">
<span class="glyphicon glyphicon-refresh"></span>&nbsp;Resize Graph</div> <span class="glyphicon glyphicon-refresh"></span>&nbsp;Resize Graph</div>
</button> </button>
<ul class="list-group">
<li class="list-group-item list-group-item-info" style="text-align:center;"><i class="fa fa-info-circle fa-2x"></i></li>
<li class="list-group-item">
<p>Double click on a node to open Hash/Paste<br><br>
<svg height="12" width="12"><g class="nodes"><circle cx="6" cy="6" r="6" fill="orange"></circle></g></svg>
Current Hash<br>
<svg height="12" width="12"><g class="nodes"><circle cx="6" cy="6" r="6" fill="rgb(141, 211, 199)"></circle></g></svg>
Hashs<br>
<svg height="12" width="12"><g class="nodes"><circle cx="6" cy="6" r="6" fill="#1f77b4"></circle></g></svg>
Pastes
</p>
</li>
<li class="list-group-item list-group-item-info">
Hash Types:
</li>
<li class="list-group-item">
<i class="fa fa-file"></i> Application<br>
<i class="fa fa-file-video-o"></i> Audio<br>
<i class="fa fa-file-image-o"></i> Image<br>
<i class="fa fa-file-text-o"></i> Text<br>
<i class="fa fa-file-o"></i> Other
</li>
</ul>
</div> </div>
</div> </div>
</div> </div>