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

Software: Apache. PHP/5.6.40 

uname -a: Linux cpanel06wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.80.el6.x86_64 #1 SMP Thu Sep 24
01:42:00 EDT 2020 x86_64
 

uid=851(cp949260) gid=853(cp949260) groups=853(cp949260) 

Safe-mode: OFF (not secure)

/opt/alt/python37/lib/python3.7/site-packages/raven/contrib/django/   drwxr-xr-x
Free 232.98 GB of 981.82 GB (23.73%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     resolver.py (2.84 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
from __future__ import absolute_import

import re

try:
    from django.urls import get_resolver
except ImportError:
    from django.core.urlresolvers import get_resolver


class RouteResolver(object):
    _optional_group_matcher = re.compile(r'\(\?\:([^\)]+)\)')
    _named_group_matcher = re.compile(r'\(\?P<(\w+)>[^\)]+\)')
    _non_named_group_matcher = re.compile(r'\([^\)]+\)')
    # [foo|bar|baz]
    _either_option_matcher = re.compile(r'\[([^\]]+)\|([^\]]+)\]')
    _camel_re = re.compile(r'([A-Z]+)([a-z])')

    _cache = {}

    def _simplify(self, pattern):
        r"""
        Clean up urlpattern regexes into something readable by humans:

        From:
        > "^(?P<sport_slug>\w+)/athletes/(?P<athlete_slug>\w+)/$"

        To:
        > "{sport_slug}/athletes/{athlete_slug}/"
        """
        # remove optional params
        # TODO(dcramer): it'd be nice to change these into [%s] but it currently
        # conflicts with the other rules because we're doing regexp matches
        # rather than parsing tokens
        result = self._optional_group_matcher.sub(lambda m: '%s' % m.group(1), pattern)

        # handle named groups first
        result = self._named_group_matcher.sub(lambda m: '{%s}' % m.group(1), result)

        # handle non-named groups
        result = self._non_named_group_matcher.sub('{var}', result)

        # handle optional params
        result = self._either_option_matcher.sub(lambda m: m.group(1), result)

        # clean up any outstanding regex-y characters.
        result = result.replace('^', '').replace('$', '') \
            .replace('?', '').replace('//', '/').replace('\\', '')

        return result

    def _resolve(self, resolver, path, parents=None):
        match = resolver.regex.search(path)
        if not match:
            return

        if parents is None:
            parents = [resolver]
        elif resolver not in parents:
            parents = parents + [resolver]

        new_path = path[match.end():]
        for pattern in resolver.url_patterns:
            # this is an include()
            if not pattern.callback:
                match = self._resolve(pattern, new_path, parents)
                if match:
                    return match
                continue

            elif not pattern.regex.search(new_path):
                continue

            try:
                return self._cache[pattern]
            except KeyError:
                pass

            prefix = ''.join(self._simplify(p.regex.pattern) for p in parents)
            result = prefix + self._simplify(pattern.regex.pattern)
            if not result.startswith('/'):
                result = '/' + result
            self._cache[pattern] = result
            return result

    def resolve(self, path, urlconf=None):
        resolver = get_resolver(urlconf)
        match = self._resolve(resolver, path)
        return match or path

:: 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.0225 ]--