import requests

SEARCH_URL = 'https://mb-api.abuse.ch/api/v1/'
SAMPLE_URL = "https://bazaar.abuse.ch/sample/{}/"

def search(file_hash):
    r = requests.post(
        SEARCH_URL,
        data={
            "query": "get_info",
            "hash": file_hash
        },
        timeout=30
    )
    
    search_result = r.json()

    if search_result["query_status"] == "hash_not_found":
        return None
    else:
        return SAMPLE_URL.format(search_result["data"][0]["sha256_hash"])

caef67dee218676410aa30b50758f1a6a3609d79
<mask token>

<mask token>


def search(file_hash):
    r = requests.post(SEARCH_URL, data={'query': 'get_info', 'hash':
        file_hash}, timeout=30)
    search_result = r.json()
    if search_result['query_status'] == 'hash_not_found':
        return None
    else:
        return SAMPLE_URL.format(search_result['data'][0]['sha256_hash'])

<mask token>
SEARCH_URL = 'https://mb-api.abuse.ch/api/v1/'
SAMPLE_URL = 'https://bazaar.abuse.ch/sample/{}/'


def search(file_hash):
    r = requests.post(SEARCH_URL, data={'query': 'get_info', 'hash':
        file_hash}, timeout=30)
    search_result = r.json()
    if search_result['query_status'] == 'hash_not_found':
        return None
    else:
        return SAMPLE_URL.format(search_result['data'][0]['sha256_hash'])

import requests
SEARCH_URL = 'https://mb-api.abuse.ch/api/v1/'
SAMPLE_URL = 'https://bazaar.abuse.ch/sample/{}/'


def search(file_hash):
    r = requests.post(SEARCH_URL, data={'query': 'get_info', 'hash':
        file_hash}, timeout=30)
    search_result = r.json()
    if search_result['query_status'] == 'hash_not_found':
        return None
    else:
        return SAMPLE_URL.format(search_result['data'][0]['sha256_hash'])

import requests

SEARCH_URL = 'https://mb-api.abuse.ch/api/v1/'
SAMPLE_URL = "https://bazaar.abuse.ch/sample/{}/"

def search(file_hash):
    r = requests.post(
        SEARCH_URL,
        data={
            "query": "get_info",
            "hash": file_hash
        },
        timeout=30
    )
    
    search_result = r.json()

    if search_result["query_status"] == "hash_not_found":
        return None
    else:
        return SAMPLE_URL.format(search_result["data"][0]["sha256_hash"])
