In Brazilian Portuguese, we have:
"The bird who goes around with a bat wakes up hanging upside down"
Original: "Passarinho que anda com morcego amanhece de cabeça pra baixo"
The literal meaning is that the bat is a bad company (the kind our mothers warn about) and the bird will wake up like a bat, hanging on a branch upside down.
I suspect this kind of humour is more prone to happen in the "New World" than in the old Europe, but maybe all English-speaking people share a similar expression. If not, which expression(s) could be globally understood?