If you are touching cloth, then it is a shart and should be relatively well contained. You just need to clean-up and perhaps discreetly dispose of your undercrackers.
If you are touching socks, then the world has dropped out of your bottom and is pretty disastrous as everything is contaminated. You also have a larger problem as this would suggest you have food poisoning or some kind of illness and this is just the start of your problems. When I was in hospital the guy opposite me got C. difficile and the result was unexpected and borderline volcanic - that wasn’t just a bad day, it was a bad week.
It depends on the severity.