It's possible that "by hook or by cook" is a jocular variant, with relevance to the context in which you found it (if that is indeed how it appeared!).
It might help in understanding the expression if you are aware that the word 'crook' also refers to another kind of hook. It's the curved stick traditionally carried by shepherds. Bishops also carry such a thing, although with them it is also referred to as a 'crozier'.