bcmd 0.6.18__tar.gz → 0.6.19__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of bcmd might be problematic. Click here for more details.

Files changed (40) hide show
  1. {bcmd-0.6.18 → bcmd-0.6.19}/PKG-INFO +2 -2
  2. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd/tasks/docs.py +6 -13
  3. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd.egg-info/PKG-INFO +2 -2
  4. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd.egg-info/SOURCES.txt +1 -3
  5. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd.egg-info/requires.txt +1 -1
  6. {bcmd-0.6.18 → bcmd-0.6.19}/pyproject.toml +2 -2
  7. bcmd-0.6.18/bcmd/utils/utils.py +0 -9
  8. {bcmd-0.6.18 → bcmd-0.6.19}/MANIFEST.in +0 -0
  9. {bcmd-0.6.18 → bcmd-0.6.19}/README.md +0 -0
  10. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd/__init__.py +0 -0
  11. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd/common/__init__.py +0 -0
  12. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd/common/func.py +0 -0
  13. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd/common/secret.py +0 -0
  14. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd/resources/project/main.py +0 -0
  15. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd/tasks/__init__.py +0 -0
  16. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd/tasks/bin.py +0 -0
  17. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd/tasks/code.py +0 -0
  18. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd/tasks/crypto.py +0 -0
  19. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd/tasks/download.py +0 -0
  20. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd/tasks/image.py +0 -0
  21. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd/tasks/json.py +0 -0
  22. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd/tasks/lib.py +0 -0
  23. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd/tasks/math.py +0 -0
  24. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd/tasks/mirror.py +0 -0
  25. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd/tasks/pdf.py +0 -0
  26. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd/tasks/project.py +0 -0
  27. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd/tasks/proxy.py +0 -0
  28. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd/tasks/time.py +0 -0
  29. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd/tasks/upgrade.py +0 -0
  30. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd/tasks/wasabi.py +0 -0
  31. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd/utils/__init__.py +0 -0
  32. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd.egg-info/dependency_links.txt +0 -0
  33. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd.egg-info/entry_points.txt +0 -0
  34. {bcmd-0.6.18 → bcmd-0.6.19}/bcmd.egg-info/top_level.txt +0 -0
  35. {bcmd-0.6.18 → bcmd-0.6.19}/setup.cfg +0 -0
  36. {bcmd-0.6.18 → bcmd-0.6.19}/test/__init__.py +0 -0
  37. {bcmd-0.6.18 → bcmd-0.6.19}/test/conftest.py +0 -0
  38. {bcmd-0.6.18 → bcmd-0.6.19}/test/test_pdf.py +0 -0
  39. {bcmd-0.6.18 → bcmd-0.6.19}/test/test_proxy.py +0 -0
  40. {bcmd-0.6.18 → bcmd-0.6.19}/test/test_wasabi.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bcmd
3
- Version: 0.6.18
3
+ Version: 0.6.19
4
4
  Summary: Commands for Beni
5
5
  Author-email: Beni Mang <benimang@126.com>
6
6
  Maintainer-email: Beni Mang <benimang@126.com>
@@ -8,7 +8,7 @@ Keywords: benimang,beni,bcmd
8
8
  Requires-Python: >=3.10
9
9
  Requires-Dist: aioconsole==0.8.1
10
10
  Requires-Dist: async-lru==2.0.5
11
- Requires-Dist: benimang==0.8.6
11
+ Requires-Dist: benimang==0.8.9
12
12
  Requires-Dist: cryptography==45.0.4
13
13
  Requires-Dist: nest-asyncio==1.6.0
14
14
  Requires-Dist: paramiko==3.5.1
@@ -1,5 +1,5 @@
1
- import asyncio
2
1
  import datetime
2
+ import json
3
3
  import pickle
4
4
  import tkinter as tk
5
5
  from contextlib import asynccontextmanager
@@ -14,8 +14,6 @@ from beni.bform import BForm
14
14
  from beni.bfunc import syncCall
15
15
  from typer import Argument
16
16
 
17
- from bcmd.utils.utils import decryptFileIgnoreError
18
-
19
17
  app: Final = btask.newSubApp('Vitepress 网站相关')
20
18
  conf: dict[str, Any] = {}
21
19
  isUpload: bool = False
@@ -90,7 +88,7 @@ async def userInput():
90
88
  def onBtn(self):
91
89
  password = self.varPassword.get()
92
90
  try:
93
- conf['server_info'] = bcrypto.decryptJson(conf['server_info'], password)
91
+ bcrypto.decryptJson(conf['server_info'], password)
94
92
  self.destroy()
95
93
  except:
96
94
  messagebox.showerror('密码错误', '密码错误,请重新输入')
@@ -103,12 +101,10 @@ async def userInput():
103
101
  btask.abort('用户取消操作')
