maya-umbrella 0.14.1__tar.gz → 0.15.0__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 maya-umbrella might be problematic. Click here for more details.
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/PKG-INFO +71 -80
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/README.md +65 -77
- maya_umbrella-0.15.0/maya_umbrella/__version__.py +1 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/signatures.py +12 -0
- maya_umbrella-0.15.0/maya_umbrella/vaccines/vaccine4.py +55 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/pyproject.toml +2 -2
- maya_umbrella-0.14.1/maya_umbrella/__version__.py +0 -1
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/LICENSE +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/__init__.py +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/_vendor/__init__.py +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/_vendor/atomicwrites/LICENSE +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/_vendor/atomicwrites/__init__.py +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/_vendor/atomicwrites.pyi +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/_vendor/six/__init__.pyi +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/_vendor/six/moves/__init__.pyi +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/_vendor/six/moves/configparser.pyi +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/_vendor/six.LICENSE +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/_vendor/six.py +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/_vendor/vendor.txt +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/cleaner.py +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/collector.py +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/constants.py +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/defender.py +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/filesystem.py +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/hooks/__init__.py +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/hooks/delete_turtle.py +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/hooks/delete_unknown_plugin_node.py +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/hooks/fix_model_panel.py +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/hooks/fix_no_scene_name.py +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/hooks/fix_on_model_change_3dc.py +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/i18n.py +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/locales/en_US.json +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/locales/zh_CN.json +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/log.py +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/maya_funs.py +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/scanner.py +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/vaccine.py +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/vaccines/__init__.py +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/vaccines/vaccine1.py +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/vaccines/vaccine2.py +0 -0
- {maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/vaccines/vaccine3.py +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: maya_umbrella
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.15.0
|
|
4
4
|
Summary: A better Autodesk Maya antivirus tool detects and removes malicious.
|
|
5
|
-
Home-page: https://github.com/loonghao/maya_umbrella
|
|
6
5
|
License: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
7
|
Keywords: Autodesk Maya,python,Maya,dcc,antivirus,Security Tools,maya_umbrella
|
|
8
8
|
Author: longhao
|
|
9
9
|
Author-email: hal.long@outlook.com
|
|
@@ -19,11 +19,16 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.10
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.11
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
24
|
Project-URL: Documentation, https://github.com/loonghao/maya_umbrella
|
|
25
|
+
Project-URL: Homepage, https://github.com/loonghao/maya_umbrella
|
|
23
26
|
Project-URL: Repository, https://github.com/loonghao/maya_umbrella
|
|
24
27
|
Description-Content-Type: text/markdown
|
|
25
28
|
|
|
26
|
-

|
|
30
|
+
|
|
31
|
+
[English](https://github.com/loonghao/maya_umbrella/blob/main/README.md) | [中文](https://github.com/loonghao/maya_umbrella/blob/main/README_zh.md)
|
|
27
32
|
|
|
28
33
|
[](https://img.shields.io/pypi/pyversions/maya-umbrella)
|
|
29
34
|
[](https://github.com/wntrblm/nox)
|
|
@@ -43,10 +48,10 @@ Description-Content-Type: text/markdown
|
|
|
43
48
|
[](https://img.shields.io/badge/maya-2018-green)
|
|
44
49
|
|
|
45
50
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
46
|
-
[](#contributors-)
|
|
47
52
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
48
53
|
|
|
49
|
-
A better Autodesk Maya antivirus tool detects and removes malicious.
|
|
54
|
+
A better Autodesk Maya antivirus tool that detects and removes malicious code.
|
|
50
55
|
|
|
51
56
|
This tool is designed to provide a robust solution for identifying and resolving any potential viruses within Autodesk
|
|
52
57
|
Maya.
|
|
@@ -54,166 +59,146 @@ It ensures a secure and seamless user experience by proactively scanning for thr
|
|
|
54
59
|
|
|
55
60
|
It can be provided as an API for seamless integration into your existing pipeline.
|
|
56
61
|
|
|
57
|
-
#
|
|
62
|
+
# Installation
|
|
58
63
|
|
|
59
|
-
## pip
|
|
64
|
+
## pip installation
|
|
60
65
|
maya_umbrella is distributed as a standard pipy package, so we can install it via pip install.
|
|
61
|
-
|
|
62
|
-
maya_umbrella是以标准pipy包去发布的,所以我们可以通过pip install去安装
|
|
63
66
|
```shell
|
|
64
67
|
your/maya-root/mayapy -m pip install maya-umbrella
|
|
65
68
|
```
|
|
66
|
-
##
|
|
69
|
+
## One-click installation
|
|
67
70
|
Download the corresponding version of the zip package in the release, unzip it and double-click `install.bat` to install it.
|
|
68
71
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
更新版本
|
|
72
|
+
Update version
|
|
72
73
|
```shell
|
|
73
74
|
your/maya-root/mayapy -m pip install maya-umbrella --upgrade
|
|
74
75
|
```
|
|
75
|
-
|
|
76
|
+
Uninstall
|
|
76
77
|
```shell
|
|
77
78
|
your/maya-root/mayapy -m pip uninstall maya-umbrella
|
|
78
79
|
```
|
|
79
80
|
|
|
80
|
-
#
|
|
81
|
+
# Development Environment Setup
|
|
81
82
|
|
|
82
83
|
Set up the development environment using a virtual environment,
|
|
83
84
|
and it is recommended to use Python 3.8 or higher versions.
|
|
84
85
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
通过pip安装相关开发依赖
|
|
86
|
+
Install development dependencies via pip
|
|
88
87
|
|
|
89
88
|
```shell
|
|
90
89
|
pip install -r requirements-dev.txt
|
|
91
90
|
```
|
|
92
91
|
|
|
93
|
-
#
|
|
92
|
+
# Development Debugging
|
|
94
93
|
|
|
95
94
|
|
|
96
|
-
##
|
|
97
|
-
With `nox -s maya -- <maya version>`, start
|
|
98
|
-
Nox will dynamically register a nox session based on your local installation of
|
|
99
|
-
e.g. if you have `maya-
|
|
100
|
-
Then you can start maya with a test environment via
|
|
101
|
-
|
|
102
|
-
通过`nox -s maya -- <maya version>`, 启动maya.
|
|
103
|
-
nox会动态根据你本地安装得maya去注册nox session, 比如你本地安装了`maya-2020`,
|
|
104
|
-
那么通过可以启动带有测试环境的maya
|
|
95
|
+
## Testing in Maya
|
|
96
|
+
With `nox -s maya -- <maya version>`, start Maya.
|
|
97
|
+
Nox will dynamically register a nox session based on your local installation of Maya,
|
|
98
|
+
e.g. if you have `maya-2018` installed locally, then you can start Maya with a test environment.
|
|
105
99
|
|
|
106
100
|
```shell
|
|
107
101
|
nox -s maya -- 2018
|
|
108
102
|
```
|
|
109
103
|
**Note: there are two `-` between maya and the version number**.
|
|
110
104
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
**注意:maya 与 版本号之间有 俩个`-`**
|
|
114
|
-
|
|
115
|
-
启动maya后在脚本编辑器中执行下面得代码,就会动态的从`<repo>/tests/virus/`里面去open ma文件去进行测试.
|
|
105
|
+
After starting Maya, executing the following code in the script editor will dynamically open the ma file from `<repo>/tests/virus/` to test it.
|
|
116
106
|
|
|
117
107
|
```python
|
|
118
108
|
import manual_test_in_maya
|
|
119
109
|
|
|
120
110
|
manual_test_in_maya.start()
|
|
121
111
|
```
|
|
122
|
-
It is also possible to execute the corresponding tests via pytest, which also requires a local installation of the corresponding
|
|
123
|
-
|
|
124
|
-
也可以通过pytest去执行对应的测试,也需要本地安装了对应的maya
|
|
112
|
+
It is also possible to execute the corresponding tests via pytest, which also requires a local installation of the corresponding Maya
|
|
125
113
|
|
|
126
114
|
```shell
|
|
127
115
|
nox -s maya -- 2018 --test
|
|
128
116
|
```
|
|
129
117
|
**Note: Command line crash may occur in versions below maya-2022 (PY2)**.
|
|
130
118
|
|
|
131
|
-
**注意:在maya-2022 (PY2) 以下的版本可能会出现命令行crash的情况**
|
|
132
|
-
|
|
133
119
|
|
|
134
|
-
##
|
|
135
|
-
Create a new py in `<repo>/maya_umbrella/vaccines
|
|
120
|
+
## Adding New Vaccines
|
|
121
|
+
Create a new py in `<repo>/maya_umbrella/vaccines/`. Since many viruses don't have a specific name, we'll use `vaccine<id>.py`.
|
|
136
122
|
Inherit `from maya_umbrella.vaccine import AbstractVaccine` and call the class `Vaccine`, and then write the virus collection logic.
|
|
137
123
|
|
|
138
|
-
|
|
139
|
-
继承`from maya_umbrella.vaccine import AbstractVaccine`并且class名字叫`Vaccine`即可, 然后去写具体的收集病毒逻辑
|
|
140
|
-
|
|
141
|
-
## 代码检查
|
|
124
|
+
## Code Check
|
|
142
125
|
|
|
143
126
|
We can use the encapsulated `nox` command to perform a code check.
|
|
144
127
|
|
|
145
|
-
我们可以利用封装好的`nox`命令去执行进行代码检查
|
|
146
|
-
|
|
147
128
|
```shell
|
|
148
129
|
nox -s lint
|
|
149
130
|
```
|
|
150
131
|
|
|
151
|
-
|
|
132
|
+
Format code
|
|
152
133
|
```shell
|
|
153
134
|
nox -s lint-fix
|
|
154
135
|
```
|
|
155
136
|
|
|
156
|
-
#
|
|
137
|
+
# Generate Installation Package
|
|
157
138
|
Execute the following command to create a zip under <repo>/.zip, with `--version` the version number of the current tool.
|
|
158
139
|
|
|
159
140
|
**Note: between `make-zip` and `--version` there are two `-`**.
|
|
160
141
|
|
|
161
|
-
执行下面的命令可以在<repo>/.zip下面创建zip,参数 `--version` 当前工具的版本号
|
|
162
|
-
|
|
163
|
-
**注意:`make-zip` 与 `--version`之间有 俩个`-`**
|
|
164
|
-
|
|
165
142
|
```shell
|
|
166
143
|
nox -s make-zip -- --version 0.5.0
|
|
167
144
|
```
|
|
168
145
|
|
|
169
|
-
#
|
|
146
|
+
# Environment Variables
|
|
147
|
+
We can use the following environment variables to modify some of the settings of maya_umbrella,
|
|
148
|
+
so that companies with pipelines can better integrate them.
|
|
170
149
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
修改maya umbrella的日志保存目录,默认是windows temp目录
|
|
150
|
+
Modify the log saving directory of maya umbrella, the default is the windows temp directory.
|
|
174
151
|
|
|
175
152
|
```shell
|
|
176
153
|
MAYA_UMBRELLA_LOG_ROOT
|
|
177
154
|
```
|
|
178
|
-
|
|
179
|
-
修改maya umbrella的日志文件名称, 默认是`maya_umbrella`
|
|
155
|
+
Change the name of the log file for maya umbrella, default is `maya_umbrella`.
|
|
180
156
|
|
|
181
157
|
```shell
|
|
182
158
|
MAYA_UMBRELLA_LOG_NAME
|
|
183
159
|
```
|
|
184
160
|
|
|
185
|
-
|
|
161
|
+
Set the log level, the default is info, can be debug can see more log information.
|
|
186
162
|
|
|
187
163
|
```shell
|
|
188
164
|
MAYA_UMBRELLA_LOG_LEVEL
|
|
189
165
|
```
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
166
|
+
Change the name of the backup folder for antivirus files, default is `_virus`.
|
|
167
|
+
|
|
168
|
+
For example:
|
|
169
|
+
|
|
170
|
+
Your file path is `c:/your/path/file.ma`.
|
|
171
|
+
|
|
172
|
+
Then the backup file path is `c:/your/path/_virus/file.ma`.
|
|
194
173
|
```shell
|
|
195
174
|
MAYA_UMBRELLA_BACKUP_FOLDER_NAME
|
|
196
175
|
```
|
|
197
|
-
|
|
176
|
+
The default display language, including logging printouts, etc.
|
|
177
|
+
is set by default according to your current maya interface language,
|
|
178
|
+
but of course we can also set it via the following environment variables.
|
|
198
179
|
```shell
|
|
199
180
|
MAYA_UMBRELLA_LANG
|
|
200
181
|
```
|
|
182
|
+
Ignore saving to the backup folder,
|
|
183
|
+
*please note that if you are not clear about the consequences of this please do not modify it easily*,
|
|
184
|
+
the default batch antivirus will automatically back up the source file to the current file's backup folder
|
|
185
|
+
after the batch antivirus.
|
|
201
186
|
|
|
202
|
-
忽略保存到备份文件夹,*请注意,如果你不清楚这个会导致的后果请不要轻易修改*,默认批量杀毒后会把源文件自动备份到当前文件的备份文件夹.
|
|
203
187
|
```shell
|
|
204
188
|
MAYA_UMBRELLA_IGNORE_BACKUP
|
|
205
189
|
```
|
|
206
|
-
|
|
207
|
-
如果忽略请设置为
|
|
190
|
+
If ignored please set to
|
|
208
191
|
```shell
|
|
209
192
|
SET MAYA_UMBRELLA_IGNORE_BACKUP=true
|
|
210
193
|
```
|
|
211
194
|
|
|
212
|
-
|
|
195
|
+
For the portable version of Maya,
|
|
196
|
+
you can specify the Maya path by adding the `MAYA_LOCATION` environment variable.
|
|
197
|
+
|
|
213
198
|
```shell
|
|
214
199
|
SET MAYA_LOCATION=d:/your/path/maya_version/
|
|
215
200
|
```
|
|
216
|
-
|
|
201
|
+
You can also specify a directory from the command line.
|
|
217
202
|
|
|
218
203
|
```shell
|
|
219
204
|
nox -s maya -- 2018 --install-root /your/local/maya/root
|
|
@@ -221,7 +206,8 @@ nox -s maya -- 2018 --install-root /your/local/maya/root
|
|
|
221
206
|
```
|
|
222
207
|
|
|
223
208
|
# API
|
|
224
|
-
|
|
209
|
+
|
|
210
|
+
Get virus files that have not been repaired in the current scenario.
|
|
225
211
|
|
|
226
212
|
```python
|
|
227
213
|
from maya_umbrella import MayaVirusDefender
|
|
@@ -230,7 +216,7 @@ api = MayaVirusDefender()
|
|
|
230
216
|
print(api.get_unfixed_references())
|
|
231
217
|
```
|
|
232
218
|
|
|
233
|
-
|
|
219
|
+
Batch repair of files, via regular expressions.
|
|
234
220
|
```python
|
|
235
221
|
from maya_umbrella import MayaVirusScanner
|
|
236
222
|
|
|
@@ -239,14 +225,18 @@ print(api.scan_files_from_pattern("your/path/*.m[ab]"))
|
|
|
239
225
|
|
|
240
226
|
```
|
|
241
227
|
|
|
242
|
-
#
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
228
|
+
# Examples
|
|
229
|
+
|
|
230
|
+
If you want to quickly go through maya standalone and batch clean up maya files.
|
|
231
|
+
|
|
232
|
+
You can either `download` or `git clone` the current `main` branch.
|
|
233
|
+
|
|
234
|
+
Set up your development environment according to the guidelines above,
|
|
235
|
+
and Use the `nox` command to start the maya `standalone` environment,
|
|
236
|
+
the version of maya is based on your current local installation of maya.
|
|
237
|
+
For example, if you have `2018` installed locally, Then `nox -s maya -- 2018 --standalone`.
|
|
238
|
+
|
|
239
|
+
The following syntax starts a maya-2020 environment to dynamically check for viruses from the `c:/test` folder.
|
|
250
240
|
|
|
251
241
|
```shell
|
|
252
242
|
nox -s maya -- 2018 --standalone --pattern c:/test/*.m[ab]
|
|
@@ -272,6 +262,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
272
262
|
</tr>
|
|
273
263
|
<tr>
|
|
274
264
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Wenfeng-Zhang"><img src="https://avatars.githubusercontent.com/u/54899080?v=4?s=100" width="100px;" alt="Wenfeng Zhang"/><br /><sub><b>Wenfeng Zhang</b></sub></a><br /><a href="https://github.com/loonghao/maya_umbrella/commits?author=Wenfeng-Zhang" title="Tests">⚠️</a> <a href="https://github.com/loonghao/maya_umbrella/commits?author=Wenfeng-Zhang" title="Code">💻</a></td>
|
|
265
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/rickdave"><img src="https://avatars.githubusercontent.com/u/37840466?v=4?s=100" width="100px;" alt="rickdave"/><br /><sub><b>rickdave</b></sub></a><br /><a href="https://github.com/loonghao/maya_umbrella/issues?q=author%3Arickdave" title="Bug reports">🐛</a></td>
|
|
275
266
|
</tr>
|
|
276
267
|
</tbody>
|
|
277
268
|
</table>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-

|
|
2
|
+
|
|
3
|
+
[English](https://github.com/loonghao/maya_umbrella/blob/main/README.md) | [中文](https://github.com/loonghao/maya_umbrella/blob/main/README_zh.md)
|
|
2
4
|
|
|
3
5
|
[](https://img.shields.io/pypi/pyversions/maya-umbrella)
|
|
4
6
|
[](https://github.com/wntrblm/nox)
|
|
@@ -18,10 +20,10 @@
|
|
|
18
20
|
[](https://img.shields.io/badge/maya-2018-green)
|
|
19
21
|
|
|
20
22
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
21
|
-
[](#contributors-)
|
|
22
24
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
23
25
|
|
|
24
|
-
A better Autodesk Maya antivirus tool detects and removes malicious.
|
|
26
|
+
A better Autodesk Maya antivirus tool that detects and removes malicious code.
|
|
25
27
|
|
|
26
28
|
This tool is designed to provide a robust solution for identifying and resolving any potential viruses within Autodesk
|
|
27
29
|
Maya.
|
|
@@ -29,166 +31,146 @@ It ensures a secure and seamless user experience by proactively scanning for thr
|
|
|
29
31
|
|
|
30
32
|
It can be provided as an API for seamless integration into your existing pipeline.
|
|
31
33
|
|
|
32
|
-
#
|
|
34
|
+
# Installation
|
|
33
35
|
|
|
34
|
-
## pip
|
|
36
|
+
## pip installation
|
|
35
37
|
maya_umbrella is distributed as a standard pipy package, so we can install it via pip install.
|
|
36
|
-
|
|
37
|
-
maya_umbrella是以标准pipy包去发布的,所以我们可以通过pip install去安装
|
|
38
38
|
```shell
|
|
39
39
|
your/maya-root/mayapy -m pip install maya-umbrella
|
|
40
40
|
```
|
|
41
|
-
##
|
|
41
|
+
## One-click installation
|
|
42
42
|
Download the corresponding version of the zip package in the release, unzip it and double-click `install.bat` to install it.
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
更新版本
|
|
44
|
+
Update version
|
|
47
45
|
```shell
|
|
48
46
|
your/maya-root/mayapy -m pip install maya-umbrella --upgrade
|
|
49
47
|
```
|
|
50
|
-
|
|
48
|
+
Uninstall
|
|
51
49
|
```shell
|
|
52
50
|
your/maya-root/mayapy -m pip uninstall maya-umbrella
|
|
53
51
|
```
|
|
54
52
|
|
|
55
|
-
#
|
|
53
|
+
# Development Environment Setup
|
|
56
54
|
|
|
57
55
|
Set up the development environment using a virtual environment,
|
|
58
56
|
and it is recommended to use Python 3.8 or higher versions.
|
|
59
57
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
通过pip安装相关开发依赖
|
|
58
|
+
Install development dependencies via pip
|
|
63
59
|
|
|
64
60
|
```shell
|
|
65
61
|
pip install -r requirements-dev.txt
|
|
66
62
|
```
|
|
67
63
|
|
|
68
|
-
#
|
|
64
|
+
# Development Debugging
|
|
69
65
|
|
|
70
66
|
|
|
71
|
-
##
|
|
72
|
-
With `nox -s maya -- <maya version>`, start
|
|
73
|
-
Nox will dynamically register a nox session based on your local installation of
|
|
74
|
-
e.g. if you have `maya-
|
|
75
|
-
Then you can start maya with a test environment via
|
|
76
|
-
|
|
77
|
-
通过`nox -s maya -- <maya version>`, 启动maya.
|
|
78
|
-
nox会动态根据你本地安装得maya去注册nox session, 比如你本地安装了`maya-2020`,
|
|
79
|
-
那么通过可以启动带有测试环境的maya
|
|
67
|
+
## Testing in Maya
|
|
68
|
+
With `nox -s maya -- <maya version>`, start Maya.
|
|
69
|
+
Nox will dynamically register a nox session based on your local installation of Maya,
|
|
70
|
+
e.g. if you have `maya-2018` installed locally, then you can start Maya with a test environment.
|
|
80
71
|
|
|
81
72
|
```shell
|
|
82
73
|
nox -s maya -- 2018
|
|
83
74
|
```
|
|
84
75
|
**Note: there are two `-` between maya and the version number**.
|
|
85
76
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
**注意:maya 与 版本号之间有 俩个`-`**
|
|
89
|
-
|
|
90
|
-
启动maya后在脚本编辑器中执行下面得代码,就会动态的从`<repo>/tests/virus/`里面去open ma文件去进行测试.
|
|
77
|
+
After starting Maya, executing the following code in the script editor will dynamically open the ma file from `<repo>/tests/virus/` to test it.
|
|
91
78
|
|
|
92
79
|
```python
|
|
93
80
|
import manual_test_in_maya
|
|
94
81
|
|
|
95
82
|
manual_test_in_maya.start()
|
|
96
83
|
```
|
|
97
|
-
It is also possible to execute the corresponding tests via pytest, which also requires a local installation of the corresponding
|
|
98
|
-
|
|
99
|
-
也可以通过pytest去执行对应的测试,也需要本地安装了对应的maya
|
|
84
|
+
It is also possible to execute the corresponding tests via pytest, which also requires a local installation of the corresponding Maya
|
|
100
85
|
|
|
101
86
|
```shell
|
|
102
87
|
nox -s maya -- 2018 --test
|
|
103
88
|
```
|
|
104
89
|
**Note: Command line crash may occur in versions below maya-2022 (PY2)**.
|
|
105
90
|
|
|
106
|
-
**注意:在maya-2022 (PY2) 以下的版本可能会出现命令行crash的情况**
|
|
107
|
-
|
|
108
91
|
|
|
109
|
-
##
|
|
110
|
-
Create a new py in `<repo>/maya_umbrella/vaccines
|
|
92
|
+
## Adding New Vaccines
|
|
93
|
+
Create a new py in `<repo>/maya_umbrella/vaccines/`. Since many viruses don't have a specific name, we'll use `vaccine<id>.py`.
|
|
111
94
|
Inherit `from maya_umbrella.vaccine import AbstractVaccine` and call the class `Vaccine`, and then write the virus collection logic.
|
|
112
95
|
|
|
113
|
-
|
|
114
|
-
继承`from maya_umbrella.vaccine import AbstractVaccine`并且class名字叫`Vaccine`即可, 然后去写具体的收集病毒逻辑
|
|
115
|
-
|
|
116
|
-
## 代码检查
|
|
96
|
+
## Code Check
|
|
117
97
|
|
|
118
98
|
We can use the encapsulated `nox` command to perform a code check.
|
|
119
99
|
|
|
120
|
-
我们可以利用封装好的`nox`命令去执行进行代码检查
|
|
121
|
-
|
|
122
100
|
```shell
|
|
123
101
|
nox -s lint
|
|
124
102
|
```
|
|
125
103
|
|
|
126
|
-
|
|
104
|
+
Format code
|
|
127
105
|
```shell
|
|
128
106
|
nox -s lint-fix
|
|
129
107
|
```
|
|
130
108
|
|
|
131
|
-
#
|
|
109
|
+
# Generate Installation Package
|
|
132
110
|
Execute the following command to create a zip under <repo>/.zip, with `--version` the version number of the current tool.
|
|
133
111
|
|
|
134
112
|
**Note: between `make-zip` and `--version` there are two `-`**.
|
|
135
113
|
|
|
136
|
-
执行下面的命令可以在<repo>/.zip下面创建zip,参数 `--version` 当前工具的版本号
|
|
137
|
-
|
|
138
|
-
**注意:`make-zip` 与 `--version`之间有 俩个`-`**
|
|
139
|
-
|
|
140
114
|
```shell
|
|
141
115
|
nox -s make-zip -- --version 0.5.0
|
|
142
116
|
```
|
|
143
117
|
|
|
144
|
-
#
|
|
118
|
+
# Environment Variables
|
|
119
|
+
We can use the following environment variables to modify some of the settings of maya_umbrella,
|
|
120
|
+
so that companies with pipelines can better integrate them.
|
|
145
121
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
修改maya umbrella的日志保存目录,默认是windows temp目录
|
|
122
|
+
Modify the log saving directory of maya umbrella, the default is the windows temp directory.
|
|
149
123
|
|
|
150
124
|
```shell
|
|
151
125
|
MAYA_UMBRELLA_LOG_ROOT
|
|
152
126
|
```
|
|
153
|
-
|
|
154
|
-
修改maya umbrella的日志文件名称, 默认是`maya_umbrella`
|
|
127
|
+
Change the name of the log file for maya umbrella, default is `maya_umbrella`.
|
|
155
128
|
|
|
156
129
|
```shell
|
|
157
130
|
MAYA_UMBRELLA_LOG_NAME
|
|
158
131
|
```
|
|
159
132
|
|
|
160
|
-
|
|
133
|
+
Set the log level, the default is info, can be debug can see more log information.
|
|
161
134
|
|
|
162
135
|
```shell
|
|
163
136
|
MAYA_UMBRELLA_LOG_LEVEL
|
|
164
137
|
```
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
138
|
+
Change the name of the backup folder for antivirus files, default is `_virus`.
|
|
139
|
+
|
|
140
|
+
For example:
|
|
141
|
+
|
|
142
|
+
Your file path is `c:/your/path/file.ma`.
|
|
143
|
+
|
|
144
|
+
Then the backup file path is `c:/your/path/_virus/file.ma`.
|
|
169
145
|
```shell
|
|
170
146
|
MAYA_UMBRELLA_BACKUP_FOLDER_NAME
|
|
171
147
|
```
|
|
172
|
-
|
|
148
|
+
The default display language, including logging printouts, etc.
|
|
149
|
+
is set by default according to your current maya interface language,
|
|
150
|
+
but of course we can also set it via the following environment variables.
|
|
173
151
|
```shell
|
|
174
152
|
MAYA_UMBRELLA_LANG
|
|
175
153
|
```
|
|
154
|
+
Ignore saving to the backup folder,
|
|
155
|
+
*please note that if you are not clear about the consequences of this please do not modify it easily*,
|
|
156
|
+
the default batch antivirus will automatically back up the source file to the current file's backup folder
|
|
157
|
+
after the batch antivirus.
|
|
176
158
|
|
|
177
|
-
忽略保存到备份文件夹,*请注意,如果你不清楚这个会导致的后果请不要轻易修改*,默认批量杀毒后会把源文件自动备份到当前文件的备份文件夹.
|
|
178
159
|
```shell
|
|
179
160
|
MAYA_UMBRELLA_IGNORE_BACKUP
|
|
180
161
|
```
|
|
181
|
-
|
|
182
|
-
如果忽略请设置为
|
|
162
|
+
If ignored please set to
|
|
183
163
|
```shell
|
|
184
164
|
SET MAYA_UMBRELLA_IGNORE_BACKUP=true
|
|
185
165
|
```
|
|
186
166
|
|
|
187
|
-
|
|
167
|
+
For the portable version of Maya,
|
|
168
|
+
you can specify the Maya path by adding the `MAYA_LOCATION` environment variable.
|
|
169
|
+
|
|
188
170
|
```shell
|
|
189
171
|
SET MAYA_LOCATION=d:/your/path/maya_version/
|
|
190
172
|
```
|
|
191
|
-
|
|
173
|
+
You can also specify a directory from the command line.
|
|
192
174
|
|
|
193
175
|
```shell
|
|
194
176
|
nox -s maya -- 2018 --install-root /your/local/maya/root
|
|
@@ -196,7 +178,8 @@ nox -s maya -- 2018 --install-root /your/local/maya/root
|
|
|
196
178
|
```
|
|
197
179
|
|
|
198
180
|
# API
|
|
199
|
-
|
|
181
|
+
|
|
182
|
+
Get virus files that have not been repaired in the current scenario.
|
|
200
183
|
|
|
201
184
|
```python
|
|
202
185
|
from maya_umbrella import MayaVirusDefender
|
|
@@ -205,7 +188,7 @@ api = MayaVirusDefender()
|
|
|
205
188
|
print(api.get_unfixed_references())
|
|
206
189
|
```
|
|
207
190
|
|
|
208
|
-
|
|
191
|
+
Batch repair of files, via regular expressions.
|
|
209
192
|
```python
|
|
210
193
|
from maya_umbrella import MayaVirusScanner
|
|
211
194
|
|
|
@@ -214,14 +197,18 @@ print(api.scan_files_from_pattern("your/path/*.m[ab]"))
|
|
|
214
197
|
|
|
215
198
|
```
|
|
216
199
|
|
|
217
|
-
#
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
200
|
+
# Examples
|
|
201
|
+
|
|
202
|
+
If you want to quickly go through maya standalone and batch clean up maya files.
|
|
203
|
+
|
|
204
|
+
You can either `download` or `git clone` the current `main` branch.
|
|
205
|
+
|
|
206
|
+
Set up your development environment according to the guidelines above,
|
|
207
|
+
and Use the `nox` command to start the maya `standalone` environment,
|
|
208
|
+
the version of maya is based on your current local installation of maya.
|
|
209
|
+
For example, if you have `2018` installed locally, Then `nox -s maya -- 2018 --standalone`.
|
|
210
|
+
|
|
211
|
+
The following syntax starts a maya-2020 environment to dynamically check for viruses from the `c:/test` folder.
|
|
225
212
|
|
|
226
213
|
```shell
|
|
227
214
|
nox -s maya -- 2018 --standalone --pattern c:/test/*.m[ab]
|
|
@@ -247,6 +234,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
247
234
|
</tr>
|
|
248
235
|
<tr>
|
|
249
236
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Wenfeng-Zhang"><img src="https://avatars.githubusercontent.com/u/54899080?v=4?s=100" width="100px;" alt="Wenfeng Zhang"/><br /><sub><b>Wenfeng Zhang</b></sub></a><br /><a href="https://github.com/loonghao/maya_umbrella/commits?author=Wenfeng-Zhang" title="Tests">⚠️</a> <a href="https://github.com/loonghao/maya_umbrella/commits?author=Wenfeng-Zhang" title="Code">💻</a></td>
|
|
237
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/rickdave"><img src="https://avatars.githubusercontent.com/u/37840466?v=4?s=100" width="100px;" alt="rickdave"/><br /><sub><b>rickdave</b></sub></a><br /><a href="https://github.com/loonghao/maya_umbrella/issues?q=author%3Arickdave" title="Bug reports">🐛</a></td>
|
|
250
238
|
</tr>
|
|
251
239
|
</tbody>
|
|
252
240
|
</table>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.15.0"
|
|
@@ -9,16 +9,28 @@ virus20240430_sig1 = VirusSignature("virus20240430", "python(.*);.+exec.+(pyCode
|
|
|
9
9
|
# https://regex101.com/r/2D14UA/1
|
|
10
10
|
virus20240430_sig2 = VirusSignature("virus20240430", r"^\['.+']")
|
|
11
11
|
|
|
12
|
+
# maya_secure_system virus signatures
|
|
13
|
+
maya_secure_system_sig1 = VirusSignature("maya_secure_system", "import maya_secure_system")
|
|
14
|
+
maya_secure_system_sig2 = VirusSignature("maya_secure_system", r"maya_secure_system\.MayaSecureSystem\(\)\.startup\(\)")
|
|
15
|
+
|
|
12
16
|
JOB_SCRIPTS_VIRUS_SIGNATURES = [
|
|
13
17
|
"petri_dish_path.+cmds.internalVar.+",
|
|
14
18
|
"userSetup",
|
|
15
19
|
"fuckVirus",
|
|
16
20
|
virus20240430_sig1.signature,
|
|
17
21
|
virus20240430_sig2.signature,
|
|
22
|
+
maya_secure_system_sig1.signature,
|
|
23
|
+
maya_secure_system_sig2.signature,
|
|
18
24
|
]
|
|
19
25
|
|
|
20
26
|
FILE_VIRUS_SIGNATURES = [
|
|
21
27
|
"import vaccine",
|
|
22
28
|
"cmds.evalDeferred.*leukocyte.+",
|
|
23
29
|
virus20240430_sig1.signature,
|
|
30
|
+
maya_secure_system_sig1.signature,
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
MAYA_SECURE_SYSTEM_VIRUS_SIGNATURES = [
|
|
34
|
+
maya_secure_system_sig1.signature,
|
|
35
|
+
maya_secure_system_sig2.signature,
|
|
24
36
|
]
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Import built-in modules
|
|
2
|
+
import os
|
|
3
|
+
|
|
4
|
+
# Import local modules
|
|
5
|
+
from maya_umbrella.filesystem import check_virus_by_signature
|
|
6
|
+
from maya_umbrella.filesystem import check_virus_file_by_signature
|
|
7
|
+
from maya_umbrella.maya_funs import check_reference_node_exists
|
|
8
|
+
from maya_umbrella.maya_funs import cmds
|
|
9
|
+
from maya_umbrella.maya_funs import get_attr_value
|
|
10
|
+
from maya_umbrella.signatures import MAYA_SECURE_SYSTEM_VIRUS_SIGNATURES
|
|
11
|
+
from maya_umbrella.vaccine import AbstractVaccine
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class Vaccine(AbstractVaccine):
|
|
15
|
+
"""A class for handling the maya_secure_system virus."""
|
|
16
|
+
|
|
17
|
+
virus_name = "maya_secure_system"
|
|
18
|
+
|
|
19
|
+
def collect_infected_nodes(self):
|
|
20
|
+
"""Collect all bad nodes related to the virus."""
|
|
21
|
+
for script_node in cmds.ls(type="script"):
|
|
22
|
+
if check_reference_node_exists(script_node):
|
|
23
|
+
continue
|
|
24
|
+
for attr_name in ("before", "after"):
|
|
25
|
+
script_string = get_attr_value(script_node, attr_name)
|
|
26
|
+
if not script_string:
|
|
27
|
+
continue
|
|
28
|
+
if check_virus_by_signature(script_string, MAYA_SECURE_SYSTEM_VIRUS_SIGNATURES):
|
|
29
|
+
self.report_issue(script_node)
|
|
30
|
+
self.api.add_infected_node(script_node)
|
|
31
|
+
|
|
32
|
+
def collect_issues(self):
|
|
33
|
+
"""Collect all issues related to the virus."""
|
|
34
|
+
# Add malicious files that need to be deleted
|
|
35
|
+
self.api.add_malicious_files(
|
|
36
|
+
[
|
|
37
|
+
os.path.join(self.api.local_script_path, "maya_secure_system.py"),
|
|
38
|
+
os.path.join(self.api.local_script_path, "maya_secure_system.pyc"),
|
|
39
|
+
],
|
|
40
|
+
)
|
|
41
|
+
self.collect_infected_user_setup_py()
|
|
42
|
+
self.collect_infected_nodes()
|
|
43
|
+
|
|
44
|
+
def collect_infected_user_setup_py(self):
|
|
45
|
+
"""Collect all bad userSetup.py files related to the virus."""
|
|
46
|
+
user_setup_py_files = [
|
|
47
|
+
os.path.join(self.api.local_script_path, "userSetup.py"),
|
|
48
|
+
os.path.join(self.api.user_script_path, "userSetup.py"),
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
for user_setup_py in user_setup_py_files:
|
|
52
|
+
if os.path.exists(user_setup_py):
|
|
53
|
+
if check_virus_file_by_signature(user_setup_py):
|
|
54
|
+
self.report_issue(user_setup_py)
|
|
55
|
+
self.api.add_infected_file(user_setup_py)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "maya_umbrella"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.15.0"
|
|
4
4
|
description = "A better Autodesk Maya antivirus tool detects and removes malicious."
|
|
5
5
|
homepage = "https://github.com/loonghao/maya_umbrella"
|
|
6
6
|
repository = "https://github.com/loonghao/maya_umbrella"
|
|
@@ -36,7 +36,7 @@ nox = { version = "^2024.3.2", python = ">=3.8.1,<3.11" }
|
|
|
36
36
|
|
|
37
37
|
[tool.commitizen]
|
|
38
38
|
name = "cz_conventional_commits"
|
|
39
|
-
version = "0.
|
|
39
|
+
version = "0.15.0"
|
|
40
40
|
tag_format = "v$version"
|
|
41
41
|
version_files = [
|
|
42
42
|
"pyproject.toml:version",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.14.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/_vendor/atomicwrites/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/_vendor/six/moves/configparser.pyi
RENAMED
|
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
|
{maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/hooks/delete_unknown_plugin_node.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{maya_umbrella-0.14.1 → maya_umbrella-0.15.0}/maya_umbrella/hooks/fix_on_model_change_3dc.py
RENAMED
|
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
|