Has anyone written a script like this?

I've whipped up a very simple version today, but it doesn't yet handle
binary/octet attributes and can only update one attribute at a time.

I've got a specific use case for this, only need to update one
attribute that is binary/octet, but wondering if there already exists a
more generic solution.