104
102
  isUpload, password = result
105
103
 
106
- # 配置里面每个字段都尝试解密(实际效率较低但不影响使用)
104
+ # 将里面加密的内容解密
107
105
  for k, v in conf.items():
108
- try:
106
+ if str(v).startswith(bcrypto.FLAG):
109
107
  conf[k] = bcrypto.decryptText(v, password)
110
- except:
111
- pass
112
108
 
113
109
 
114
110
  async def vitepressBuild(outputPath: Path):
@@ -131,7 +127,6 @@ async def makeDeploy(outputPath: Path):
131
127
 
132
128
  # 文件名以及内容调整
133
129
  fileList = bpath.listFile(outputPath, True)
134
- await asyncio.gather(*[decryptFileIgnoreError(x, password) for x in fileList])
135
130
  for file in fileList:
136
131
 
137
132
  # 替换文件名
@@ -145,10 +140,8 @@ async def makeDeploy(outputPath: Path):
145
140
  # 替换文件内容
146
141
  content = await bfile.readText(file)
147
142
  oldContent = content
148
- try:
143
+ if content.startswith(bcrypto.FLAG):
149
144
  content = bcrypto.decryptText(content, password)
150
- except:
151
- pass
152
145
  for k, v in dataDict.items():
153
146
  content = content.replace(f'{{{k}}}', str(v))
154
147
  if oldContent != content:
@@ -168,7 +161,7 @@ async def sshClient():
168
161
  with bpath.useTempFile() as tempFile:
169
162
  await bfile.writeText(tempFile, conf['server_key'])
170
163
  client.connect(
171
- **conf['server_info'],
164
+ **json.loads(conf['server_info']),
172
165
  key_filename=str(tempFile),
173
166
  )
174
167
  yield client
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bcmd
3
- Version: 0.6.18
3
+ Version: 0.6.19
4
4
  Summary: Commands for Beni
5
5
  Author-email: Beni Mang <benimang@126.com>
6
6
  Maintainer-email: Beni Mang <benimang@126.com>
@@ -8,7 +8,7 @@ Keywords: benimang,beni,bcmd
8
8
  Requires-Python: >=3.10
9
9
  Requires-Dist: aioconsole==0.8.1
10
10
  Requires-Dist: async-lru==2.0.5
11
- Requires-Dist: benimang==0.8.6
11
+ Requires-Dist: benimang==0.8.9
12
12
  Requires-Dist: cryptography==45.0.4
13
13
  Requires-Dist: nest-asyncio==1.6.0
14
14
  Requires-Dist: paramiko==3.5.1
@@ -24,7 +24,6 @@ pyproject.toml
24
24
  ./bcmd/tasks/upgrade.py
25
25
  ./bcmd/tasks/wasabi.py
26
26
  ./bcmd/utils/__init__.py
27
- ./bcmd/utils/utils.py
28
27
  ./test/__init__.py
29
28
  ./test/conftest.py
30
29
  ./test/test_pdf.py
@@ -58,5 +57,4 @@ bcmd/tasks/proxy.py
58
57
  bcmd/tasks/time.py
59
58
  bcmd/tasks/upgrade.py
60
59
  bcmd/tasks/wasabi.py
61
- bcmd/utils/__init__.py
62
- bcmd/utils/utils.py
60
+ bcmd/utils/__init__.py
@@ -1,6 +1,6 @@
1
1
  aioconsole==0.8.1
2
2
  async-lru==2.0.5
3
- benimang==0.8.6
3
+ benimang==0.8.9
4
4
  cryptography==45.0.4
5
5
  nest-asyncio==1.6.0
6
6
  paramiko==3.5.1
@@ -3,7 +3,7 @@
3
3
 
4
4
  [project]
5
5
  name = 'bcmd'
6
- version = '0.6.18'
6
+ version = '0.6.19'
7
7
  description = 'Commands for Beni'
8
8
  requires-python = '>=3.10'
9
9
  keywords = ['benimang', 'beni', 'bcmd']
@@ -13,7 +13,7 @@ maintainers = [{ name = 'Beni Mang', email = 'benimang@126.com' }]
13
13
  dependencies = [
14
14
  "aioconsole==0.8.1",
15
15
  "async-lru==2.0.5",
16
- "benimang==0.8.6",
16
+ "benimang==0.8.9",
17
17
  "cryptography==45.0.4",
18
18
  "nest-asyncio==1.6.0",
19
19
  "paramiko==3.5.1",
@@ -1,9 +0,0 @@
1
- from beni import bcrypto
2
- from beni.btype import XPath
3
-
4
-
5
- async def decryptFileIgnoreError(file: XPath, password: str):
6
- try:
7
- await bcrypto.decryptFile(file, password)
8
- except:
9
- pass
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes