lookyloo/lookyloo.py
def hash_lookup(self, blob_hash: str, url: str, capture_uuid: str) -> Tuple[int, Dict[str, List[Tuple[str, str, str, str, str]]]]:
        '''Search all the captures a specific hash was seen.
        If a URL is given, it splits the results if the hash is seen on the same URL or an other one.
        Capture UUID avoids duplicates on the same capture'''
        captures_list: Dict[str, List[Tuple[str, str, str, str, str]]] = {'same_url': [], 'different_url': []}
        total_captures, details = self.indexing.get_body_hash_captures(blob_hash, url, filter_capture_uuid=capture_uuid)
        for h_capture_uuid, url_uuid, url_hostname, same_url in details:
            cache = self.capture_cache(h_capture_uuid)
            if cache:
                if same_url:
                    captures_list['same_url'].append((h_capture_uuid, url_uuid, cache.title, cache.timestamp.isoformat(), url_hostname))
                else:
                    captures_list['different_url'].append((h_capture_uuid, url_uuid, cache.title, cache.timestamp.isoformat(), url_hostname))
        return total_captures, captures_list
Search all the captures a specific hash was seen.
        If a URL is given, it splits the results if the hash is seen on the same URL or an other one.
        Capture UUID avoids duplicates on the same capture
Search all the captures a specific hash was seen.
If a URL is given, it splits the results if the hash is seen on the same URL or an other one.
Capture UUID avoids duplicates on the same capture
Search all the captures a specific hash was seen . If a URL is given it splits the results if the hash is seen on the same URL or an other one . Capture UUID avoids duplicates on the same capture
def hash_lookup(self, blob_hash: str, url: str, capture_uuid: str) -> Tuple[int, Dict[str, List[Tuple[str, str, str, str, str]]]]:
        captures_list: Dict[str, List[Tuple[str, str, str, str, str]]] = {'same_url': [], 'different_url': []}
        total_captures, details = self.indexing.get_body_hash_captures(blob_hash, url, filter_capture_uuid=capture_uuid)
        for h_capture_uuid, url_uuid, url_hostname, same_url in details:
            cache = self.capture_cache(h_capture_uuid)
            if cache:
                if same_url:
                    captures_list['same_url'].append((h_capture_uuid, url_uuid, cache.title, cache.timestamp.isoformat(), url_hostname))
                else:
                    captures_list['different_url'].append((h_capture_uuid, url_uuid, cache.title, cache.timestamp.isoformat(), url_hostname))
        return total_captures, captures_list
def hash_lookup ( self , blob_hash : str , url : str , capture_uuid : str ) -> Tuple [ int , Dict [ str , List [ Tuple [ str , str , str , str , str ] ] ] ] : captures_list : Dict [ str , List [ Tuple [ str , str , str , str , str ] ] ] = { 'same_url' : [ ] , 'different_url' : [ ] } total_captures , details = self . indexing . get_body_hash_captures ( blob_hash , url , filter_capture_uuid = capture_uuid ) for h_capture_uuid , url_uuid , url_hostname , same_url in details : cache = self . capture_cache ( h_capture_uuid ) if cache : if same_url : captures_list [ 'same_url' ] . append ( ( h_capture_uuid , url_uuid , cache . title , cache . timestamp . isoformat ( ) , url_hostname ) ) else : captures_list [ 'different_url' ] . append ( ( h_capture_uuid , url_uuid , cache . title , cache . timestamp . isoformat ( ) , url_hostname ) ) return total_captures , captures_list
Search all the captures a specific hash was seen.
Search all the captures a specific hash was seen .
'''Search all the captures a specific hash was seen.
        If a URL is given, it splits the results if the hash is seen on the same URL or an other one.
        Capture UUID avoids duplicates on the same capture'''
self
blob_hash
str
url
str
capture_uuid
str