As far as I know, the safe and blocked lists are not supported in the object model so you can't use a script to update them. Sorry. You could use a script to save the address to a text file then copy that to the blocked list, but keep in mind that the blocked /safe lists support a limited number of entries. If the rule is working, you should use it over adding names to the list, especially spammer domains as they change often.