Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.41 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. # Test Activation key = "YW5plHFrameWbJmZa5RwamuVlJOWbGmVgqCknGKIeJeJop-Zn6qrYm1ibWZoY29raGNmhIVhkoWWr5ZpaGht"
  3. # Test License key    = "Z21tlnFrammWapmZZ5Rub2aYlJuYamuWg6ChmWKGepOLnqaZpa6qY25iamNnZWtqZWliiYdolYSWrZZoZ2Vs"
  4. # Test message        = "099a9642_4bd3_882d_cc44_Mile-PC_Windows-7-6.1.7601-SP1_Maya2018"
  5. # CODE TO RUN IN MAYA (outputs variable "message" in code below in order to obtain Activation key):
  6. #
  7. # import uuid, platform
  8. # PCN = platform.node()
  9. # OSnVer = platform.platform()
  10. # MayaVer = cmds.about(version=1)
  11. # ex1 = cmds.optionVar(ex='sphereAxisModeET')
  12. # ex2 = cmds.optionVar(ex='cubeAxisModeET')
  13. # ex3 = cmds.optionVar(ex='planeAxisModeET')
  14. # ex4 = cmds.optionVar(ex='coneAxisModeET')
  15. #
  16. # msgA = cmds.optionVar(q='sphereAxisModeET')
  17. # msgB = cmds.optionVar(q='cubeAxisModeET')
  18. # msgC = cmds.optionVar(q='planeAxisModeET')
  19. # msgD = cmds.optionVar(q='coneAxisModeET')
  20. # message = msgA + '_' + msgB + '_' + msgC + '_' + msgD + '_' + PCN + '_' + OSnVer + '_' + 'Maya' + MayaVer
  21. # print(message)
  22.  
  23. import base64
  24.  
  25. message = input("Enter your output from the maya prompt here, wrapped in quotation marks:")
  26. def getCPK():
  27.     return '744585677675456'
  28.  
  29. key = getCPK()
  30. enc = []
  31. for i in range(len(message)):
  32.     key_c = key[(i % len(key))]
  33.     enc_c = chr((ord(message[i]) + ord(key_c)) % 256)
  34.     enc.append(enc_c)
  35.  
  36. enc = base64.urlsafe_b64encode(('').join(enc))
  37.  
  38. print(enc)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement