add as number with onyphe

pull/193/head
Sebdraven 2018-06-08 18:31:08 +02:00
parent cad35b5332
commit 04032d110c
1 changed files with 5 additions and 2 deletions

View File

@ -57,12 +57,15 @@ def handle_expansion(api, ip, misperrors):
result_filtered = {"results": []}
urls_pasties = []
asn_list = []
for r in result['results']:
if r['@category'] == 'pastries':
if r['@type'] == 'pastebin':
urls_pasties.append('https://pastebin.com/raw/%s' % r['key'])
elif r['@category'] == 'synscan':
ans_list = r['asn']
result_filtered['results'].append({'types': ['url'], 'values': urls_pasties})
result_filtered['results'].append({'types': ['AS'], 'values': asn_list})
return result_filtered