If you want them to suffer. ( like they've made us) you can put them in a water bottle with sun lotion. If you want to get rid of them and out of your house get spray sun lotion ( doesent matter SPF) and spray the outside wall of your house they'll die
As it is extremely difficult to get rid of worms getting in large numbers into your house after it rains you get rid of the house! It is easier and definitely solves the problem. I did it, moved house.