https://www.lexico.com/en/definition/fair
... by fair means or foul
literary, humorous
Using whatever means are necessary.
‘they were determined to ensure victory for themselves, by fair means or foul’ ...
https://idioms.thefreedictionary.com/by+fair+...
by fair means or foul
By any means necessary—moral or not. A: "But we're not allowed to submit more than one entry per person." B: "Oh, forget that—we are winning this contest by fair means or foul!"
See also: by, fair, foul, mean
Farlex Dictionary of Idioms. © 2015 Farlex, Inc, all rights reserved. ...
https://dictionary.cambridge.org/dictionary/e...
by fair means or foul
If you try to achieve something by fair means or foul, you use any method you can to achieve it, even if it is not honest or fair. ...
https://www.collinsdictionary.com/dictionary/...
by fair means or foul
phrase [PHRASE after verb]
If someone tries to achieve something by fair means or foul, they use every means possible in order to achieve it, and they do not care if their behaviour is dishonest or unfair.
They will only be satisfied if they regain control–by fair means or foul. ...