Browse Source

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

heavensend 6 years ago
parent
commit
c61c0e032a
1 changed files with 8 additions and 1 deletions
  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')