File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # -*- coding: utf-8 -*-
1+ # -*- coding: utf-8 -*-
22
33import json
44from libnmap .reportjson import ReportEncoder
@@ -50,16 +50,18 @@ def get(self, id):
5050 :param id: str
5151 :return: NmapReport
5252 """
53- res = self ._esapi .get (index = self .index , doc_type = "NmapReport" , id = id )['_source' ]
53+ res = self ._esapi .get (index = self .index ,
54+ doc_type = "NmapReport" ,
55+ id = id )['_source' ]
5456 return res
5557
56-
5758 def getall (self , filter = None ):
5859 """
5960 :return: collection of tuple (id,NmapReport)
6061 :param filter: Nice to have implement a filter capability
6162 """
62- rsearch = self ._esapi .search (index = self .index , body = {"query" : {"match_all" : {}}})
63+ rsearch = self ._esapi .search (index = self .index ,
64+ body = {"query" : {"match_all" : {}}})
6365 print ("--------------------" )
6466 print (type (rsearch ))
6567 print (rsearch )
You can’t perform that action at this time.
0 commit comments