You offer script "where nonce and privatekey cannot be more than 240 bit"
My script can recover keys with the same conditions.
now my is stable up to 252 bit. and yours? Ps. of course you have script, becouse it is math, the problem is with precision , and it depends form kind of algo you will use, sometimes must be somethng changing, but you have not ansered, what kind algo? if you don;t know then you have use one of google scipt.