Hi and Welcome to HCM,
Extreme foul smelling in this case may be due to amebiasis
. Motion lab studies can be done for further diagnosis. If you have amebiasis it can be treated with MetroGel
400 mg twice a day along with antibiotics. There may be possibilities of bacterial infection since there is piles in the anus. Further investigation with your doctor is necessary.
Wish you speedy recovery