{"id":1049,"date":"2013-08-01T15:50:13","date_gmt":"2013-08-01T07:50:13","guid":{"rendered":"http:\/\/www.hsyyf.me\/?p=1049"},"modified":"2013-08-01T15:50:13","modified_gmt":"2013-08-01T07:50:13","slug":"%e8%bf%85%e9%9b%b7%e9%93%be%e6%8e%a5%e5%88%86%e6%9e%90%e3%80%81%e5%8a%a0%e5%af%86%e5%99%a8","status":"publish","type":"post","link":"https:\/\/www.hsyyf.me\/?p=1049","title":{"rendered":"\u8fc5\u96f7\u94fe\u63a5\u5206\u6790\u3001\u52a0\u5bc6\u5668"},"content":{"rendered":"<p>\u597d\u4e45\u4e0d\u78b0python\u4e86\uff0c\u90fd\u751f\u758f\u4e86\uff0c\u5199\u4e86\u4e2a\u8fc5\u96f7\u94fe\u63a5\u5206\u6790\u5668\u7ec3\u7ec3\u624b\u3002<\/p>\n<p>\u8fc5\u96f7\u94fe\u63a5\u52a0\u5bc6\u8fc7\u7a0b\uff1a1\uff0c\u6b63\u5e38\u94fe\u63a5\u524d\u52a0\u201cAA\u201d,\u540e\u9762\u52a0\u201cZZ\u201d\uff1b2\uff0cbase64\u52a0\u5bc6\uff1b3\uff0c\u6dfb\u52a0\u201cthunder:\/\/\u201d\u524d\u7f00\u3002<\/p>\n<p>\u4e24\u4e2a\u591a\u5c0f\u65f6\u7684\u6210\u679c\uff1a<\/p>\n<p><code lang=\"python\"># coding=gbk<br \/>\nimport base64<\/p>\n<p>def Decode():<br \/>\n    Thunder=raw_input(\"\u8bf7\u8f93\u5165\u8fc5\u96f7\u94fe\u63a5:\")<br \/>\n    Thunder=Thunder[10:]<br \/>\n    Thunder=base64.decodestring(Thunder)<br \/>\n    Thunder=Thunder[2:len(Thunder)-2]<br \/>\n    print Thunder<br \/>\n    raw_input(\"Press Enter to End\")<\/p>\n<p>def Encode():<br \/>\n    Thunder=raw_input(\"\u8bf7\u8f93\u5165\u666e\u901a\u94fe\u63a5:\")<br \/>\n    Thunder='AA'+Thunder+'ZZ'<br \/>\n    Thunder='thunder:\/\/'+base64.encodestring(Thunder)<br \/>\n    print Thunder<br \/>\n    raw_input(\"Press Enter to End\")<\/p>\n<p>print \"\u8fc5\u96f7\u94fe\u63a5\u5206\u6790\u5668v0.1\"<br \/>\ni=raw_input(\"\u9009\u62e9\u52a0\u5bc6\uff081\uff09\u6216\u8005\u89e3\u5bc6\uff082\uff09:\")<\/p>\n<p>while i!='1' and i!='2':<br \/>\n    i=raw_input(\"\u9009\u62e9\u52a0\u5bc6\uff081\uff09\u6216\u8005\u89e3\u5bc6\uff082\uff09:\")<\/p>\n<p>if i=='1':<br \/>\n    Encode()<br \/>\nelse:<br \/>\n    if i=='2':<br \/>\n        Decode()<br \/>\n<\/code><\/p>\n<p>\u5c0f\u7ed3\uff1a1.Python2.*\u5bf9\u4e2d\u6587\u652f\u6301\u4e0d\u597d\uff0c\u5728\u5f00\u5934\u6dfb\u52a0\u201c# coding=gbk\u201d\uff0c\u652f\u6301\u4e2d\u6587\u8f93\u51fa\u3002<\/p>\n<p>2.\u575a\u6301\u7528raw_input\u66ff\u4ee3input\uff0c\u5f53\u71363.*\u5c31\u6ca1\u6709raw_input\u4e86\u3002<\/p>\n<p>3.\u590d\u4e60\u771f\u7684\u5f88\u91cd\u8981\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u597d\u4e45\u4e0d\u78b0python\u4e86\uff0c\u90fd\u751f\u758f\u4e86\uff0c\u5199\u4e86\u4e2a\u8fc5\u96f7\u94fe\u63a5\u5206\u6790\u5668\u7ec3\u7ec3\u624b\u3002 \u8fc5\u96f7\u94fe\u63a5\u52a0\u5bc6\u8fc7\u7a0b\uff1a1\uff0c\u6b63\u5e38\u94fe\u63a5\u524d\u52a0\u201cAA\u201d,\u540e [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[16],"tags":[87],"class_list":["post-1049","post","type-post","status-publish","format-standard","hentry","category-16","tag-python"],"_links":{"self":[{"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/posts\/1049","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1049"}],"version-history":[{"count":0,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/posts\/1049\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1049"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1049"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1049"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}