Thanks for the query.
you might have developed a fungal infection
Which is followed by a bacterial infection.
This might be the reason for pus formation.
You need treatment with both anti fungals as well as oral antibiotics
Please meet a dermatologist
for exact diagnosis.
Let me know if you have any other doubt.
you can ask a direct question to me on this forum, following the below link.
Wishing you a good health.