maya-umbrella 0.13.0__py2.py3-none-any.whl → 0.14.1__py2.py3-none-any.whl

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.
@@ -1 +1 @@
1
- __version__ = "0.13.0"
1
+ __version__ = "0.14.1"
maya_umbrella/cleaner.py CHANGED
@@ -22,6 +22,7 @@ class MayaVirusCleaner(object):
22
22
  translator (Translator): Translator object for translation purposes.
23
23
  collector (MayaVirusCollector): MayaVirusCollector object for collecting issues.
24
24
  """
25
+
25
26
  def __init__(self, collector, logger=None):
26
27
  """Initialize the MayaVirusCleaner.
27
28
 
@@ -50,6 +51,9 @@ class MayaVirusCleaner(object):
50
51
  def fix_malicious_files(self):
51
52
  """Fix malicious files."""
52
53
  for file_ in self.collector.malicious_files:
54
+ if not os.access(file_, os.W_OK):
55
+ self.logger.debug(self.translator.translate("file_not_writable", name=file_))
56
+ continue
53
57
  if os.path.exists(file_):
54
58
  if os.path.isfile(file_):
55
59
  self.logger.debug(self.translator.translate("remove_file", name=file_))
@@ -94,6 +98,9 @@ class MayaVirusCleaner(object):
94
98
  """Fix infected files."""
95
99
  for file_path in self.collector.infected_files:
96
100
  self.logger.info(self.translator.translate("fix_infected_files", name=file_path))
101
+ if not os.access(file_path, os.W_OK):
102
+ self.logger.debug(self.translator.translate("file_not_writable", name=file_path))
103
+ continue
97
104
  remove_virus_file_by_signature(file_path, FILE_VIRUS_SIGNATURES)
98
105
  self.collector.remove_infected_file(file_path)
99
106
 
@@ -1,19 +1,20 @@
1
1
  {
2
- "start_fix_issues": "Start fixing all problems related to Maya virus $name",
3
- "finish_fix_issues": "Done.",
4
- "init_message": "Successfully loaded <hl>maya_umbrella</hl> under protection.",
5
- "init_standalone_message": "-----------------------Loading maya_umbrella successfully----------------------",
6
- "report_issue": "$name: Infected by Malware!",
7
- "infected_nodes": "Infected nodes: $name: ",
8
- "bad_files": "Bad files: $name",
9
- "infected_script_jobs": "Infected script jobs: $name",
10
- "infected_files": "Infected files: $name",
11
- "infected_reference_files": "Infected reference files: $name",
12
- "fix_infected_files": "Clean infected files: $name",
13
- "fix_infected_nodes": "Delete infected nodes:$name",
14
- "fix_infected_reference_nodes": "trying fix infected nodes from reference:$name",
15
- "delete": "Deleting: $name",
16
- "remove_file": "Deleting file:$name",
17
- "remove_path": "Deleting path:$name",
18
- "fix_script_job": "Kill script job: %s"
2
+ "start_fix_issues": "Start fixing all problems related to Maya virus $name",
3
+ "finish_fix_issues": "Repair completed.",
4
+ "init_message": "Successfully loaded <hl>maya_umbrella</hl> protection.",
5
+ "init_standalone_message": "----------------------- successfully loaded maya_umbrella-----------------------",
6
+ "report_issue": "$name: Maliciously infected!",
7
+ "infected_nodes": "Infected node: $name:",
8
+ "bad_files": "Files to be cleaned up: $name",
9
+ "infected_script_jobs": "Infected Script jobs: $name",
10
+ "infected_files": "Infected file: $name",
11
+ "infected_reference_files": "Infected reference file: $name",
12
+ "fix_infected_files": "Clean up infected files: $name",
13
+ "fix_infected_nodes": "Delete infected node: $name",
14
+ "fix_infected_reference_nodes": "Attempt to repair the infected reference node: $name",
15
+ "delete": "Delete infected files: $name",
16
+ "remove_file": "Delete file: $name",
17
+ "remove_path": "Delete folder: $name",
18
+ "fix_script_job": "Delete infected node: $name",
19
+ "file_not_writable": "The file is not writable: $name"
19
20
  }
@@ -6,8 +6,8 @@
6
6
  "report_issue": "$name:被恶意感染!",
7
7
  "infected_nodes": "被感染节点:$name: ",
8
8
  "bad_files": "需要被清理的文件:$name",
9
- "infected_script_jobs": "被感染的script jobs:$name",
10
- "infected_files": "被感染的脚本:$name",
9
+ "infected_script_jobs": "被感染的Script jobs:$name",
10
+ "infected_files": "被感染的文件:$name",
11
11
  "infected_reference_files": "被感染的参考文件:$name",
