__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/**
* Abstract class for the hex transformations plugins
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Abs;
use PhpMyAdmin\FieldMetadata;
use PhpMyAdmin\Plugins\TransformationsPlugin;
use function __;
use function bin2hex;
use function chunk_split;
use function intval;
/**
* Provides common methods for all of the hex transformations plugins.
*/
abstract class HexTransformationsPlugin extends TransformationsPlugin
{
/**
* Gets the transformation description of the specific plugin
*
* @return string
*/
public static function getInfo()
{
return __(
'Displays hexadecimal representation of data. Optional first'
. ' parameter specifies how often space will be added (defaults'
. ' to 2 nibbles).'
);
}
/**
* Does the actual work of each specific transformations plugin.
*
* @param string $buffer text to be transformed
* @param array $options transformation options
* @param FieldMetadata|null $meta meta information
*
* @return string
*/
public function applyTransformation($buffer, array $options = [], ?FieldMetadata $meta = null)
{
// possibly use a global transform and feed it with special options
$cfg = $GLOBALS['cfg'];
$options = $this->getOptions($options, $cfg['DefaultTransformations']['Hex']);
$options[0] = intval($options[0]);
if ($options[0] < 1) {
return bin2hex($buffer);
}
return chunk_split(bin2hex($buffer), $options[0], ' ');
}
/* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
/**
* Gets the transformation name of the specific plugin
*
* @return string
*/
public static function getName()
{
return 'Hex';
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| Bool2TextTransformationsPlugin.php | File | 1.66 KB | 0644 |
|
| CodeMirrorEditorTransformationPlugin.php | File | 2.34 KB | 0644 |
|
| DateFormatTransformationsPlugin.php | File | 5.67 KB | 0644 |
|
| DownloadTransformationsPlugin.php | File | 2.7 KB | 0644 |
|
| ExternalTransformationsPlugin.php | File | 5.43 KB | 0644 |
|
| FormattedTransformationsPlugin.php | File | 1.57 KB | 0644 |
|
| HexTransformationsPlugin.php | File | 1.84 KB | 0644 |
|
| ImageLinkTransformationsPlugin.php | File | 1.73 KB | 0644 |
|
| ImageUploadTransformationsPlugin.php | File | 3.64 KB | 0644 |
|
| InlineTransformationsPlugin.php | File | 2.36 KB | 0644 |
|
| LongToIPv4TransformationsPlugin.php | File | 1.53 KB | 0644 |
|
| PreApPendTransformationsPlugin.php | File | 1.79 KB | 0644 |
|
| RegexValidationTransformationsPlugin.php | File | 1.91 KB | 0644 |
|
| SQLTransformationsPlugin.php | File | 1.34 KB | 0644 |
|
| SubstringTransformationsPlugin.php | File | 2.61 KB | 0644 |
|
| TextFileUploadTransformationsPlugin.php | File | 2.87 KB | 0644 |
|
| TextImageLinkTransformationsPlugin.php | File | 2.15 KB | 0644 |
|
| TextLinkTransformationsPlugin.php | File | 2.12 KB | 0644 |
|