I personally obtained the droid assassin rifle from HK-50's remains. Looting defeated HK-series droids is a reliable way to come across it during your playthrough of Knights of the Old Republic II.