skywind3000 / skywind3000/PyStand

加密问题:始终识别不到模块

Open
#69 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
1.2k
Forks
146
PR merge metrics
No merged PRs in 30d

Description

尝试了以下方法均识别不到模块:
1.将script目录下的所有.py直接压缩并改为.egg放在.exe同级目录下
2.直接将script目录压缩为egg文件并放在exe同级
3.不压缩,将所有py文件替换为pyc文件
4.将所有py文件转化为pyd后放在script下
图片2
int文件配置如下:

#  vim: set ts=4 sw=4 tw=0 et ft=python :
import sys, os
from multiprocessing import freeze_support
os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = r'.\site-packages\PyQt5\Qt5\plugins'
os.chdir(os.path.dirname(__file__))
sys.path.append(os.path.abspath('script'))
sys.path.append(os.path.abspath('script.egg'))
if __name__ == '__main__':
    if not hasattr(sys, 'frozen'):
        sys.frozen = True
    freeze_support()
    import main
    try:
        main.startwin()
    except Exception as e:
        import logging
        logging.basicConfig(filename='log/Pystand-log.txt', level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
        logging.error(e)

只有将py放在script目录下且无压缩才能识别到。

请问如何处理才能正确识别到pyd文件以满足加密?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the provided startup configuration and compare its handling of script, script.egg, .pyc, and .pyd files. Reproduce the packaging variants and inspect log/Pystand-log.txt for the module-loading failure. Done means the executable can identify and import the encrypted packaged modules without leaving plain .py files in script.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.