Created
September 29, 2014 13:18
-
-
Save LHazy/ac5f010d6cea861d1d3e to your computer and use it in GitHub Desktop.
ksnctfの第2問を解くためのスクリプト
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (define (ksnctf-q2-decode str) | |
| (define (decode c) | |
| (let ((s (x->string c))) | |
| (if (rxmatch #/[a-zA-Z]/ s) | |
| (if (rxmatch #/[a-mA-M]/ s) | |
| (integer->char (+ (char->integer c) 26 -13)) | |
| (integer->char (- (char->integer c) 13))) | |
| c))) | |
| (list->string (map decode (string->list str)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment