Linux polon 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64
Apache/2.4.59 (Debian)
: 10.2.73.233 | : 3.145.106.176
Cant Read [ /etc/named.conf ]
5.6.40-64+0~20230107.71+debian10~1.gbp673146
www-data
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 /
ifk /
web /
prado4.3.2 /
Web /
UI /
ActiveControls /
[ HOME SHELL ]
Name
Size
Permission
Action
IActiveControl.php
571
B
-rw-r--r--
ICallbackEventHandler.php
881
B
-rw-r--r--
TActiveBoundColumn.php
2.53
KB
-rw-r--r--
TActiveButton.php
4.19
KB
-rw-r--r--
TActiveButtonColumn.php
2.17
KB
-rw-r--r--
TActiveCheckBox.php
5.5
KB
-rw-r--r--
TActiveCheckBoxColumn.php
3.59
KB
-rw-r--r--
TActiveCheckBoxList.php
4.15
KB
-rw-r--r--
TActiveCheckBoxListItem.php
814
B
-rw-r--r--
TActiveClientScript.php
2.51
KB
-rw-r--r--
TActiveControlAdapter.php
4.76
KB
-rw-r--r--
TActiveCustomValidator.php
5.52
KB
-rw-r--r--
TActiveCustomValidatorClientSi...
2.33
KB
-rw-r--r--
TActiveDataGrid.php
7.38
KB
-rw-r--r--
TActiveDataGridPager.php
842
B
-rw-r--r--
TActiveDataGridPagerEventParam...
1.02
KB
-rw-r--r--
TActiveDataList.php
3.75
KB
-rw-r--r--
TActiveDatePicker.php
5.28
KB
-rw-r--r--
TActiveDatePickerClientScript....
1.28
KB
-rw-r--r--
TActiveDropDownList.php
4.26
KB
-rw-r--r--
TActiveDropDownListColumn.php
2.33
KB
-rw-r--r--
TActiveEditCommandColumn.php
2.08
KB
-rw-r--r--
TActiveFileUpload.php
16.59
KB
-rw-r--r--
TActiveFileUploadCallbackParam...
737
B
-rw-r--r--
TActiveFileUploadItem.php
1.36
KB
-rw-r--r--
TActiveHiddenField.php
1.76
KB
-rw-r--r--
TActiveHtmlArea.php
3.18
KB
-rw-r--r--
TActiveHtmlArea5.php
3.15
KB
-rw-r--r--
TActiveHyperLink.php
3.45
KB
-rw-r--r--
TActiveHyperLinkColumn.php
2.29
KB
-rw-r--r--
TActiveImage.php
3.06
KB
-rw-r--r--
TActiveImageButton.php
5.33
KB
-rw-r--r--
TActiveLabel.php
2.67
KB
-rw-r--r--
TActiveLinkButton.php
4.86
KB
-rw-r--r--
TActiveListBox.php
4.43
KB
-rw-r--r--
TActiveListControlAdapter.php
4.18
KB
-rw-r--r--
TActiveListItemCollection.php
2.88
KB
-rw-r--r--
TActiveLiteralColumn.php
2.73
KB
-rw-r--r--
TActiveMultiView.php
3.54
KB
-rw-r--r--
TActivePageAdapter.php
9.87
KB
-rw-r--r--
TActivePager.php
6.39
KB
-rw-r--r--
TActivePanel.php
2.77
KB
-rw-r--r--
TActiveRadioButton.php
5.56
KB
-rw-r--r--
TActiveRadioButtonItem.php
824
B
-rw-r--r--
TActiveRadioButtonList.php
3.84
KB
-rw-r--r--
TActiveRatingList.php
4.12
KB
-rw-r--r--
TActiveRepeater.php
4.45
KB
-rw-r--r--
TActiveTableCell.php
7.01
KB
-rw-r--r--
TActiveTableCellEventParameter...
1.77
KB
-rw-r--r--
TActiveTableRow.php
7.6
KB
-rw-r--r--
TActiveTableRowEventParameter....
1.78
KB
-rw-r--r--
TActiveTemplateColumn.php
2.56
KB
-rw-r--r--
TActiveTextBox.php
3.7
KB
-rw-r--r--
TBaseActiveCallbackControl.php
8.29
KB
-rw-r--r--
TBaseActiveControl.php
3.65
KB
-rw-r--r--
TCallback.php
2.95
KB
-rw-r--r--
TCallbackClientScript.php
24.66
KB
-rw-r--r--
TCallbackClientSide.php
8.14
KB
-rw-r--r--
TCallbackErrorHandler.php
3.53
KB
-rw-r--r--
TCallbackEventParameter.php
2.27
KB
-rw-r--r--
TCallbackOptions.php
1.26
KB
-rw-r--r--
TCallbackPageStateTracker.php
5.39
KB
-rw-r--r--
TCallbackResponseAdapter.php
2.38
KB
-rw-r--r--
TCallbackResponseWriter.php
1.67
KB
-rw-r--r--
TEventTriggeredCallback.php
2.38
KB
-rw-r--r--
TInPlaceTextBox.php
8.29
KB
-rw-r--r--
TInvalidCallbackException.php
595
B
-rw-r--r--
TMapCollectionDiff.php
874
B
-rw-r--r--
TScalarDiff.php
711
B
-rw-r--r--
TStyleDiff.php
2.35
KB
-rw-r--r--
TTimeTriggeredCallback.php
3.54
KB
-rw-r--r--
TTriggeredCallback.php
1.65
KB
-rw-r--r--
TValueTriggeredCallback.php
3.21
KB
-rw-r--r--
TViewStateDiff.php
1.07
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : TActiveFileUpload.php
<?php /** * TActiveFileUpload.php * * @author Bradley Booms <Bradley.Booms@nsighttel.com> * @author Christophe Boulain <Christophe.Boulain@gmail.com> * @author Gabor Berczi <gabor.berczi@devworx.hu> (issue 349 remote vulnerability fix) * @author LANDWEHR Computer und Software GmbH <programmierung@landwehr-software.de> */ namespace Prado\Web\UI\ActiveControls; /** * Load TActiveControlAdapter and TFileUpload. */ use Exception; use Prado\Exceptions\TInvalidDataValueException; use Prado\Prado; use Prado\TPropertyValue; use Prado\Web\UI\INamingContainer; use Prado\Web\UI\WebControls\TFileUpload; use Prado\Web\UI\WebControls\THiddenField; use Prado\Web\UI\WebControls\TImage; use Prado\Web\UI\WebControls\TInlineFrame; use Prado\Web\Javascripts\TJavaScript; /** * TActiveFileUpload * * TActiveFileUpload displays a file upload field on a page. Upon postback, * the text entered into the field will be treated as the name of the file * that will be uploaded to the server. The property {@link getHasFile HasFile} * indicates whether the file upload is successful. If successful, the file * may be obtained by calling {@link saveAs} to save it at a specified place. * You can use {@link getFileName FileName}, {@link getFileType FileType}, * {@link getFileSize FileSize} to get the original client-side file name, * the file mime type, and the file size information. If the upload is not * successful, {@link getErrorCode ErrorCode} contains the error code * describing the cause of failure. * * TActiveFileUpload raises {@link onFileUpload OnFileUpload} event if a file is uploaded * (whether it succeeds or not). * * TActiveFileUpload actually does a postback in a hidden IFrame, and then does a callback. * This callback then raises the {@link onFileUpload OnFileUpload} event. After the postback * a status icon is displayed; either a green checkmark if the upload is successful, * or a red x if there was an error. * * TActiveFileUpload needs either an application level cache or a security manager to work securely. * * Since Prado 4.0 the TActiveFileUpload supports HTML5 multiple file uploads by setting the * {@link setMultiple Multiple} attribute to true. See the description of the parent class * {@see TFileUpload} for further details. * * @author Bradley Booms <Bradley.Booms@nsighttel.com> * @author Christophe Boulain <Christophe.Boulain@gmail.com> * @author LANDWEHR Computer und Software GmbH <programmierung@landwehr-software.de> * @method TActiveControlAdapter getAdapter() */ class TActiveFileUpload extends TFileUpload implements IActiveControl, ICallbackEventHandler, INamingContainer { public const SCRIPT_PATH = 'activefileupload'; /** * @var THiddenField a flag to tell which component is doing the callback. */ private $_flag; /** * @var TImage that spins to show that the file is being uploaded. */ private $_busy; /** * @var TImage that shows a green check mark for completed upload. */ private $_success; /** * @var TImage that shows a red X for incomplete upload. */ private $_error; /** * @var TInlineFrame used to submit the data in an "asynchronous" fashion. */ private $_target; /** * @var string class name used to instantiate items for uploaded files: {@link TFileUploadItem} */ protected static $fileUploadItemClass = '\Prado\Web\UI\ActiveControls\TActiveFileUploadItem'; /** * Creates a new callback control, sets the adapter to * TActiveControlAdapter. If you override this class, be sure to set the * adapter appropriately by, for example, by calling this constructor. */ public function __construct() { parent::__construct(); $this->setAdapter(new TActiveControlAdapter($this)); } /** * @param string $file asset file in the self::SCRIPT_PATH directory. * @return string asset file url. */ protected function getAssetUrl($file = '') { $base = $this->getPage()->getClientScript()->getPradoScriptAssetUrl(); return $base . '/' . self::SCRIPT_PATH . '/' . $file; } /** * This method is invoked when a file is uploaded. * If you override this method, be sure to call the parent implementation to ensure * the invocation of the attached event handlers. * @param \Prado\TEventParameter $param event parameter to be passed to the event handlers */ public function onFileUpload($param) { if ($this->_flag->getValue() && $this->getPage()->getIsPostBack() && $param == $this->_target->getUniqueID()) { $params = new TActiveFileUploadCallbackParams(); // save the files so that they will persist past the end of this return. foreach ($this->getFiles() as $file) { $localName = str_replace('\\', '/', tempnam(Prado::getPathOfNamespace($this->getTempPath()), '')); $file->saveAs($localName); $file->setLocalName($localName); $params->files[] = $file->toArray(); } // return some javascript to display a completion status. echo "<script> Options = new Object(); Options.clientID = '{$this->getClientID()}'; Options.targetID = '{$this->_target->getUniqueID()}'; Options.errorCode = '" . (int) !$this->getHasAllFiles() . "'; Options.callbackToken = '{$this->pushParamsAndGetToken($params)}'; Options.fileName = '" . TJavaScript::jsonEncode($this->getMultiple() ? array_column($params->files, 'fileName') : $this->getFileName(), JSON_HEX_APOS) . "'; Options.fileSize = '" . TJavaScript::jsonEncode($this->getMultiple() ? array_column($params->files, 'fileSize') : $this->getFileSize(), JSON_HEX_APOS) . "'; Options.fileType = '" . TJavaScript::jsonEncode($this->getMultiple() ? array_column($params->files, 'fileType') : $this->getFileType(), JSON_HEX_APOS) . "'; Options.errorCode = '" . TJavaScript::jsonEncode($this->getMultiple() ? array_column($params->files, 'errorCode') : $this->getErrorCode(), JSON_HEX_APOS) . "'; parent.Prado.WebUI.TActiveFileUpload.onFileUpload(Options); </script>"; exit(); } } /** * @return string the path where the uploaded file will be stored temporarily, in namespace format * default "Application.runtime.*" */ public function getTempPath() { return $this->getViewState('TempPath', 'Application.runtime.*'); } /** * @param string $value the path where the uploaded file will be stored temporarily in namespace format * default "Application.runtime.*" */ public function setTempPath($value) { $this->setViewState('TempPath', $value, 'Application.runtime.*'); } /** * @return bool a value indicating whether an automatic callback to the server will occur whenever the user modifies the text in the TTextBox control and then tabs out of the component. Defaults to true. * Note: When set to false, you will need to trigger the callback yourself. */ public function getAutoPostBack() { return $this->getViewState('AutoPostBack', true); } /** * @param bool $value a value indicating whether an automatic callback to the server will occur whenever the user modifies the text in the TTextBox control and then tabs out of the component. Defaults to true. * Note: When set to false, you will need to trigger the callback yourself. */ public function setAutoPostBack($value) { $this->setViewState('AutoPostBack', TPropertyValue::ensureBoolean($value), true); } /** * @return string A chuck of javascript that will need to be called if {{@link getAutoPostBack AutoPostBack} is set to false} */ public function getCallbackJavascript() { return "Prado.WebUI.TActiveFileUpload.fileChanged(\"{$this->getClientID()}\")"; } /** * @param mixed $sender * @throws TInvalidDataValueException if the {@link getTempPath TempPath} is not writable. */ public function onInit($sender) { parent::onInit($sender); if (!Prado::getApplication()->getCache()) { if (!Prado::getApplication()->getSecurityManager()) { throw new Exception('TActiveFileUpload needs either an application level cache or a security manager to work securely'); } } if (!is_writable(Prado::getPathOfNamespace($this->getTempPath()))) { throw new TInvalidDataValueException("activefileupload_temppath_invalid", $this->getTempPath()); } } /** * Raises <b>OnFileUpload</b> event. * * This method is required by {@link ICallbackEventHandler} interface. * This method is mainly used by framework and control developers. * @param TCallbackEventParameter $param the event parameter */ public function raiseCallbackEvent($param) { $cp = $param->getCallbackParameter(); if ($key = $cp->targetID == $this->_target->getUniqueID()) { $params = $this->popParamsByToken($cp->callbackToken); foreach ($params->files as $index => $file) { $_FILES[$key]['name'][$index] = stripslashes($file['fileName']); $_FILES[$key]['size'][$index] = (int) ($file['fileSize']); $_FILES[$key]['type'][$index] = $file['fileType']; $_FILES[$key]['error'][$index] = (int) ($file['errorCode']); $_FILES[$key]['tmp_name'][$index] = $file['localName']; } $this->loadPostData($key, null); $this->raiseEvent('OnFileUpload', $this, $param); } } /** * Raises postdata changed event. * This method calls {@link onFileUpload} method * This method is primarily used by framework developers. */ public function raisePostDataChangedEvent() { $this->onFileUpload($this->getPage()->getRequest()->itemAt('TActiveFileUpload_TargetId')); } protected function pushParamsAndGetToken(TActiveFileUploadCallbackParams $params) { if ($cache = Prado::getApplication()->getCache()) { // this is the most secure method, file info can't be forged from client side, no matter what $token = md5('TActiveFileUpload::Params::' . $this->getClientID() . '::' . rand(1000 * 1000, 9999 * 1000)); $cache->set($token, serialize($params), 5 * 60); // expire in 5 minutes - the callback should arrive back in seconds, actually } elseif ($mgr = Prado::getApplication()->getSecurityManager()) { // this is a less secure method, file info can be still forged from client side, but only if attacker knows the secret application key $token = urlencode(base64_encode($mgr->encrypt(serialize($params)))); } else { throw new Exception('TActiveFileUpload needs either an application level cache or a security manager to work securely'); } return $token; } protected function popParamsByToken($token) { if ($cache = Prado::getApplication()->getCache()) { $v = $cache->get($token); assert($v != ''); $cache->delete($token); // remove it from cache so it can't be used again and won't take up space either $params = unserialize($v); } elseif ($mgr = Prado::getApplication()->getSecurityManager()) { $v = $mgr->decrypt(base64_decode(urldecode($token))); $params = unserialize($v); } else { throw new Exception('TActiveFileUpload needs either an application level cache or a security manager to work securely'); } assert($params instanceof TActiveFileUploadCallbackParams); return $params; } /** * Publish the javascript * @param mixed $param */ public function onPreRender($param) { parent::onPreRender($param); if (!$this->getPage()->getIsPostBack() && isset($_GET['TActiveFileUpload_InputId']) && isset($_GET['TActiveFileUpload_TargetId']) && $_GET['TActiveFileUpload_InputId'] == $this->getClientID()) { $params = new TActiveFileUploadCallbackParams(); foreach ($this->getFiles() as $file) { $localName = str_replace('\\', '/', tempnam(Prado::getPathOfNamespace($this->getTempPath()), '')); $file->setLocalName($localName); // tricky workaround to intercept "uploaded file too big" error: real uploads happens in onFileUpload instead $file->setErrorCode(UPLOAD_ERR_FORM_SIZE); $params->files[] = $file->toArray(); } echo "<script> Options = new Object(); Options.clientID = '{$_GET['TActiveFileUpload_InputId']}'; Options.targetID = '{$_GET['TActiveFileUpload_TargetId']}'; Options.errorCode = '" . (int) !$this->getHasAllFiles() . "'; Options.callbackToken = '{$this->pushParamsAndGetToken($params)}'; Options.fileName = '" . TJavaScript::jsonEncode($this->getMultiple() ? array_column($params->files, 'fileName') : $this->getFileName(), JSON_HEX_APOS) . "'; Options.fileSize = '" . TJavaScript::jsonEncode($this->getMultiple() ? array_column($params->files, 'fileSize') : $this->getFileSize(), JSON_HEX_APOS) . "'; Options.fileType = '" . TJavaScript::jsonEncode($this->getMultiple() ? array_column($params->files, 'fileType') : $this->getFileType(), JSON_HEX_APOS) . "'; Options.errorCode = '" . TJavaScript::jsonEncode($this->getMultiple() ? array_column($params->files, 'errorCode') : $this->getErrorCode(), JSON_HEX_APOS) . "'; parent.Prado.WebUI.TActiveFileUpload.onFileUpload(Options); </script>"; } } public function createChildControls() { $this->getPage()->getClientScript()->registerPradoScript('activefileupload'); $this->_flag = new THiddenField(); $this->_flag->setID('Flag'); $this->getControls()->add($this->_flag); $this->_busy = new TImage(); $this->_busy->setID('Busy'); $this->_busy->setImageUrl($this->getAssetUrl('ActiveFileUploadIndicator.gif')); $this->_busy->setStyle("display:none"); $this->getControls()->add($this->_busy); $this->_success = new TImage(); $this->_success->setID('Success'); $this->_success->setImageUrl($this->getAssetUrl('ActiveFileUploadComplete.png')); $this->_success->setStyle("display:none"); $this->getControls()->add($this->_success); $this->_error = new TImage(); $this->_error->setID('Error'); $this->_error->setImageUrl($this->getAssetUrl('ActiveFileUploadError.png')); $this->_error->setStyle("display:none"); $this->getControls()->add($this->_error); $this->_target = new TInlineFrame(); $this->_target->setID('Target'); $this->_target->setFrameUrl('about:blank'); $this->_target->setStyle("width:0px; height:0px; border:none"); $this->getControls()->add($this->_target); } /** * Removes localfile on ending of the callback. * @param mixed $param */ public function onUnload($param) { if ($this->getPage()->getIsCallback()) { foreach ($this->getFiles() as $file) { if ($file->getHasFile() && file_exists($file->getLocalName())) { unlink($file->getLocalName()); } } } parent::onUnload($param); } /** * @return TBaseActiveCallbackControl standard callback control options. */ public function getActiveControl() { return $this->getAdapter()->getBaseActiveControl(); } /** * @return TCallbackClientSide client side request options. */ public function getClientSide() { return $this->getActiveControl()->getClientSide(); } /** * Adds ID attribute, and renders the javascript for active component. * @param \Prado\Web\UI\THtmlWriter $writer the writer used for the rendering purpose */ public function addAttributesToRender($writer) { parent::addAttributesToRender($writer); $writer->addAttribute('id', $this->getClientID()); $this->getActiveControl()->registerCallbackClientScript($this->getClientClassName(), $this->getClientOptions()); } /** * @return string corresponding javascript class name for this control. */ protected function getClientClassName() { return 'Prado.WebUI.TActiveFileUpload'; } /** * Gets the client side options for this control. * @return array ( inputID => input client ID, * flagID => flag client ID, * targetName => target unique ID, * formID => form client ID, * indicatorID => upload indicator client ID, * completeID => complete client ID, * errorID => error client ID) */ protected function getClientOptions() { $options['ID'] = $this->getClientID(); $options['EventTarget'] = $this->getUniqueID(); $options['inputID'] = $this->getClientID(); $options['flagID'] = $this->_flag->getClientID(); $options['targetID'] = $this->_target->getUniqueID(); $options['formID'] = $this->getPage()->getForm()->getClientID(); $options['indicatorID'] = $this->_busy->getClientID(); $options['completeID'] = $this->_success->getClientID(); $options['errorID'] = $this->_error->getClientID(); $options['autoPostBack'] = $this->getAutoPostBack(); return $options; } /** * @return TImage the image displayed when an upload * completes successfully. */ public function getSuccessImage() { $this->ensureChildControls(); return $this->_success; } /** * @return TImage the image displayed when an upload * does not complete successfully. */ public function getErrorImage() { $this->ensureChildControls(); return $this->_error; } /** * @return TImage the image displayed when an upload * is in progress. */ public function getBusyImage() { $this->ensureChildControls(); return $this->_busy; } }
Close