瀏覽代碼

更新 'pyproject/SSHManager/local_generater/word_generater.py'

heavensend 6 年之前
父節點
當前提交
c61c0e032a
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      pyproject/SSHManager/local_generater/word_generater.py

+ 8 - 1
pyproject/SSHManager/local_generater/word_generater.py

@@ -23,5 +23,12 @@ def decodestr(s):
     dns = s[5:].replace(s[-12:-4],'') + '=='
     return base64.decodestring(dns)
 
+if __name__ == "__main__":
+    if len(sys.argv) != 3:
+        print "usage: word_generater.py [decodestr]/[encodestr] [string]"
+    if sys.argv[1] == "decodestr" :
+        print decodestr(sys.argv[2])
+    if sys.argv[1] == "encodestr" :
+        print encodestr(sys.argv[2])
 #print encodestr('6379')
-print decodestr('dHbR7NjM3OQ')
+#print decodestr('dHbR7NjM3OQ')