Exploit databaseDownload repository ZIP
GH-78762efc2c2c1d0d38de4362beab2332
kuttappu123/cve-2023-30212-lab
Sources for CVE-2023-30212
4 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files52
kuttappu123/cve-2023-30212-labRevision a49d3c23d182
- ↑..Parent directory
- block.textformat.php
- function.counter.php
- function.cprt.php
- function.cycle.php
- function.fetch.php
- function.html_checkboxes.php
- function.html_image.php
- function.html_options.php
- function.html_radios.php
- function.html_select_date.php
- function.html_select_time.php
- function.html_table.php
- function.mailto.php
- function.math.php
- function.token.php
- index.htm
- modifier.capitalize.php
- modifier.date_format.php
- modifier.debug_print_var.php
- modifier.escape.php
- modifier.img_change.php
- modifier.newdate_format.php
- modifier.regex_replace.php
- modifier.replace.php
- modifier.spacify.php
- modifier.truncate.php
- modifiercompiler.cat.php
- modifiercompiler.count_characters.php
- modifiercompiler.count_paragraphs.php
- modifiercompiler.count_sentences.php
- modifiercompiler.count_words.php
- modifiercompiler.default.php
- modifiercompiler.escape.php
- modifiercompiler.from_charset.php
- modifiercompiler.indent.php
- modifiercompiler.lower.php
- modifiercompiler.noprint.php
- modifiercompiler.string_format.php
- modifiercompiler.strip.php
- modifiercompiler.strip_tags.php
- modifiercompiler.to_charset.php
- modifiercompiler.unescape.php
- modifiercompiler.upper.php
- modifiercompiler.wordwrap.php
- outputfilter.trimwhitespace.php
- shared.escape_special_chars.php
- shared.literal_compiler_param.php
- shared.make_timestamp.php
- shared.mb_str_replace.php
- shared.mb_unicode.php
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
file/function/ourphp/plugins/shared.mb_wordwrap.php
PHP · 2,830 bytes<?php
/**
* Smarty shared plugin
*
* @package Smarty
* @subpackage PluginsShared
*/
if (!function_exists('smarty_mb_wordwrap')) {
/**
* Wrap a string to a given number of characters
*
* @link http://php.net/manual/en/function.wordwrap.php for similarity
* @param string $str the string to wrap
* @param int $width the width of the output
* @param string $break the character used to break the line
* @param boolean $cut ignored parameter, just for the sake of
* @return string wrapped string
* @author Rodney Rehm
*/
function smarty_mb_wordwrap($str, $width=75, $break="\n", $cut=false)
{
// break words into tokens using white space as a delimiter
$tokens = preg_split('!(\s)!S' . Smarty::$_UTF8_MODIFIER, $str, -1, PREG_SPLIT_NO_EMPTY + PREG_SPLIT_DELIM_CAPTURE);
$length = 0;
$t = '';
$_previous = false;
foreach ($tokens as $_token) {
$token_length = mb_strlen($_token, Smarty::$_CHARSET);
$_tokens = array($_token);
if ($token_length > $width) {
// remove last space
$t = mb_substr($t, 0, -1, Smarty::$_CHARSET);
$_previous = false;
$length = 0;
if ($cut) {
$_tokens = preg_split('!(.{' . $width . '})!S' . Smarty::$_UTF8_MODIFIER, $_token, -1, PREG_SPLIT_NO_EMPTY + PREG_SPLIT_DELIM_CAPTURE);
// broken words go on a new line
$t .= $break;
}
}
foreach ($_tokens as $token) {
$_space = !!preg_match('!^\s$!S' . Smarty::$_UTF8_MODIFIER, $token);
$token_length = mb_strlen($token, Smarty::$_CHARSET);
$length += $token_length;
if ($length > $width) {
// remove space before inserted break
if ($_previous && $token_length < $width) {
$t = mb_substr($t, 0, -1, Smarty::$_CHARSET);
}
// add the break before the token
$t .= $break;
$length = $token_length;
// skip space after inserting a break
if ($_space) {
$length = 0;
continue;
}
} elseif ($token == "\n") {
// hard break must reset counters
$_previous = 0;
$length = 0;
} else {
// remember if we had a space or not
$_previous = $_space;
}
// add the token
$t .= $token;
}
}
return $t;
}
}