Training: ASCII
# -*- encoding: cp949 -*- ascii = '84, 104, 101, 32, 115, 111, 108, 117, 116, 105, 111, 110, 32, 105, 115, 58, 32, 101, 97, 101, 104, 109, 115, 98, 98, 98, 105, 110, 105'.split(', ') print ''.join(map(chr,map(int,ascii)))
Encodings: URL
# -*- encoding: cp949 -*- import urllib2 url = '%59%69%70%70%65%68%21%20%59%6F%75%72%20%55%52%4C%20%69%73%20%63%68%61%6C%6C%65%6E%67%65%2F%74%72%61%69%6E%69%6E%67%2F%65%6E%63%6F%64%69%6E%67%73%2F%75%72%6C%2F%73%61%77%5F%6C%6F%74%69%6F%6E%2E%70%68%70%3F%70%3D%6F%6F%72%65%64%6E%68%67%61%6F%72%73%26%63%69%64%3D%35%32%23%70%61%73%73%77%6F%72%64%3D%66%69%62%72%65%5F%6F%70%74%69%63%73%20%56%65%72%79%20%77%65%6C%6C%20%64%6F%6E%65%21' print urllib2.unquote(url)
Training: Crypto - Caesar I
일반적인 시저 암호에서 쉬프트되는 양이 매번 새로고침할때마다 다르므로 한번씩 전부 다 쉬프트해본 뒤에 그 중에서 유효한 문자열을 찾으면 된다.
# -*- encoding: cp949 -*- import string crypt = 'JXU GKYSA RHEMD VEN ZKCFI ELUH JXU BQPO TEW EV SQUIQH QDT OEKH KDYGKU IEBKJYED YI CRWEISICCICI' decrypt = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' for i in range(len(decrypt)): de = decrypt[i:len(decrypt)]+decrypt[0:i] table = string.maketrans(de, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ') print crypt.translate(table)
'Python > 2.7 simple coding(+ c++)' 카테고리의 다른 글
hack this site Programming missions : Reverse Ascii Shift (0) | 2015.01.20 |
---|---|
TheBlackSheep Programming 1~3 (0) | 2015.01.14 |
WeChall Training: Net Ports, Can you read me (0) | 2015.01.05 |
WeChall Training: Programming 1, Flow Over Astronomy (0) | 2015.01.04 |
lob gremlin->cobolt (4) | 2014.12.31 |