Re: ? Unsafe terminal escape sequences and ANSI codes from decryption
Simon Tatham <[email protected]> Mon, 06 Mar 2023 09:29:00 +0000
| Newsgroups | sci.crypt,alt.security.pgp,alt.bbs,comp.terminals,alt.computer.security |
|---|---|
| Message-ID | <[email protected]> |
"G.K." <[email protected]> writes: > Another distinction occurs to me that might ease the problem > requirement. Is there a cheap way to distinguish between control codes > and formatting codes (color, foreground, background, underline, > blinkenlights) codes in a text stream. 'less -R' does something along those lines. I don't know if the filtering code is conveniently separable from the rest of 'less', but it might be a start: somebody else has already done the work of making a set of decisions about which codes count in which category. -- import hashlib; print((lambda p,q,g,y,r,s,m: (lambda w:(pow(g,int(hashlib.sha1( m.encode('ascii')).hexdigest(),16)*w%q,p)*pow(y,r*w%q,p)%p)%q)(pow(s,q-2,q))==r and s%q!=0 and m)(12342649995480866419, 2278082317364501, 1670428356600652640, 5398151833726432125, 645223105888478, 1916678356240619, "<[email protected]>"))