犬も歩けば棒に当たる(いぬもあるけばぼうにあたる)

Japanese vocabulary

Meaning: bad things happen to those who attempt things; if a dog walks they will hit a stick; good luck may come unexpectedly

See it used in real works