HEX
Server: Apache/2
System: Linux nexus-01 4.18.0-553.120.1.el8_10.x86_64 #1 SMP Mon Apr 20 18:04:27 EDT 2026 x86_64
User: aglcoke (1118)
PHP: 8.2.31
Disabled: mail,exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/cwaf/scripts/fix_excludes.pl
#!/bin/sh
eval 'if [ -x /usr/local/cpanel/3rdparty/bin/perl ]; then exec /usr/local/cpanel/3rdparty/bin/perl -x -- $0 ${1+"$@"}; else exec /usr/bin/perl -x $0 ${1+"$@"}; fi;'
  if 0;

#!/usr/bin/perl

use strict qw(refs subs);
use warnings;
no warnings 'redefine';

BEGIN { require '/etc/cwaf/use_lib.pl' if -f '/etc/cwaf/use_lib.pl'; }
use Comodo::CWAF::Main;
use Comodo::CWAF::Excludes;
use Comodo::CWAF::Platform;

print("Script to fix not excluded rules problem on cPanel/Plesk\n");
unless (&is_webpanel()) {
    print("No installed web-panel found\n");
    exit;
}

open(LOGFILE, ">&STDERR");
LOGFILE->autoflush(1);

do_log("CWAF install path: $conf{cwaf_path}", 8);
do_log("Domains exclude directory: $conf{cwaf_path}/etc/httpd/domains", 8);
do_log("Global exclude config: $conf{cwaf_path}/$conf{cwaf_exclude_config}", 8);
do_log("Fixing excludes", 0);

my ($code,$msg) = &create_exclude_list(undef,1); 

do_log("Fixing excludes done: $msg",0);
do_log("Please restart web-server for changes to take effect",0) if($code);