!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux web25.us.cloudlogin.co 5.10.237-xeon-hst #1 SMP Mon May 5 15:10:04 UTC 2025 x86_64 

uid=233359(alpastrology) gid=888(tty) groups=888(tty),33(tape) 

Safe-mode: OFF (not secure)

/usr/share/doc/perl-Net-SNMP/examples/   drwxr-xr-x
Free 6181.93 GB of 6263.13 GB (98.7%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     table.pl (2.51 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#! /bin/env perl 

# ============================================================================

# $Id: table.pl,v 6.0 2009/09/09 15:05:33 dtown Rel $

# Copyright (c) 2000-2009 David M. Town <dtown@cpan.org>
# All rights reserved.

# This program is free software; you may redistribute it and/or modify it
# under the same terms as the Perl 5 programming language system itself.

# ============================================================================

use strict;
use warnings;

use Net::SNMP qw( snmp_dispatcher SNMP_PORT );

# Create the SNMP session 
my ($session, $error) = Net::SNMP->session(
   -hostname  => $ARGV[0] || 'localhost',
   -community => $ARGV[1] || 'public',
   -port      => $ARGV[2] || SNMP_PORT,
   -version   => 'snmpv2c',
);

# Was the session created?
if (!defined $session) {
   printf "ERROR: %s.\n", $error;
   exit 1;
}

# iso.org.dod.internet.mgmt.interfaces.ifTable
my $OID_ifTable = '1.3.6.1.2.1.2.2';

printf "\n== SNMPv2c blocking get_table(): %s ==\n\n", $OID_ifTable;

my $result;

if (defined ($result = $session->get_table(-baseoid => $OID_ifTable))) {
   for ($session->var_bind_names()) {
      printf "%s => %s\n", $_, $result->{$_};
   }
   print "\n";
} else {
   printf "ERROR: %s.\n\n", $session->error();
}

$session->close();


###
## Now a non-blocking example
###

printf "\n== SNMPv2c non-blocking get_table(): %s ==\n\n", $OID_ifTable;

# Blocking and non-blocking objects cannot exist at the
# same time.  We must clear the reference to the blocking
# object or the creation of the non-blocking object will
# fail.

$session = undef;

# Create the non-blocking SNMP session
($session, $error) = Net::SNMP->session(
   -hostname    => $ARGV[0] || 'localhost',
   -community   => $ARGV[1] || 'public',
   -port        => $ARGV[2] || SNMP_PORT,
   -nonblocking => 1,
   -version     => 'snmpv2c',
);

# Was the session created?
if (!defined $session) {
   printf "ERROR: %s.\n", $error;
   exit 1;
}

if (!defined $session->get_table(-baseoid  => $OID_ifTable,
                                 -callback => \&print_results_cb))
{
   printf "ERROR: %s.\n", $session->error();
}

# Start the event loop
snmp_dispatcher();

print "\n";

exit 0;

sub print_results_cb
{
   my ($session) = @_;

   if (!defined $session->var_bind_list()) {
      printf "ERROR: %s.\n", $session->error();
   } else {
      for ($session->var_bind_names()) {
         printf "%s => %s\n", $_, $session->var_bind_list()->{$_};
      }
   }

   return;
}

# ============================================================================


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0174 ]--