12
12
  "fix_infected_files": "清理被感染的文件:$name",
13
13
  "fix_infected_nodes": "删除被感染的节点:$name",
@@ -15,5 +15,6 @@
15
15
  "delete": "删除感染文件:$name",
16
16
  "remove_file": "删除文件:$name",
17
17
  "remove_path": "删除文件夹:$name",
18
- "fix_script_job": "删除被感染的节点:$name"
18
+ "fix_script_job": "删除被感染的节点:$name",
19
+ "file_not_writable": "文件不可写:$name"
19
20
  }
@@ -1,6 +1,7 @@
1
1
  # Import built-in modules
2
2
  import glob
3
3
  import os
4
+ import platform
4
5
 
5
6
  # Import local modules
6
7
  from maya_umbrella.filesystem import check_virus_by_signature
@@ -81,7 +82,8 @@ class Vaccine(AbstractVaccine):
81
82
 
82
83
  def collect_issues(self):
83
84
  """Collect all issues related to the virus."""
84
- self.api.add_malicious_file(os.path.join(os.getenv("APPDATA"), "syssst"))
85
+ if platform.system() == "Windows":
86
+ self.api.add_malicious_file(os.path.join(os.getenv("APPDATA"), "syssst"))
85
87
  self.collect_infected_mel_files()
86
88
  self.collect_infected_hik_files()
87
89
  self.collect_infected_nodes()
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: maya_umbrella
3
- Version: 0.13.0
4
- Summary: Check and fix maya virus.
3
+ Version: 0.14.1
4
+ Summary: A better Autodesk Maya antivirus tool detects and removes malicious.
5
5
  Home-page: https://github.com/loonghao/maya_umbrella
6
6
  License: MIT
7
- Keywords: notifiers,python,Maya,dcc
7
+ Keywords: Autodesk Maya,python,Maya,dcc,antivirus,Security Tools,maya_umbrella
8
8
  Author: longhao
9
9
  Author-email: hal.long@outlook.com
10
10
  Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*
@@ -23,7 +23,7 @@ Project-URL: Documentation, https://github.com/loonghao/maya_umbrella
23
23
  Project-URL: Repository, https://github.com/loonghao/maya_umbrella
24
24
  Description-Content-Type: text/markdown
25
25
 
