#NEWLINE# def search( self , ip , top = False ) : #NEWLINE# #INDENT# " Allows you to search the reputation database on a destination IP address\n            If found, returns a list of RepDB entries containing information about IP.\n            Specifying top=true only returns the first entry\n\n        :param ip: IP to search RepDB for\n        :param BOOL top: Returns the 'first' entry if true or 'all' matching entries if false\n        :return: Returns a list of results, or False if no results\n        " #NEWLINE# results = [ ] #NEWLINE# for entry in self : #NEWLINE# #INDENT# if ( netaddr . IPNetwork ( ip ) . network in netaddr . IPNetwork ( entry [ 'ip' ] ) ) : #NEWLINE# #INDENT# if top : #NEWLINE# #INDENT# results . append ( entry ) #NEWLINE# return results #NEWLINE# #UNINDENT# results . append ( entry ) #NEWLINE# #UNINDENT# #UNINDENT# return results