test patries expansion

pull/197/head
Sebdraven 2018-06-20 12:32:54 +02:00
parent 8ae7210aef
commit c14d05adef
1 changed files with 28 additions and 21 deletions

View File

@ -62,32 +62,39 @@ def handle_ip(api, ip, misperrors):
r, status_ok = expand_syscan(api, ip, misperrors) r, status_ok = expand_syscan(api, ip, misperrors)
# if status_ok:
# result_filtered['results'].append(r)
# else:
# misperrors['error'] = "Error syscan result"
r,status_ok = expand_pastries(api,misperrors,ip=ip)
if status_ok: if status_ok:
result_filtered['results'].append(r) result_filtered['results'].append(r)
else: else:
misperrors['error'] = "Error syscan result" misperrors['error'] = 'Error pastries result'
return misperrors return misperrors
r, status_ok = expand_datascan(api, misperrors, ip=ip) # r, status_ok = expand_datascan(api, misperrors, ip=ip)
#
if status_ok: # if status_ok:
result_filtered['results'].append(r) # result_filtered['results'].append(r)
else: # else:
return r # return r
#
r, status_ok = expand_forward(api, ip, misperrors) # r, status_ok = expand_forward(api, ip, misperrors)
#
if status_ok: # if status_ok:
result_filtered['results'].append(r) # result_filtered['results'].append(r)
else: # else:
return r # return r
#
r, status_ok = expand_reverse(api, ip, misperrors) # r, status_ok = expand_reverse(api, ip, misperrors)
#
if status_ok: # if status_ok:
result_filtered['results'].append(r) # result_filtered['results'].append(r)
else: # else:
return r # return r
return result_filtered return result_filtered