Share target that executes simple script

Is there any android application that would allow me to create a share target (by user configuration) and execute simple script (eg. shell or javascript) when something is sent to this target? I could write my own full-blown app, but I somehow feel it would be an overkill.