Python source code obfuscation with Pyarmor

Sdílet
Vložit
  • čas přidán 28. 02. 2024
  • How to protect your Python source code and apply obfuscation on it while keeping the same functionality and the goal is to reduce the chance of leaking your source code to unwanted external people; also, you will able to set an expiration date for your source code or limit it to a specific hardware. So, the source code will run on a specific computer and not others.

Komentáře • 7

  • @user-ec4yx1ki3s
    @user-ec4yx1ki3s Před 3 měsíci

    first of all thanks for your effort , but i have a little QS if i locked the code by specific Date so if the Date finished so the user download the script again and run it do the date start again or will give the user that its date finished, and another QS how i can get the mac automaticlly coz for sure i cant know the mac of any one download the script?

    • @sina6348
      @sina6348  Před měsícem

      Qustion one:
      When you lock your code using PyArmor by specifying an expiration date, the expiration is embedded into the encrypted code itself. This means that if the expiration date has passed, downloading the script again will not reset the date. The script will still check against the original expiration date embedded in the code. If the date has expired, it will indicate that the date has finished and the script will not run. To continue using the script beyond the expiration date, you would need to re-encrypt the code with a new expiration date.
      Question two:
      Maybe for restricting on MAC address first you give your user an script that gets the mac-address and then make a pyarmour for the main code based on obtained mac. so do not give them the main code at the first place

  • @novianindy887
    @novianindy887 Před měsícem

    is it possible to deobfuscate / decompile it?

    • @sina6348
      @sina6348  Před měsícem

      Yes it is . your source is not for 100% secure. but it is secure enough.
      there are projects designed for decompiling pyarmour but usually every new version they fail . so there is no solid answer to that . you can check pyarmour decompile ( google it ) and you will see many . but test it yourself on your code.

    • @novianindy887
      @novianindy887 Před měsícem

      @@sina6348 okay nice, I agree. I think the newest pyarmor gets harder to break. I'm wondering if the strings in the exe are obfuscated or plain text

    • @bill8126
      @bill8126 Před 5 dny +2

      Pyarmor maintainer is supposed to change obfuscation algorythm every new version I guess.
      It is written in C and built as python binary file .pyd.
      So I think to get a source is nearly impossible.
      As for strings yes they are not secured.
      You have to buy paid pyarmor version and there will be a bunch of new secure methods also for strings.
      But still it can be secured simply by storing strings as a list of characters and they build it during runtime.

    • @paulklimenko8419
      @paulklimenko8419 Před 5 dny

      ​@@bill8126 wow a very nice insights you have bro. Nice ones. thank you.
      Thanks for mentioning about the strings part which can be stated in binary or number