Are these the white/yellow mothballs? and will they keep out squirrels and birds from the attic?

I was having problems with rats in my attic. I mounted a couple of strobe lights that flash continuously about once a second in the attic. Rats were gone by the next day.
Do not spread them around but rather put them in bowls or boxes so you can pick them up if the smell is too strong.