MOON
Server: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
System: Linux csr818.wilogic.com 2.6.18-419.el5xen #1 SMP Fri Feb 24 22:50:37 UTC 2017 x86_64
User: digitals (531)
PHP: 5.4.45
Disabled: NONE
Upload Files
File: //proc/self/root/scripts.20110531.215904.25158/wysiwygpro_cleanup
#!/usr/bin/perl
# cpanel - wysiwygpro_cleanup                     Copyright(c) 2010 cPanel, Inc.
#                                                           All rights Reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

BEGIN { unshift @INC, '/usr/local/cpanel'; }

use strict;
use Cpanel::SafeFile;

die '/etc/passwd does not exist!' if !-e '/etc/passwd';

my @wysiwyg_files = qw(
  WysiwygPro/Developer_Redistribution_License_Agreement.doc
  WysiwygPro/Manual_222.doc
  WysiwygPro/editor_files/addcolumn.php
  WysiwygPro/editor_files/addrow.php
  WysiwygPro/editor_files/blank.php
  WysiwygPro/editor_files/bookmark.php
  WysiwygPro/editor_files/config.php
  WysiwygPro/editor_files/custom.php
  WysiwygPro/editor_files/dialoge_theme.css
  WysiwygPro/editor_files/dialog_frame.php
  WysiwygPro/editor_files/document.php
  WysiwygPro/editor_files/editor_class.php
  WysiwygPro/editor_files/editor_functions.php
  WysiwygPro/editor_files/editor_theme.css
  WysiwygPro/editor_files/edittable.php
  WysiwygPro/editor_files/find.php
  WysiwygPro/editor_files/hyperlink.php
  WysiwygPro/editor_files/imageoptions.php
  WysiwygPro/editor_files/image.php
  WysiwygPro/editor_files/images/back.gif
  WysiwygPro/editor_files/images/bgcolor.gif
  WysiwygPro/editor_files/images/bold.gif
  WysiwygPro/editor_files/images/bookmark.gif
  WysiwygPro/editor_files/images/bookmark_symbol.gif
  WysiwygPro/editor_files/images/brackets.gif
  WysiwygPro/editor_files/images/branch.gif
  WysiwygPro/editor_files/images/bullist.gif
  WysiwygPro/editor_files/images/cancel.gif
  WysiwygPro/editor_files/images/center.gif
  WysiwygPro/editor_files/images/choose_image.gif
  WysiwygPro/editor_files/images/copy.gif
  WysiwygPro/editor_files/images/custom.gif
  WysiwygPro/editor_files/images/cut.gif
  WysiwygPro/editor_files/images/deindent.gif
  WysiwygPro/editor_files/images/delcell.gif
  WysiwygPro/editor_files/images/delcol.gif
  WysiwygPro/editor_files/images/delete.gif
  WysiwygPro/editor_files/images/delrow.gif
  WysiwygPro/editor_files/images/doc_icon.gif
  WysiwygPro/editor_files/images/doc_link.gif
  WysiwygPro/editor_files/images/down_arrow.gif
  WysiwygPro/editor_files/images/edittable.gif
  WysiwygPro/editor_files/images/email_address.gif
  WysiwygPro/editor_files/images/exe_icon.gif
  WysiwygPro/editor_files/images/external_link.gif
  WysiwygPro/editor_files/images/file_on_this_site.gif
  WysiwygPro/editor_files/images/find.gif
  WysiwygPro/editor_files/images/folder.gif
  WysiwygPro/editor_files/images/fontcolor.gif
  WysiwygPro/editor_files/images/gif_icon.gif
  WysiwygPro/editor_files/images/help.gif
  WysiwygPro/editor_files/images/htm_icon.gif
  WysiwygPro/editor_files/images/html.gif
  WysiwygPro/editor_files/images/icon_rule.gif
  WysiwygPro/editor_files/images/image.gif
  WysiwygPro/editor_files/images/image_icon.gif
  WysiwygPro/editor_files/images/inindent.gif
  WysiwygPro/editor_files/images/inscell.gif
  WysiwygPro/editor_files/images/inscol.gif
  WysiwygPro/editor_files/images/inscolleft.gif
  WysiwygPro/editor_files/images/inscolright.gif
  WysiwygPro/editor_files/images/insrowabove.gif
  WysiwygPro/editor_files/images/insrowbelow.gif
  WysiwygPro/editor_files/images/insrow.gif
  WysiwygPro/editor_files/images/instable.gif
  WysiwygPro/editor_files/images/italic.gif
  WysiwygPro/editor_files/images/jpg_icon.gif
  WysiwygPro/editor_files/images/justify.gif
  WysiwygPro/editor_files/images/left.gif
  WysiwygPro/editor_files/images/link.gif
  WysiwygPro/editor_files/images/load_bar.gif
  WysiwygPro/editor_files/images/mov_icon.gif
  WysiwygPro/editor_files/images/mrgcelld.gif
  WysiwygPro/editor_files/images/mrgcell.gif
  WysiwygPro/editor_files/images/mrgcellh.gif
  WysiwygPro/editor_files/images/newfolder.gif
  WysiwygPro/editor_files/images/newpage.gif
  WysiwygPro/editor_files/images/normal.gif
  WysiwygPro/editor_files/images/numlist.gif
  WysiwygPro/editor_files/images/open_folder.gif
  WysiwygPro/editor_files/images/paragraph.gif
  WysiwygPro/editor_files/images/paste.gif
  WysiwygPro/editor_files/images/pasteword.gif
  WysiwygPro/editor_files/images/pdf_icon.gif
  WysiwygPro/editor_files/images/place_on_this_page.gif
  WysiwygPro/editor_files/images/png_icon.gif
  WysiwygPro/editor_files/images/post.gif
  WysiwygPro/editor_files/images/pps_icon.gif
  WysiwygPro/editor_files/images/ppt_icon.gif
  WysiwygPro/editor_files/images/preview.gif
  WysiwygPro/editor_files/images/print.gif
  WysiwygPro/editor_files/images/redo.gif
  WysiwygPro/editor_files/images/rem_link.gif
  WysiwygPro/editor_files/images/rename.gif
  WysiwygPro/editor_files/images/right.gif
  WysiwygPro/editor_files/images/rm_icon.gif
  WysiwygPro/editor_files/images/rtf_icon.gif
  WysiwygPro/editor_files/images/save.gif
  WysiwygPro/editor_files/images/send.gif
  WysiwygPro/editor_files/images/smiley.gif
  WysiwygPro/editor_files/images/space.gif
  WysiwygPro/editor_files/images/spacer.gif
  WysiwygPro/editor_files/images/specialchar.gif
  WysiwygPro/editor_files/images/spelling.gif
  WysiwygPro/editor_files/images/spltcell.gif
  WysiwygPro/editor_files/images/spltcellh.gif
  WysiwygPro/editor_files/images/swf_icon.gif
  WysiwygPro/editor_files/images/temp_icon.gif
  WysiwygPro/editor_files/images/txt_icon.gif
  WysiwygPro/editor_files/images/under.gif
  WysiwygPro/editor_files/images/undo.gif
  WysiwygPro/editor_files/images/unknown_icon.gif
  WysiwygPro/editor_files/images/unmrgcelld.gif
  WysiwygPro/editor_files/images/up.gif
  WysiwygPro/editor_files/images/view.gif
  WysiwygPro/editor_files/images/white.gif
  WysiwygPro/editor_files/images/wmv_icon.gif
  WysiwygPro/editor_files/images/wrap_preview.gif
  WysiwygPro/editor_files/images/xl_icon.gif
  WysiwygPro/editor_files/images/zip_icon.gif
  WysiwygPro/editor_files/includes/common.php
  WysiwygPro/editor_files/includes/load_message.php
  WysiwygPro/editor_files/index.html
  WysiwygPro/editor_files/insert_hr.php
  WysiwygPro/editor_files/INSTALL_HELP.php
  WysiwygPro/editor_files/js/dialogEditorShared.js
  WysiwygPro/editor_files/js/dialogShared.js
  WysiwygPro/editor_files/js/editorShared.js
  WysiwygPro/editor_files/js/IE5script.js
  WysiwygPro/editor_files/js/MozScript.js
  WysiwygPro/editor_files/lang/en-uk.php
  WysiwygPro/editor_files/lang/en-us.php
  WysiwygPro/editor_files/mrgcell.php
  WysiwygPro/editor_files/no_preview.php
  WysiwygPro/editor_files/pastewin.php
  WysiwygPro/editor_files/secure.htm
  WysiwygPro/editor_files/selcolor.php
  WysiwygPro/editor_files/smileys.php
  WysiwygPro/editor_files/special_characters.php
  WysiwygPro/editor_files/table.php
  WysiwygPro/editor_files/templates/IE5editor.tpl
  WysiwygPro/editor_files/templates/MozEditor.tpl
  WysiwygPro/editor_files/templates/textEditor.tpl
  WysiwygPro/editor_files/unmrgcell.php
  WysiwygPro/.htaccess
  WysiwygPro/index.html
  WysiwygPro/login.pl
  WysiwygPro/template
  WysiwygPro/version
);

my @wysiwyg_dirs = qw(
  WysiwygPro/editor_files/templates
  WysiwygPro/editor_files/lang
  WysiwygPro/editor_files/js
  WysiwygPro/editor_files/includes
);

my $passwdlock = Cpanel::SafeFile::safeopen( \*PASS, '/etc/passwd' )
  || die "Unable to open /etc/passwd: $!";
while (<PASS>) {
    my ( $uid, $homedir ) = ( split( /:/, $_ ) )[ 2, 5 ];
    next if ( int($uid) < 500 );
    if ( -d $homedir . '/public_html/WysiwygPro'
        && !-l $homedir . '/public_html/WysiwygPro' ) {

        foreach my $file (@wysiwyg_files) {
            next if ( !-e $homedir . '/public_html/' . $file );
            unlink $homedir . '/public_html/' . $file;
        }
        foreach my $dir (@wysiwyg_dirs) {
            next if ( !-d $homedir . '/public_html/' . $dir );
            rmdir $homedir . '/public_html/' . $dir;
        }
    }
}
Cpanel::SafeFile::safeclose( \*PASS, $passwdlock );