|
|
@@ -1467,17 +1467,15 @@ def cmd_search(options, persona, objstr, cache): |
|
|
|
except KeyError: |
|
|
|
return False |
|
|
|
|
|
|
|
r = [ x for x in objstr if x.type == 'file' and testfun(x) ] |
|
|
|
r = ( x for x in objstr if x.type == 'file' and testfun(x) ) |
|
|
|
|
|
|
|
if _type == 'file': |
|
|
|
r = [ objstr.by_hash(x['hashes'][0]) for x in r ] |
|
|
|
r = [ [ y for y in x if y['type'] == 'file' ] for x in r ] |
|
|
|
r = sum(r, []) |
|
|
|
r = [ x.fullname for x in r ] |
|
|
|
r = ( x.fullname for x in r ) |
|
|
|
else: |
|
|
|
raise ValueError('unhandled type: %s' % repr(_type)) |
|
|
|
|
|
|
|
print('\n'.join(r)) |
|
|
|
for i in r: |
|
|
|
print(i) |
|
|
|
|
|
|
|
def main(): |
|
|
|
import argparse |
|
|
|