File tree 1 file changed +4
-3
lines changed
monkey/agent_plugins/payloads/cryptojacker/src
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
- from pydantic import Field , conint
1
+ from pydantic import Field
2
2
3
3
from common .base_models import InfectionMonkeyBaseModel
4
+ from common .types import PercentLimited
4
5
5
6
6
7
class CryptojackerOptions (InfectionMonkeyBaseModel ):
@@ -11,12 +12,12 @@ class CryptojackerOptions(InfectionMonkeyBaseModel):
11
12
default = 300 , # 5 minutes
12
13
ge = 0 ,
13
14
)
14
- cpu_utilization : conint ( ge = 0 , le = 100 ) = Field ( # type: ignore[valid-type]
15
+ cpu_utilization : PercentLimited = Field ( # type: ignore[valid-type]
15
16
title = "CPU utilization" ,
16
17
description = "The percentage of CPU to use on a machine" ,
17
18
default = 80 ,
18
19
)
19
- memory_utilization : conint ( ge = 0 , le = 100 ) = Field ( # type: ignore[valid-type]
20
+ memory_utilization : PercentLimited = Field ( # type: ignore[valid-type]
20
21
title = "Memory utilization" ,
21
22
description = "The percentage of memory to use on a machine" ,
22
23
default = 20 ,
You can’t perform that action at this time.
0 commit comments