1 2 3 4 5 6 7 8 9 10 11 12 | def ROL(data, shift, size=32): shift %= size remains = data >> (size - shift) body = (data << shift) - (remains << size ) return (body + remains) def ROR(data, shift, size=32): shift %= size body = data >> shift remains = (data << (size - shift)) - (body << size) return (body + remains) | cs |
출처 : http://bbolmin.tistory.com/133 감사합니다~!
'Programming > ▷ Python' 카테고리의 다른 글
base64 encode, decode source (0) | 2018.03.09 |
---|---|
Solving CTF captcha challenge by use ocr (4) | 2018.03.03 |
ocr library module PIL, pytesser (0) | 2018.03.01 |