Bläddra i källkod

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

heavensend 6 år sedan
förälder
incheckning
c61c0e032a
1 ändrade filer med 8 tillägg och 1 borttagningar
  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')