I don’t see any reason why the script itself wouldn’t be allowed, though I can see lots of ways you could get into trouble using it.
These ways could range from CPU/memory usage issues to possible copyright infringement issues depending on how you use the program and what you are transferring. The usage of the script itself is not likely to be a problem if used wisely ( doesn’t negatively impact the performance of your shared server) and in compliance with the TOS (which is important to avoid “banning” or loss of account).
I suggest you read and understand the DH wiki CPU Resources FAQ, the DH Wiki article on Finding the Causes of Heavy Usage, the material posted in the DreamHost Abuse Center, and the DreamHost Terms of Service.
If after reading through those resources, and evaluating what you want to do in those terms, should you still have a question about whether your intended usage is “allowable”, I suggest you contact DreamHost Support directly to get an authoritative answer.
While we are happy to share out opinions most of the time, we are only customers here like you and our answers are not authoritative about such things.