Dogs spread worms to other dogs quite easy and get them from just simply playing in the dirt sharing food and water and you can also get them.
Worms can kill your dog or puppy my great dane got whip worms and luckily my vet donated there surgery and other organizations donated as well or he would be dead they did extreme internal damage to intestines and stomach please save yourselves the heart ache worm your dogs regularly and do not use homemade things etc.
Most of them do not work that well and do not kill all kinds of worms don't lose your dog dewormer don't cost that much make sure they cover whip round hook pin tape worms and get monthly heart worm med for months recommended for your area.
Don't go through what I did seeing your pet almost die is not something you want to do please take care of your pets ask questions to vets other people mean well but don't always know and you could make a fatal mistake by trusting just what someone says always ask vet and if you don't like there answer consult a different vet for second opinion..