He who has injured thee was either stronger or weaker than thee. If weaker, spare him; if stronger, spare thyself.
This is good advice. But who said it? Must be Shakespeare (that will get you to at least the third page of Google. None of these results, however, offers where and when Shakespeare said or wrote it). My detective nose twitches. Probably not Shakespeare then. Let us see, who else does Google suggest. Seneca? Very possibly. But again we are not offered chapter or verse.
Finally, Bartleby’s 1922 Dictionary of Quotations has it:
Aut potentior te, aut imbecillior læsit: si imbecillior, parce illi; si potentior, tibi. He who has injured thee was either stronger or weaker. If weaker, spare him; if stronger, spare thyself. Seneca—De Ira. III. 5.
We are there, I think! But who, except a suspicious pedant like me, will persevere even unto the bottom of the fifth page of Google in pursuit of the correct attribution?