If you lie down with dogs, you'll get up with fleas.
"If you associate with dishonest or disreputable people, you are likely to acquire their undesirable qualities."
Source for meaning: Martin H. Manser (2007). The Facts on File Dictionary of Proverbs. Infobase Publishing. p. 138.
Mieder, Wolfgang; Kingsbury, Stewart A.; Harder, Kelsie B. (1992). A Dictionary of American proverbs. p. 224.