Changeset 1155457
- Timestamp:
- 05/07/2015 03:09:56 PM (11 years ago)
- Location:
- sucuri-scanner/trunk
- Files:
-
- 4 edited
-
inc/css/sucuriscan-default-css.css (modified) (1 diff)
-
inc/tpl/integrity-corefiles.html.tpl (modified) (1 diff)
-
inc/tpl/integrity-corefiles.snippet.tpl (modified) (1 diff)
-
sucuri.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sucuri-scanner/trunk/inc/css/sucuriscan-default-css.css
r1151297 r1155457 10 10 .sucuriscan-visible{} 11 11 .sucuriscan-hidden{display:none !important} 12 .sucuriscan-opacity{opacity:0.6} 12 13 .sucuriscan-monospace{font-family:Monospace, Courier} 13 14 .sucuriscan-ellipsis{overflow:hidden;display:inline-block;white-space:nowrap;text-overflow:ellipsis} -
sucuri-scanner/trunk/inc/tpl/integrity-corefiles.html.tpl
r1155418 r1155457 56 56 <td colspan="5"> 57 57 <p> 58 The action to restore the content of a file will only work with files that were 59 <b>modified</b> or <b>removed</b>, for files that were <b>added</b> you must 60 either remove or mark as fixed. Files marked as <b>fixed</b> will always be 61 ignored from the integrity checks, an attacker can use this option to hide a 62 malicious file, so always check what files are being ignored. 58 <strong>Note.</strong> This is not a malware scanner but an integrity checker 59 which is a completely different thing, if you want to check if your site is 60 generating malicious code then use the <a href="%%SUCURI.URL.Scanner%%">malware 61 scan</a> tool. If you see the text <em>"must be fixed manually"</em> in any of 62 these files that means that they do not have write permissions so you can not 63 fix them using this tool. 63 64 </p> 64 65 -
sucuri-scanner/trunk/inc/tpl/integrity-corefiles.snippet.tpl
r1155418 r1155457 2 2 <tr class="%%SUCURI.CoreFiles.CssClass%% sucuriscan-hidden"> 3 3 <td class="check-column"> 4 <input type="checkbox" name="sucuriscan_integrity_files[]" value="%%SUCURI.CoreFiles.FilePath%%" /> 5 <input type="hidden" name="sucuriscan_integrity_types[]" value="%%SUCURI.CoreFiles.StatusType%%" /> 4 <input type="checkbox" name="sucuriscan_integrity_files[]" 5 value="%%SUCURI.CoreFiles.FilePath%%" %%SUCURI.CoreFiles.IsFixtableFile%% /> 6 <input type="hidden" name="sucuriscan_integrity_types[]" 7 value="%%SUCURI.CoreFiles.StatusType%%" %%SUCURI.CoreFiles.IsFixtableFile%% /> 6 8 </td> 7 9 <td><span class="sucuriscan-label sucuriscan-label-%%SUCURI.CoreFiles.StatusType%%">%%SUCURI.CoreFiles.StatusType%%</span></td> 8 10 <td><em title="%%SUCURI.CoreFiles.FileSizeNumber%% bytes">~%%SUCURI.CoreFiles.FileSizeHuman%%</em></td> 9 11 <td>%%SUCURI.CoreFiles.ModifiedAt%%</td> 10 <td><span class="sucuriscan-monospace sucuriscan-wraptext">%%SUCURI.CoreFiles.FilePath%%</span></td> 12 <td> 13 <span class="sucuriscan-monospace sucuriscan-wraptext">%%SUCURI.CoreFiles.FilePath%%</span> 14 <em>%%SUCURI.CoreFiles.IsNotFixable%%</em> 15 </td> 11 16 </tr> -
sucuri-scanner/trunk/sucuri.php
r1155418 r1155457 8537 8537 } 8538 8538 8539 // Generate the HTML code from the snippet template for this file.8539 // Add extra information to the file list. 8540 8540 $css_class = ( $counter % 2 == 0 ) ? '' : 'alternate'; 8541 8541 $file_size = @filesize( $full_filepath ); 8542 $is_fixable_html = ''; 8543 $is_fixable_text = ''; 8544 8545 // Check whether the file can be fixed automatically or not. 8546 if ( $file_info['is_fixable'] !== true ) { 8547 $css_class .= ' sucuriscan-opacity'; 8548 $is_fixable_html = 'disabled="disbled"'; 8549 $is_fixable_text = '(must be fixed manually)'; 8550 } 8551 8552 // Generate the HTML code from the snippet template for this file. 8542 8553 $template_variables['CoreFiles.List'] .= SucuriScanTemplate::get_snippet('integrity-corefiles', array( 8543 8554 'CoreFiles.CssClass' => $css_class, … … 8548 8559 'CoreFiles.FileSizeNumber' => number_format( $file_size ), 8549 8560 'CoreFiles.ModifiedAt' => SucuriScan::datetime( $file_info['modified_at'] ), 8561 'CoreFiles.IsFixtableFile' => $is_fixable_html, 8562 'CoreFiles.IsNotFixable' => $is_fixable_text, 8550 8563 )); 8551 8564 $counter += 1; … … 8632 8645 $output['stable'][] = array( 8633 8646 'filepath' => $file_path, 8647 'is_fixable' => false, 8634 8648 'modified_at' => 0, 8635 8649 ); 8636 8650 } else { 8637 8651 $modified_at = @filemtime( $full_filepath ); 8652 $is_fixable = (bool) is_writable( $full_filepath ); 8638 8653 $output['modified'][] = array( 8639 8654 'filepath' => $file_path, 8655 'is_fixable' => $is_fixable, 8640 8656 'modified_at' => $modified_at, 8641 8657 ); 8642 8658 } 8643 8659 } else { 8660 $is_fixable = is_writable( dirname( $full_filepath ) ); 8644 8661 $output['removed'][] = array( 8645 8662 'filepath' => $file_path, 8663 'is_fixable' => $is_fixable, 8646 8664 'modified_at' => 0, 8647 8665 ); … … 8661 8679 $full_filepath = ABSPATH . '/' . $file_path; 8662 8680 $modified_at = @filemtime( $full_filepath ); 8681 $is_fixable = (bool) is_writable( $full_filepath ); 8663 8682 $output['added'][] = array( 8664 8683 'filepath' => $file_path, 8684 'is_fixable' => $is_fixable, 8665 8685 'modified_at' => $modified_at, 8666 8686 );
Note: See TracChangeset
for help on using the changeset viewer.