!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux web25.us.cloudlogin.co 5.10.237-xeon-hst #1 SMP Mon May 5 15:10:04 UTC 2025 x86_64 

uid=233359(alpastrology) gid=888(tty) groups=888(tty),33(tape) 

Safe-mode: OFF (not secure)

/usr/lib/python3.6/site-packages/tuned/hardware/   drwxr-xr-x
Free 6181.92 GB of 6263.12 GB (98.7%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     device_matcher.py (1.54 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
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

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0119 ]--