Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive detected #28

Open
h4ss4n opened this issue Jan 2, 2017 · 1 comment
Open

False positive detected #28

h4ss4n opened this issue Jan 2, 2017 · 1 comment

Comments

@h4ss4n
Copy link

h4ss4n commented Jan 2, 2017

Filename : slides_list_posts.php
Directory : ~htdocs/modules/revsliderprestashop/views/templates/
Detected as: Infected file (reason : obfuscated code on first line) :
Content :

<div class="postbox box-slideslist">^M          <h3>^M                  <span class='slideslist-title'><?php echo RevsliderPrestashop::$lang['Slides_List'];  ?></span>^M                       <span id="saving_indicator" class='slideslist-loading'><?php echo RevsliderPrestashop::$lang['Saving_Order'];  ?>...</span>^M           </h3>^M         <div class="inside">^M                  <?php if(empty($arrSlides)):?>^M                        <?php echo RevsliderPrestashop::$lang['No_Slides_Found'];  ?>^M                 <?php endif?>^M                 <ul id="list_slides" class="list_slides ui-sortable">^M         ^M                              <?php foreach($arrSlides as $index=>$slide):^M                                  ^M                                      $bgType = $slide->getParam("background_type","image");^M                                        ^M                                      $bgFit = $slide->getParam("bg_fit","cover");^M                                  $bgFitX = intval($slide->getParam("bg_fit_x","100"));^M                                 $bgFitY = intval($slide->getParam("bg_fit_y","100"));^M                                 ^M                                      $bgPosition = $slide->getParam("bg_position","center top");^M                                   $bgPositionX = intval($slide->getParam("bg_position_x","0"));^M                                 $bgPositionY = intval($slide->getParam("bg_position_y","0"));^M                                 ^M                                      $bgRepeat = $slide->getParam("bg_repeat","no-repeat");^M                                        ^M                                      $bgStyle = ' ';^M                                       if($bgFit == 'percentage'){^M                                           $bgStyle .= "background-size: ".$bgFitX.'% '.$bgFitY.'%;';^M                                    }else{^M                                                $bgStyle .= "background-size: ".$bgFit.";";^M                                   }^M                                     if($bgPosition == 'percentage'){^M                                              $bgStyle .= "background-position: ".$bgPositionX.'% '.$bgPositionY.'%;';^M                                      }else{^M                                                $bgStyle .= "background-position: ".$bgPosition.";";^M                                  }^M                                     $bgStyle .= "background-repeat: ".$bgRepeat.";";^M                              ^M                                      if($sortBy == UniteFunctionsWPRev::SORTBY_MENU_ORDER)^M                                         $order = $slide->getOrder();^M                                  else^M                                          $order = $index + 1;^M                                  //$urlImageForView = $slide->getUrlImageThumb();^M                                      ^M                                      ^M                                      $slideTitle = $slide->getParam("title","Slide");^M                                      $title = $slideTitle;^M                                 $filename = $slide->getImageFilename();^M                                       $imageAlt = stripslashes($slideTitle);^M                                        if(empty($imageAlt))^M                                          $imageAlt = "slide";^M                                  if($bgType == "image" && !empty($filename))^M                                           $title .= " (".$filename.")";^M                                 $postID = $slide->getID();^M                                    ^M                                      $tem_post_types = $slide->tem_post_types();^M                                   ^M                                      // print '<pre>';^M                                     // print_r(Tools::getvalue('id'));^M                                    // print '</pre>';^M                                    $sdsrevsliderid = Tools::getvalue('id');^M                                      if(isset($sdsrevsliderid) && !empty($sdsrevsliderid)){^M                                                $RevSlider = new RevSlider();^M                                         $img_type_set = $RevSlider->GetSliderImgSettings($sdsrevsliderid);^M                                    }^M                                     if(!isset($img_type_set) && empty($img_type_set)){^M                                            ^M                                              $img_type_set = 'home_default';^M                                       }^M                                     ^M                                      // start get image thumbnail^M                                  $prdid_image = Product::getCover($postID);^M                    if (sizeof($prdid_image) > 0)^M                    {^M                    $prdimage = new Image($prdid_image['id_image']);^M                    $prdimage_url = _PS_BASE_URL_._THEME_PROD_DIR_.$prdimage->getExistingImgPath()."-".$img_type_set.".jpg";^M                    }^M                    $urlImageForView = $prdimage_url;^M                                        // end get image thumbnail^M                                    // $urlEditSlide = UniteFunctionsWPRev::getUrlEditPost($postID);^M                                      $urlEditSlide = 'index.php?controller=AdminProducts&id_product='.$postID.'&updateproduct&token='.Tools::getAdminTokenLite('AdminProducts');^M                                   $linkEdit = UniteFunctionsRev::getHtmlLink($urlEditSlide, $title,"","",true);^M                                 $state = $slide->getParam("state","published");^M                               ?>^M                                    <li id="slidelist_item_<?php echo $postID?>" class="ui-state-default">^M                                                <span class="slide-col col-order">^M                                                    <span class="order-text"><?php echo $order?></span>^M                                                   <div class="state_loader" style="display:none;"></div>^M                                                        <?php if($state == "published"):?>^M                                                    <div class="icon_statep state_published" data-slideid="<?php echo $postID?>" title="<?php echo RevsliderPrestashop::$lang['Unpublish_Product'];  ?>"></div>^M                                                   <?php else:?>^M                                                 <div class="icon_statep state_unpublished" data-slideid="<?php echo $postID?>" title="<?php echo RevsliderPrestashop::$lang['Publish_Product'];  ?>"></div>^M                                                   <?php endif?>^M                                         </span>^M                                               <span class="slide-col col-name">^M                                                     <div class="slide-title-in-list"><?php echo $linkEdit?></div>^M                                                 <a target="_blank" class='button-primary revgreen' href='<?php echo $urlEditSlide?>'><i class="revicon-pencil-1"></i><?php echo RevsliderPrestashop::$lang['Edit_Post'];  ?></a>^M                                              </span>^M                                               <span class="slide-col col-image">^M                                                    <?php if(!empty($urlImageForView)):?>^M                                                 <div id="slide_image_<?php echo $postID?>" class="slide_imagep" title="" alt="<?php echo $imageAlt?>" style="background-image:url('<?php echo $urlImageForView?>');<?php echo $bgStyle; ?>"></div>^M                                                    <?php else:?>^M                                                 no image ^M                                                     <?php endif?>^M                                         </span>^M                                               <!-- <span class="slide-col col-operations-posts">^M                                                    ^M                                              </span> -->^M                                           <!-- <span class="slide-col col-handle">^M                                                      <div class="col-handle-inside">^M                                                               <span class="ui-icon ui-icon-arrowthick-2-n-s"></span>^M                                                        </div>^M                                                </span>  -->^M                                          <div class="clear"></div>^M                                     </li>^M                         <?php endforeach;?>^M                   </ul>^M         </div>^M        </div>
@soullivaneuh
Copy link
Contributor

@h4ss4n Please next time use multiline code block for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants