>
Creating the improved capability for torture is itself immoral IMO.I can agree with that. Creating is an act and acts can have morality, hence brandishing at somebody is immoral as well. The inanimate object you create is still amoral though. I might put you on trial for war crimes for advancing the state of the art of torture, then go on to use your torture device in a moral way, by putting it on display to serve as a warning to future generations.
To bring this discussion back to the topic of software, distribution of software is an act and can be judged as immoral or moral. Depending on the nature of your software, it may be immoral to distribute it indiscriminately to the general public. Some people will probably find that contentious, but I think the possibility is definitely there. On the other hand, depending again on the nature of your creation, it might be immoral to not give it to the general public. Imagine if Alexander Fleming was a misanthrope and took the secret of penicillin to the grave.