Smudge magic bytes with a known type

def smudge(newtype, target):
    """
        Smudge magic bytes with a known type
    """

    db = smudge_db.get()

    magic_bytes = db[newtype]['magic']
    magic_offset = db[newtype]['offset']

    _backup_bytes(target, magic_offset, len(magic_bytes))
    _smudge_bytes(target, magic_offset, magic_bytes)