26
- # maya-umbrella
26
+ ![maya_umbrella.ing Banner](https://raw.githubusercontent.com/loonghao/maya_umbrella/main/resources/banner.png)
27
27
 
28
28
  [![Python Version](https://img.shields.io/pypi/pyversions/maya-umbrella)](https://img.shields.io/pypi/pyversions/maya-umbrella)
29
29
  [![Nox](https://img.shields.io/badge/%F0%9F%A6%8A-Nox-D85E00.svg)](https://github.com/wntrblm/nox)
@@ -46,6 +46,8 @@ Description-Content-Type: text/markdown
46
46
  [![All Contributors](https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square)](#contributors-)
47
47
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
48
48
 
49
+ A better Autodesk Maya antivirus tool detects and removes malicious.
50
+
49
51
  This tool is designed to provide a robust solution for identifying and resolving any potential viruses within Autodesk
50
52
  Maya.
51
53
  It ensures a secure and seamless user experience by proactively scanning for threats and effectively neutralizing them.
@@ -55,11 +57,15 @@ It can be provided as an API for seamless integration into your existing pipelin
55
57
  # 安装
56
58
 
57
59
  ## pip 安装
60
+ maya_umbrella is distributed as a standard pipy package, so we can install it via pip install.
61
+
58
62
  maya_umbrella是以标准pipy包去发布的,所以我们可以通过pip install去安装
59
63
  ```shell
60
64
  your/maya-root/mayapy -m pip install maya-umbrella
61
65
  ```
62
66
  ## 一键安装
67
+ Download the corresponding version of the zip package in the release, unzip it and double-click `install.bat` to install it.
68
+
63
69
  在release里面下载对应版本的zip包,解压后双击`install.bat`即可安装
64
70
 
65
71
  更新版本
@@ -88,13 +94,21 @@ pip install -r requirements-dev.txt
88
94
 
89
95
 
90
96
  ## 在maya中测试
97
+ With `nox -s maya -- <maya version>`, start maya.
98
+ Nox will dynamically register a nox session based on your local installation of maya,
99
+ e.g. if you have `maya-2020` installed locally, then you can start maya with a test environment.
100
+ Then you can start maya with a test environment via
91
101
 
92
102
  通过`nox -s maya -- <maya version>`, 启动maya.
93
103
  nox会动态根据你本地安装得maya去注册nox session, 比如你本地安装了`maya-2020`,
94
104
  那么通过可以启动带有测试环境的maya
105
+
95
106
  ```shell
96
107
  nox -s maya -- 2018
97
108
  ```
109
+ **Note: there are two `-` between maya and the version number**.
110
+
111
+ Starting maya and executing the following code in the script editor will dynamically open the ma file from `<repo>/tests/virus/` to test it.
98
112
 
99
113
  **注意:maya 与 版本号之间有 俩个`-`**
100
114
 
@@ -105,23 +119,29 @@ import manual_test_in_maya
105
119
 
106
120
  manual_test_in_maya.start()
107
121
  ```
122
+ It is also possible to execute the corresponding tests via pytest, which also requires a local installation of the corresponding maya
108
123
 
109
124
  也可以通过pytest去执行对应的测试,也需要本地安装了对应的maya
110
125
 
111
126
  ```shell
112
127
  nox -s maya -- 2018 --test
113
128
  ```
129
+ **Note: Command line crash may occur in versions below maya-2022 (PY2)**.
114
130
 
115
131
  **注意:在maya-2022 (PY2) 以下的版本可能会出现命令行crash的情况**
116
132
 
117
133
 
118
134
  ## 增加新的疫苗
135
+ 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
+ Inherit `from maya_umbrella.vaccine import AbstractVaccine` and call the class `Vaccine`, and then write the virus collection logic.
119
137
 
120
138
  在`<repo>/maya_umbrella/vaccines/` 新建一个py, 因为有很多病毒没有具体的名字代号,我们统一以`vaccine<id>.py`
121
139
  继承`from maya_umbrella.vaccine import AbstractVaccine`并且class名字叫`Vaccine`即可, 然后去写具体的收集病毒逻辑
122
140
 
123
141
  ## 代码检查
124
142
 
143
+ We can use the encapsulated `nox` command to perform a code check.
144
+
125
145
  我们可以利用封装好的`nox`命令去执行进行代码检查
126
146
 
127
147
  ```shell
@@ -134,6 +154,9 @@ nox -s lint-fix
134
154
  ```
135
155
 
136
156
  # 生成安装包
157
+ Execute the following command to create a zip under <repo>/.zip, with `--version` the version number of the current tool.
158
+
159
+ **Note: between `make-zip` and `--version` there are two `-`**.
137
160
 
138
161
  执行下面的命令可以在<repo>/.zip下面创建zip,参数 `--version` 当前工具的版本号
139
162
 
@@ -1,5 +1,5 @@
1
1
  maya_umbrella/__init__.py,sha256=rcCnFWmELeJsGoKvLHyzC_GmZu-eT1QXjQCHRGj6HuQ,529
2
- maya_umbrella/__version__.py,sha256=DgpLNbv0e1LIEOOe54Db8_390i9pelMEFEnsBsNmyhA,23
2
+ maya_umbrella/__version__.py,sha256=DcrUHmqhXJJz-Sh-CsHfn9W6Q5OL-VL2FalGEX5hy6E,23
3
3
  maya_umbrella/_vendor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  maya_umbrella/_vendor/atomicwrites/LICENSE,sha256=h4Mp8L2HitAVEpzovagvSB6G7C6Agx6QnA1nFx2SLnM,1069
5
5
  maya_umbrella/_vendor/atomicwrites/__init__.py,sha256=myvxvKRBb7vebPTSUiAopsRrvsm6VojiAvET1xohT-4,6970
@@ -10,7 +10,7 @@ maya_umbrella/_vendor/six/moves/configparser.pyi,sha256=OOloYod0yM3pPe0YlqnFSkiW
10
10
  maya_umbrella/_vendor/six.LICENSE,sha256=i7hQxWWqOJ_cFvOkaWWtI9gq3_YPI5P8J2K2MYXo5sk,1066
11
11
  maya_umbrella/_vendor/six.py,sha256=TOOfQi7nFGfMrIvtdr6wX4wyHH8M7aknmuLfo2cBBrM,34549
12
12
  maya_umbrella/_vendor/vendor.txt,sha256=9yyM8r0ibzfkXqgcAehZId0IsvELLV18YTxi6cwF7KA,32
13
- maya_umbrella/cleaner.py,sha256=Xj8BU0gohvh3E7RcDwQw_xryCzN5RBYGH9UTPVxiMPA,5045
13
+ maya_umbrella/cleaner.py,sha256=T_-QgF7Or9Bqoa463YZm2trhwGu0-KfbyiozXj3G86o,5384
14
14
  maya_umbrella/collector.py,sha256=SiC-wpDjer7w6ofsyWTFJmUF8pPz233xDXeANNz-LrY,13119
15
15
  maya_umbrella/constants.py,sha256=SuD8OP8e0Kh3a9ohyS5_MXjo5pHNQ8MWEPtJ6puZfIU,130
16
16
  maya_umbrella/defender.py,sha256=eT4uK23uOB1V8Y3uiaU1C2Tp-s1SngrGo3TWDbSIVJY,6008
@@ -22,8 +22,8 @@ maya_umbrella/hooks/fix_model_panel.py,sha256=dLuMOz5uQ1nqAboNWMCx-Bi_gHM3FQNTlG
22
22
  maya_umbrella/hooks/fix_no_scene_name.py,sha256=isE7_uOcByVbg9YG6FenzmJrodoteo8sheVzyDnrFqY,381
23
23
  maya_umbrella/hooks/fix_on_model_change_3dc.py,sha256=o4WEQPcHNzaTMXdNnHZWWNCYlHfLxcSFYXR4YW0ZLwk,484
24
24
  maya_umbrella/i18n.py,sha256=aWaIncHh5Zq02hErMbHHLoQm_8Fu-YfBWQ15sUgsBJk,2642
25
- maya_umbrella/locales/en_US.json,sha256=LW2gPgO2YJIYR5UfcIBuxW_DS7rf4gkjeVuADqs1V5s,962
26
- maya_umbrella/locales/zh_CN.json,sha256=UsuRN2yaxxc9LE-7NQkbMqrkjXjNhNegS0QRkQLSTiE,1006
25
+ maya_umbrella/locales/en_US.json,sha256=Kcgg5BrNFSw7kUFkbepRIhXcUek4Kb0m43b0NmAkT2g,1095
26
+ maya_umbrella/locales/zh_CN.json,sha256=eQbsZsUj87B5HhHi_usTNGzwo01MLjkHKM11KWhhSwM,1056
27
27
  maya_umbrella/log.py,sha256=SLgBPpnDpkDhOU94UHNPqanhKr6aZiJn4XdwIsoXD4M,1355
28
28
  maya_umbrella/maya_funs.py,sha256=_4LaMO4cRTCcbgNj2ei7UtSLAnCRY_ylHiLGKgvM4sE,3652
29
29
  maya_umbrella/scanner.py,sha256=1-GY-Jx1iECnAo-L2Lw5e5t5zaQsMwWDH0A4TOjlIww,4428
@@ -32,8 +32,8 @@ maya_umbrella/vaccine.py,sha256=aBW6pdT4tD4OMBPZ-d3E4_n16Rylz-2gb7JWzMZVPK0,1022
32
32
  maya_umbrella/vaccines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
33
  maya_umbrella/vaccines/vaccine1.py,sha256=WLo1uJElTLSjVCf5CBtRNU4HKs63my5mkHiGqTfnNEE,489
34
34
  maya_umbrella/vaccines/vaccine2.py,sha256=qYiI_-BSojgN7j4esYCGBDLeyBSneDOGUwZhKHccxh8,2170
35
- maya_umbrella/vaccines/vaccine3.py,sha256=f1jO9pyyZ_Ep18HR-fCQfGEi-TnNKXzjdCi9ORSZUx0,3613
36
- maya_umbrella-0.13.0.dist-info/LICENSE,sha256=tJf0Pz8q_65AjEkm3872K1cl4jGil28vJO5Ko_LhUqc,1060
37
- maya_umbrella-0.13.0.dist-info/METADATA,sha256=3COg7DKGNx241YmlU6aVJOssLpRmpsKeLXSFa-I2Sx0,11722
38
- maya_umbrella-0.13.0.dist-info/WHEEL,sha256=IrRNNNJ-uuL1ggO5qMvT1GGhQVdQU54d6ZpYqEZfEWo,92
39
- maya_umbrella-0.13.0.dist-info/RECORD,,
35
+ maya_umbrella/vaccines/vaccine3.py,sha256=vcjGt0jZxBDb7iCUMmBWBQGPZD3BFH96gL6pPxNwDr0,3676
36
+ maya_umbrella-0.14.1.dist-info/LICENSE,sha256=tJf0Pz8q_65AjEkm3872K1cl4jGil28vJO5Ko_LhUqc,1060
37
+ maya_umbrella-0.14.1.dist-info/METADATA,sha256=xZybVtUu3QVLnqV5cNT4POCiZ2YnvQ_5caxfJcz8N1A,13413
38
+ maya_umbrella-0.14.1.dist-info/WHEEL,sha256=IrRNNNJ-uuL1ggO5qMvT1GGhQVdQU54d6ZpYqEZfEWo,92
39
+ maya_umbrella-0.14.1.dist-info/RECORD,,