def METHOD_NAME(self, entry):
    if entry["eventid"] == "cowrie.session.file_download":
        log.msg("Sending file to Cuckoo")
        p = urlparse(entry["url"]).path
        if p == "":
            fileName = entry["shasum"]
        else:
            b = os.path.basename(p)
            if b == "":
                fileName = entry["shasum"]
            else:
                fileName = b
        if (
            self.cuckoo_force
            or self.cuckoo_check_if_dup(os.path.basename(entry["outfile"])) is False
        ):
            self.postfile(entry["outfile"], fileName)
    elif entry["eventid"] == "cowrie.session.file_upload":
        if (
            self.cuckoo_force
            or self.cuckoo_check_if_dup(os.path.basename(entry["outfile"])) is False
        ):
            log.msg("Sending file to Cuckoo")
            self.postfile(entry["outfile"], entry["filename"])