Linux server.kiran-academy.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
: 194.233.91.196 | : 216.73.216.172
Cant Read [ /etc/named.conf ]
7.4.32
finalho
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
sbin /
[ HOME SHELL ]
Name
Size
Permission
Action
NetworkManager
2.83
MB
-rwxr-xr-x
accessdb
11.55
KB
-rwxr-xr-x
addgnupghome
3.05
KB
-rwxr-xr-x
addpart
19.69
KB
-rwxr-xr-x
adduser
134.39
KB
-rwxr-xr-x
agetty
48.48
KB
-rwxr-xr-x
alternatives
27.61
KB
-rwxr-xr-x
amavisd
1.51
MB
-rwxr-xr-x
anacron
35.52
KB
-rwxr-xr-x
applygnupgdefaults
2.21
KB
-rwxr-xr-x
arp
63.98
KB
-rwxr-xr-x
arpd
52.98
KB
-rwxr-xr-x
arping
23.19
KB
-rwxr-xr-x
atd
27.17
KB
-rwxr-xr-x
atrun
67
B
-rwxr-xr-x
audispd
39.75
KB
-rwxr-xr-x
auditctl
39.56
KB
-rwxr-xr-x
auditd
125.65
KB
-rwxr-xr-x
augenrules
3.7
KB
-rwxr-xr-x
aureport
105.39
KB
-rwxr-xr-x
ausearch
109.8
KB
-rwxr-xr-x
authconfig
43.49
KB
-rwxr-xr-x
authconfig-tui
43.49
KB
-rwxr-xr-x
autrace
15.49
KB
-rwxr-x---
avcstat
11.25
KB
-rwxr-xr-x
badblocks
27.69
KB
-rwxr-xr-x
biosdecode
24.15
KB
-rwxr-xr-x
biosdevname
36.57
KB
-rwxr-xr-x
blkdeactivate
15.97
KB
-r-xr-xr-x
blkdiscard
23.84
KB
-rwxr-xr-x
blkid
77.92
KB
-rwxr-xr-x
blockdev
32.2
KB
-rwxr-xr-x
bridge
77.61
KB
-rwxr-xr-x
btrfs
690.59
KB
-rwxr-xr-x
btrfs-convert
378.62
KB
-rwxr-xr-x
btrfs-debug-tree
354.23
KB
-rwxr-xr-x
btrfs-find-root
346.22
KB
-rwxr-xr-x
btrfs-image
374.63
KB
-rwxr-xr-x
btrfs-map-logical
350.27
KB
-rwxr-xr-x
btrfs-select-super
346.2
KB
-rwxr-xr-x
btrfs-zero-log
346.2
KB
-rwxr-xr-x
btrfsck
690.59
KB
-rwxr-xr-x
btrfstune
350.24
KB
-rwxr-xr-x
build-locale-archive
860.52
KB
-rwx------
cacertdir_rehash
644
B
-rwxr-xr-x
capsh
19.43
KB
-rwxr-xr-x
cbpadmin
5.54
KB
-rwxr-xr-x
cbpolicyd
21.21
KB
-rwxr-xr-x
cbq
32.73
KB
-rwxr-xr-x
cfdisk
71.37
KB
-rwxr-xr-x
chcpu
23.7
KB
-rwxr-xr-x
chgpasswd
64.1
KB
-rwxr-xr-x
chkconfig
40.22
KB
-rwxr-xr-x
chpasswd
55.88
KB
-rwxr-xr-x
chronyd
263.08
KB
-rwxr-xr-x
chroot
32.48
KB
-rwxr-xr-x
clamd
208.17
KB
-rwxr-xr-x
clamonacc
200.67
KB
-rwxr-xr-x
clock
48.44
KB
-rwxr-xr-x
clockdiff
19.04
KB
-rwxr-xr-x
consoletype
6.95
KB
-rwxr-xr-x
convert-tsql
3.44
KB
-rwxr-xr-x
convertquota
70.88
KB
-rwxr-xr-x
cracklib-check
7.04
KB
-rwxr-xr-x
cracklib-format
246
B
-rwxr-xr-x
cracklib-packer
11.06
KB
-rwxr-xr-x
cracklib-unpacker
7.02
KB
-rwxr-xr-x
create-cracklib-dict
990
B
-rwxr-xr-x
crond
68.48
KB
-rwxr-xr-x
csf
245.08
KB
-rwx------
ctrlaltdel
11.2
KB
-rwxr-xr-x
ctstat
20.09
KB
-rwxr-xr-x
ddns-confgen
19.44
KB
-rwxr-xr-x
debugfs
120.65
KB
-rwxr-xr-x
delpart
19.69
KB
-rwxr-xr-x
depmod
143.24
KB
-rwxr-xr-x
devlink
64.72
KB
-rwxr-xr-x
dhclient
414.34
KB
-rwxr-xr-x
dhclient-script
30.38
KB
-rwxr-xr-x
dmfilemapd
19.16
KB
-r-xr-xr-x
dmidecode
120.2
KB
-rwxr-xr-x
dmsetup
149.2
KB
-r-xr-xr-x
dmstats
149.2
KB
-r-xr-xr-x
dnssec-checkds
922
B
-rwxr-xr-x
dnssec-coverage
924
B
-rwxr-xr-x
dnssec-dsfromkey
56.6
KB
-rwxr-xr-x
dnssec-importkey
52.59
KB
-rwxr-xr-x
dnssec-keyfromlabel
60.52
KB
-rwxr-xr-x
dnssec-keygen
64.55
KB
-rwxr-xr-x
dnssec-keymgr
920
B
-rwxr-xr-x
dnssec-revoke
48.46
KB
-rwxr-xr-x
dnssec-settime
56.52
KB
-rwxr-xr-x
dnssec-signzone
105.7
KB
-rwxr-xr-x
dnssec-verify
48.46
KB
-rwxr-xr-x
dovecot
88.1
KB
-rwxr-xr-x
dracut
55.83
KB
-rwxr-xr-x
dumpe2fs
23.62
KB
-rwxr-xr-x
e2freefrag
11.15
KB
-rwxr-xr-x
e2fsck
250.55
KB
-rwxr-xr-x
e2image
27.85
KB
-rwxr-xr-x
e2label
69.41
KB
-rwxr-xr-x
e2undo
11.32
KB
-rwxr-xr-x
e4defrag
23.55
KB
-rwxr-xr-x
eapol_test
1.77
MB
-rwxr-xr-x
ebtables
6.85
KB
-rwxr-xr-x
ebtables-restore
10.88
KB
-rwxr-xr-x
ebtables-save
851
B
-rwxr-xr-x
edquota
83.09
KB
-rwxr-xr-x
ether-wake
73.26
KB
-rwxr-xr-x
ethtool
293.87
KB
-rwxr-xr-x
faillock
15.02
KB
-rwxr-xr-x
fdformat
11.27
KB
-rwxr-xr-x
fdisk
195.8
KB
-rwxr-xr-x
filefrag
15.23
KB
-rwxr-xr-x
findfs
11.2
KB
-rwxr-xr-x
firewalld
6.87
KB
-rwxr-xr-x
fixfiles
11.03
KB
-rwxr-xr-x
fsck
32.12
KB
-rwxr-xr-x
fsck.btrfs
1.16
KB
-rwxr-xr-x
fsck.cramfs
19.57
KB
-rwxr-xr-x
fsck.ext2
250.55
KB
-rwxr-xr-x
fsck.ext3
250.55
KB
-rwxr-xr-x
fsck.ext4
250.55
KB
-rwxr-xr-x
fsck.minix
73.32
KB
-rwxr-xr-x
fsck.xfs
433
B
-rwxr-xr-x
fsfreeze
11.23
KB
-rwxr-xr-x
fstrim
40.59
KB
-rwxr-xr-x
fxload
19.26
KB
-rwxr-xr-x
genccode
11.46
KB
-rwxr-xr-x
gencmn
11.51
KB
-rwxr-xr-x
genhomedircon
23.77
KB
-rwxr-xr-x
genhostid
6.94
KB
-rwxr-xr-x
genl
52.81
KB
-rwxr-xr-x
genl-ctrl-list
11.27
KB
-rwxr-xr-x
gennorm2
41.05
KB
-rwxr-xr-x
genrandom
11.16
KB
-rwxr-xr-x
gensprep
20.08
KB
-rwxr-xr-x
getcap
11.13
KB
-rwxr-xr-x
getenforce
7.01
KB
-rwxr-xr-x
getpcaps
7.07
KB
-rwxr-xr-x
getsebool
11.13
KB
-rwxr-xr-x
glibc_post_upgrade.x86_64
772.05
KB
-rwx------
groupadd
85.65
KB
-rwxr-xr-x
groupdel
77.38
KB
-rwxr-xr-x
groupmems
55.97
KB
-rwxr-xr-x
groupmod
85.66
KB
-rwxr-xr-x
grpck
59.93
KB
-rwxr-xr-x
grpconv
51.73
KB
-rwxr-xr-x
grpunconv
51.73
KB
-rwxr-xr-x
grub2-bios-setup
1.03
MB
-rwxr-xr-x
grub2-get-kernel-settings
2.08
KB
-rwxr-xr-x
grub2-install
1.29
MB
-rwxr-xr-x
grub2-macbless
1.02
MB
-rwxr-xr-x
grub2-mkconfig
7.63
KB
-rwxr-xr-x
grub2-ofpathname
225.52
KB
-rwxr-xr-x
grub2-probe
1.03
MB
-rwxr-xr-x
grub2-reboot
4
KB
-rwxr-xr-x
grub2-rpm-sort
258.52
KB
-rwxr-xr-x
grub2-set-default
3.46
KB
-rwxr-xr-x
grub2-setpassword
2.96
KB
-rwxr-xr-x
grub2-sparc64-setup
1.04
MB
-rwxr-xr-x
grubby
71.27
KB
-rwxr-xr-x
gss-server
23.13
KB
-rwxr-xr-x
halt
704.8
KB
-rwxr-xr-x
hardlink
15.29
KB
-rwxr-xr-x
hwclock
48.44
KB
-rwxr-xr-x
iconvconfig
22.15
KB
-rwxr-xr-x
iconvconfig.x86_64
22.15
KB
-rwxr-xr-x
icupkg
15.95
KB
-rwxr-xr-x
ifcfg
2.99
KB
-rwxr-xr-x
ifconfig
80.05
KB
-rwxr-xr-x
ifdown
1.61
KB
-rwxr-xr-x
ifenslave
19.74
KB
-rwxr-xr-x
ifstat
40.6
KB
-rwxr-xr-x
ifup
4.89
KB
-rwxr-xr-x
init
1.56
MB
-rwxr-xr-x
insmod
143.24
KB
-rwxr-xr-x
install-info
110.42
KB
-rwxr-xr-x
installkernel
2.69
KB
-rwxr-xr-x
intel-microcode2ucode
11.1
KB
-rwxr-xr-x
ip
459.59
KB
-rwxr-xr-x
ip6tables
91.52
KB
-rwxr-xr-x
ip6tables-restore
91.52
KB
-rwxr-xr-x
ip6tables-save
91.52
KB
-rwxr-xr-x
ipmaddr
19.33
KB
-rwxr-xr-x
iprconfig
394.37
KB
-rwxr-xr-x
iprdbg
135.94
KB
-rwx------
iprdump
123.67
KB
-rwxr-xr-x
iprinit
123.64
KB
-rwxr-xr-x
iprsos
2.18
KB
-rwxr-xr-x
iprupdate
123.64
KB
-rwxr-xr-x
ipset
7.02
KB
-rwxr-xr-x
iptables
91.52
KB
-rwxr-xr-x
iptables-restore
91.52
KB
-rwxr-xr-x
iptables-save
91.52
KB
-rwxr-xr-x
iptunnel
23.33
KB
-rwxr-xr-x
irqbalance
48.5
KB
-rwxr-xr-x
isc-hmac-fixup
11.2
KB
-rwxr-xr-x
kexec
166.06
KB
-rwxr-xr-x
killall5
23.17
KB
-rwxr-xr-x
kpartx
39.47
KB
-rwxr-xr-x
lchage
15.41
KB
-rwxr-xr-x
ldattach
27.93
KB
-rwxr-xr-x
ldconfig
952.08
KB
-rwxr-xr-x
lfd
382.43
KB
-rwx------
lgroupadd
11.28
KB
-rwxr-xr-x
lgroupdel
11.26
KB
-rwxr-xr-x
lgroupmod
15.44
KB
-rwxr-xr-x
lid
15.4
KB
-rwxr-xr-x
lnewusers
15.46
KB
-rwxr-xr-x
lnstat
20.09
KB
-rwxr-xr-x
load_policy
10.97
KB
-rwxr-xr-x
logrotate
68.61
KB
-rwxr-xr-x
logsave
11.27
KB
-rwxr-xr-x
losetup
82.45
KB
-rwxr-xr-x
lpasswd
15.5
KB
-rwxr-xr-x
lshw
895.18
KB
-rwxr-xr-x
lsmod
143.24
KB
-rwxr-xr-x
lsof
150.57
KB
-rwxr-xr-x
luseradd
15.38
KB
-rwxr-xr-x
luserdel
11.3
KB
-rwxr-xr-x
lusermod
19.43
KB
-rwxr-xr-x
lwresd
768.03
KB
-rwxr-xr-x
makedumpfile
376.52
KB
-rwxr-xr-x
mariadbd
23.13
MB
-rwxr-xr-x
matchpathcon
11.19
KB
-rwxr-xr-x
mii-diag
20.08
KB
-rwxr-xr-x
mii-tool
19.51
KB
-rwxr-xr-x
mkdict
246
B
-rwxr-xr-x
mkdumprd
13.99
KB
-rwxr-xr-x
mke2fs
94.08
KB
-rwxr-xr-x
mkfs
11.25
KB
-rwxr-xr-x
mkfs.btrfs
366.45
KB
-rwxr-xr-x
mkfs.cramfs
36.16
KB
-rwxr-xr-x
mkfs.ext2
94.08
KB
-rwxr-xr-x
mkfs.ext3
94.08
KB
-rwxr-xr-x
mkfs.ext4
94.08
KB
-rwxr-xr-x
mkfs.minix
36.27
KB
-rwxr-xr-x
mkfs.xfs
359.8
KB
-rwxr-xr-x
mkhomedir_helper
19.05
KB
-rwxr-xr-x
mklost+found
11.11
KB
-rwxr-xr-x
mkswap
69.64
KB
-rwxr-xr-x
modinfo
143.24
KB
-rwxr-xr-x
modprobe
143.24
KB
-rwxr-xr-x
mysqld
23.13
MB
-rwxr-xr-x
named
768.03
KB
-rwxr-xr-x
named-checkconf
32.25
KB
-rwxr-xr-x
named-checkzone
32.06
KB
-rwxr-xr-x
named-compilezone
32.06
KB
-rwxr-xr-x
named-journalprint
11.13
KB
-rwxr-xr-x
nameif
15.32
KB
-rwxr-xr-x
netreport
10.96
KB
-rwxr-sr-x
new-kernel-pkg
24.96
KB
-rwxr-xr-x
newusers
93.45
KB
-rwxr-xr-x
nginx
1.33
MB
-rwxr-xr-x
nginx-debug
1.45
MB
-rwxr-xr-x
nl-class-add
11.7
KB
-rwxr-xr-x
nl-class-delete
11.55
KB
-rwxr-xr-x
nl-class-list
11.48
KB
-rwxr-xr-x
nl-classid-lookup
11.29
KB
-rwxr-xr-x
nl-cls-add
11.76
KB
-rwxr-xr-x
nl-cls-delete
11.68
KB
-rwxr-xr-x
nl-cls-list
11.58
KB
-rwxr-xr-x
nl-link-list
11.52
KB
-rwxr-xr-x
nl-pktloc-lookup
11.36
KB
-rwxr-xr-x
nl-qdisc-add
11.6
KB
-rwxr-xr-x
nl-qdisc-delete
11.54
KB
-rwxr-xr-x
nl-qdisc-list
11.63
KB
-rwxr-xr-x
nologin
7.01
KB
-rwxr-xr-x
nsec3hash
11.13
KB
-rwxr-xr-x
nstat
23.88
KB
-rwxr-xr-x
opendkim
158.3
KB
-rwxr-xr-x
opendkim-default-keygen
1.4
KB
-rwxr-xr-x
opendkim-genkey
6.29
KB
-rwxr-xr-x
opendkim-genzone
66.68
KB
-rwxr-xr-x
opendkim-reportstats
14.16
KB
-rwxr-xr-x
opendkim-testkey
70.98
KB
-rwxr-xr-x
opendkim-testmsg
15.27
KB
-rwxr-xr-x
ownership
15.04
KB
-rwxr-xr-x
packer
11.06
KB
-rwxr-xr-x
pam_console_apply
39.69
KB
-rwxr-xr-x
pam_tally2
15.05
KB
-rwxr-xr-x
pam_timestamp_check
10.97
KB
-rwsr-xr-x
paperconfig
4.07
KB
-rwxr-xr-x
parted
77.22
KB
-rwxr-xr-x
partprobe
11.23
KB
-rwxr-xr-x
partx
86.55
KB
-rwxr-xr-x
pidof
23.17
KB
-rwxr-xr-x
ping6
64.63
KB
-rwxr-xr-x
pivot_root
11.19
KB
-rwxr-xr-x
plipconfig
11.06
KB
-rwxr-xr-x
pluginviewer
15.23
KB
-rwxr-xr-x
plymouth-set-default-theme
6.21
KB
-rwxr-xr-x
plymouthd
84.22
KB
-rwxr-xr-x
portrelease
15.02
KB
-rwxr-xr-x
portreserve
15.02
KB
-rwxr-xr-x
postalias
284.66
KB
-rwxr-xr-x
postcat
211.42
KB
-rwxr-xr-x
postconf
383.47
KB
-rwxr-xr-x
postdrop
292.98
KB
-rwxr-sr-x
postfix
202.72
KB
-rwxr-xr-x
postkick
198.51
KB
-rwxr-xr-x
postlock
202.66
KB
-rwxr-xr-x
postlog
202.86
KB
-rwxr-xr-x
postmap
288.88
KB
-rwxr-xr-x
postmulti
215.48
KB
-rwxr-xr-x
postqueue
292.92
KB
-rwxr-sr-x
postsuper
219.59
KB
-rwxr-xr-x
poweroff
704.8
KB
-rwxr-xr-x
ppp-watch
23.2
KB
-rwxr-xr-x
pure-authd
19.62
KB
-rwxr-xr-x
pure-config.pl
4.64
KB
-rwxr-xr-x
pure-config.py
7.54
KB
-rwxr-xr-x
pure-ftpd
222.52
KB
-rwxr-xr-x
pure-ftpwho
27.25
KB
-rwxr-xr-x
pure-mrtginfo
10.98
KB
-rwxr-xr-x
pure-quotacheck
15.07
KB
-rwxr-xr-x
pure-uploadscript
15.36
KB
-rwxr-xr-x
pwck
51.71
KB
-rwxr-xr-x
pwconv
47.57
KB
-rwxr-xr-x
pwhistory_helper
15.44
KB
-rwxr-xr-x
pwunconv
47.59
KB
-rwxr-xr-x
quot
70.66
KB
-rwxr-xr-x
quotacheck
107.29
KB
-rwxr-xr-x
quotaoff
75.03
KB
-rwxr-xr-x
quotaon
75.03
KB
-rwxr-xr-x
quotastats
14.03
KB
-rwxr-xr-x
rdisc
23.17
KB
-rwxr-xr-x
rdma
73.42
KB
-rwxr-xr-x
readprofile
15.46
KB
-rwxr-xr-x
reboot
704.8
KB
-rwxr-xr-x
repquota
75.16
KB
-rwxr-xr-x
resize2fs
48.41
KB
-rwxr-xr-x
resizepart
32.36
KB
-rwxr-xr-x
restorecon
27.16
KB
-rwxr-xr-x
rmmod
143.24
KB
-rwxr-xr-x
rndc
35.88
KB
-rwxr-xr-x
rndc-confgen
19.44
KB
-rwxr-xr-x
route
66.6
KB
-rwxr-xr-x
routef
173
B
-rwxr-xr-x
routel
1.59
KB
-rwxr-xr-x
rpc.rquotad
78.95
KB
-rwxr-xr-x
rpcbind
60.07
KB
-rwxr-xr-x
rpcinfo
27.3
KB
-rwxr-xr-x
rsyslogd
648.45
KB
-rwxr-xr-x
rtacct
41.93
KB
-rwxr-xr-x
rtcwake
31.96
KB
-rwxr-xr-x
rtmon
48.67
KB
-rwxr-xr-x
rtpr
37
B
-rwxr-xr-x
rtstat
20.09
KB
-rwxr-xr-x
runlevel
704.8
KB
-rwxr-xr-x
runuser
32.21
KB
-rwxr-xr-x
safe_finger
11.08
KB
-rwxr-xr-x
sasl2-shared-mechlist
10.98
KB
-rwxr-xr-x
saslauthd
92.59
KB
-rwxr-xr-x
sasldblistusers2
19.26
KB
-rwxr-xr-x
saslpasswd2
15.09
KB
-rwxr-xr-x
sefcontext_compile
60.53
KB
-rwxr-xr-x
selabel_digest
11.17
KB
-rwxr-xr-x
selabel_lookup
11.14
KB
-rwxr-xr-x
selabel_lookup_best_match
11.16
KB
-rwxr-xr-x
selabel_partial_match
11.09
KB
-rwxr-xr-x
selinux_restorecon
15.21
KB
-rwxr-xr-x
selinuxconlist
11.1
KB
-rwxr-xr-x
selinuxdefcon
11.12
KB
-rwxr-xr-x
selinuxenabled
6.98
KB
-rwxr-xr-x
selinuxexeccon
7.09
KB
-rwxr-xr-x
semanage
42.76
KB
-rwxr-xr-x
semodule
23.77
KB
-rwxr-xr-x
sendmail
322.16
KB
-rwxr-xr-x
sendmail.postfix
322.16
KB
-rwxr-xr-x
service
3.17
KB
-rwxr-xr-x
sestatus
15.02
KB
-rwxr-xr-x
setcap
11.13
KB
-rwxr-xr-x
setenforce
7.05
KB
-rwxr-xr-x
setfiles
27.16
KB
-rwxr-xr-x
setquota
83.16
KB
-rwxr-xr-x
setsebool
14.99
KB
-rwxr-xr-x
sfdisk
83.25
KB
-rwxr-xr-x
shutdown
704.8
KB
-rwxr-xr-x
sim_server
10.97
KB
-rwxr-xr-x
slattach
42.4
KB
-rwxr-xr-x
sln
743.78
KB
-rwxr-xr-x
smtp-sink
100.38
KB
-rwxr-xr-x
smtp-source
87.1
KB
-rwxr-xr-x
snmpd
31.05
KB
-rwxr-xr-x
snmptrapd
31.22
KB
-rwxr-xr-x
ss
128.44
KB
-rwxr-xr-x
sshd
832.96
KB
-rwxr-xr-x
sshd-keygen
3.53
KB
-rwxr-xr-x
sulogin
40.53
KB
-rwxr-xr-x
sushell
67
B
-rwxr-xr-x
swaplabel
15.31
KB
-rwxr-xr-x
swapoff
15.53
KB
-rwxr-xr-x
swapon
53.29
KB
-rwxr-xr-x
switch_root
15.35
KB
-rwxr-xr-x
sys-unconfig
184
B
-rwxr-xr-x
sysctl
23.57
KB
-rwxr-xr-x
tc
384.66
KB
-rwxr-xr-x
tcpd
36.62
KB
-rwxr-xr-x
tcpdmatch
40.83
KB
-rwxr-xr-x
tcsd
300.27
KB
-rwxr-xr-x
telinit
704.8
KB
-rwxr-xr-x
testsaslauthd
15.09
KB
-rwxr-xr-x
tracepath
15.05
KB
-rwxr-xr-x
tracepath6
15.05
KB
-rwxr-xr-x
try-from
23.47
KB
-rwxr-xr-x
tsig-keygen
19.44
KB
-rwxr-xr-x
tune2fs
69.41
KB
-rwxr-xr-x
tuned
3.29
KB
-rwxr-xr-x
tuned-adm
5.22
KB
-rwxr-xr-x
udevadm
414.27
KB
-rwxr-xr-x
unix_chkpwd
35.42
KB
-rwsr-xr-x
unix_update
35.42
KB
-rwx------
update-alternatives
27.61
KB
-rwxr-xr-x
useradd
134.39
KB
-rwxr-xr-x
userdel
93.5
KB
-rwxr-xr-x
userhelper
39.38
KB
-rws--x--x
usermod
130.33
KB
-rwxr-xr-x
usernetctl
11.03
KB
-rwsr-xr-x
uuserver
14.97
KB
-rwxr-xr-x
varnish_reload_vcl
3.09
KB
-rwxr-xr-x
varnishd
4.23
MB
-rwxr-xr-x
vigr
62.54
KB
-rwxr-xr-x
vipw
62.54
KB
-rwxr-xr-x
virt-what
11.57
KB
-rwxr-xr-x
visudo
200.91
KB
-rwxr-xr-x
vmcore-dmesg
19.28
KB
-rwxr-xr-x
vpddecode
15.33
KB
-rwxr-xr-x
weak-modules
31.9
KB
-rwxr-xr-x
wipefs
28.05
KB
-rwxr-xr-x
wpa_cli
128.06
KB
-rwxr-xr-x
wpa_passphrase
56.79
KB
-rwxr-xr-x
wpa_supplicant
1.93
MB
-rwxr-xr-x
xfs_admin
1.35
KB
-rwxr-xr-x
xfs_bmap
638
B
-rwxr-xr-x
xfs_copy
339.33
KB
-rwxr-xr-x
xfs_db
576.38
KB
-rwxr-xr-x
xfs_estimate
11.16
KB
-rwxr-xr-x
xfs_freeze
767
B
-rwxr-xr-x
xfs_fsr
31.83
KB
-rwxr-xr-x
xfs_growfs
327.2
KB
-rwxr-xr-x
xfs_info
472
B
-rwxr-xr-x
xfs_io
122.68
KB
-rwxr-xr-x
xfs_logprint
355.81
KB
-rwxr-xr-x
xfs_mdrestore
314.81
KB
-rwxr-xr-x
xfs_metadump
747
B
-rwxr-xr-x
xfs_mkfile
1007
B
-rwxr-xr-x
xfs_ncheck
650
B
-rwxr-xr-x
xfs_quota
84.88
KB
-rwxr-xr-x
xfs_repair
563.2
KB
-rwxr-xr-x
xfs_rtcp
15.25
KB
-rwxr-xr-x
xqmstats
14.03
KB
-rwxr-xr-x
xtables-multi
91.52
KB
-rwxr-xr-x
yum-complete-transaction
9.22
KB
-rwxr-xr-x
yumdb
8.67
KB
-rwxr-xr-x
zdump
14.02
KB
-rwxr-xr-x
zic
50.02
KB
-rwxr-xr-x
zramctl
82.23
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : cbpolicyd
#!/usr/bin/perl # Cluebringer policy daemon # Copyright (C) 2009-2011, AllWorldIT # Copyright (C) 2008, LinuxRulz # Copyright (C) 2007, Nigel Kukard <nkukard@lbsd.net> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. use strict; use warnings; use lib('/usr/local/lib/cbpolicyd-2.1','/usr/lib/cbpolicyd-2.1', '/usr/lib64/cbpolicyd-2.1','awitpt'); package cbp; use base qw(Net::Server::PreFork); use Config::IniFiles; use Getopt::Long; use Sys::Syslog; use cbp::version; use cbp::config; use cbp::logging; use awitpt::db::dbilayer; use awitpt::cache; use cbp::tracking; use cbp::protocols; # Override configuration sub configure { my $self = shift; my $server = $self->{'server'}; my $cfg; my $cmdline; my $inifile; # We're being called from somewhere else, maybe a protocol? return if (@_); # Set defaults $cfg->{'config_file'} = "/etc/cbpolicyd/cluebringer.conf"; $cfg->{'cache_file'} = '/var/run/cbpolicyd/cache'; $cfg->{'track_sessions'} = 0; $server->{'timeout_idle'} = 1015; $server->{'timeout_busy'} = 115; $server->{'background'} = "yes"; $server->{'pid_file'} = "/var/run/cbpolicyd/cbpolicyd.pid"; $server->{'log_level'} = 2; $server->{'log_file'} = "/var/log/cbpolicyd/cbpolicyd.log"; $server->{'proto'} = "tcp"; $server->{'host'} = "*"; $server->{'port'} = 10031; $server->{'min_servers'} = 4; $server->{'min_spare_servers'} = 4; $server->{'max_spare_servers'} = 12; $server->{'max_servers'} = 25; $server->{'max_requests'} = 1000; # Parse command line params %{$cmdline} = (); GetOptions( \%{$cmdline}, "help", "config:s", "debug", "fg", ); # Check for some args if ($cmdline->{'help'}) { $self->displayHelp(); exit 0; } if (defined($cmdline->{'config'}) && $cmdline->{'config'} ne "") { $cfg->{'config_file'} = $cmdline->{'config'}; } # Check config file exists if (! -f $cfg->{'config_file'}) { print(STDERR "ERROR: No configuration file '".$cfg->{'config_file'}."' found!\n"); exit 1; } # Use config file, ignore case tie my %inifile, 'Config::IniFiles', ( -file => $cfg->{'config_file'}, -nocase => 1 ) or die "Failed to open config file '".$cfg->{'config_file'}."': ".join("\n",@Config::IniFiles::errors); # Copy config my %config = %inifile; # FIXME: This now generates a warning as Config::Inifiles doesn't implement UNTIE # untie(%inifile); # Pull in params for the server my @server_params = ( 'log_level','log_file', 'proto', 'host', 'port', 'cidr_allow', 'cidr_deny', 'pid_file', 'user', 'group', 'timeout_idle', 'timeout_busy', 'background', 'min_servers', 'min_spare_servers', 'max_spare_servers', 'max_servers', 'max_requests', ); foreach my $param (@server_params) { $server->{$param} = $config{'server'}{$param} if (defined($config{'server'}{$param})); } # Fix up these ... if (defined($server->{'cidr_allow'})) { my @lst = split(/[,\s;]+/,$server->{'cidr_allow'}); $server->{'cidr_allow'} = \@lst; } if (defined($server->{'cidr_deny'})) { my @lst = split(/[,\s;]+/,$server->{'cidr_deny'}); $server->{'cidr_deny'} = \@lst; } # Split off modules if (!defined($config{'server'}{'modules'})) { die "Server configuration error: 'modules' not found"; } if (!defined($config{'server'}{'protocols'})) { die "Server configuration error: 'protocols' not found"; } # Split off modules if (ref($config{'server'}{'modules'}) eq "ARRAY") { foreach my $module (@{$config{'server'}{'modules'}}) { $module =~ s/\s+//g; # Skip comments next if ($module =~ /^#/); $module = "modules/$module"; push(@{$cfg->{'module_list'}},$module); } } else { my @moduleList = split(/\s+/,$config{'server'}{'modules'}); foreach my $module (@moduleList) { # Skip comments next if ($module =~ /^#/); $module = "modules/$module"; push(@{$cfg->{'module_list'}},$module); } } # Split off protocols if (ref($config{'server'}{'protocols'}) eq "ARRAY") { foreach my $module (@{$config{'server'}{'protocols'}}) { $module =~ s/\s+//g; # Skip comments next if ($module =~ /^#/); $module = "protocols/$module"; push(@{$cfg->{'module_list'}},$module); } } else { my @protocolList = split(/\s+/,$config{'server'}{'protocols'}); foreach my $module (@protocolList) { # Skip comments next if ($module =~ /^#/); $module = "protocols/$module"; push(@{$cfg->{'module_list'}},$module); } } # Override if ($cmdline->{'debug'}) { $server->{'log_level'} = 4; $cfg->{'debug'} = 1; } # If we set on commandline for foreground, keep in foreground if ($cmdline->{'fg'} || (defined($config{'server'}{'background'}) && $config{'server'}{'background'} eq "no" )) { $server->{'background'} = undef; $server->{'log_file'} = undef; } else { $server->{'setsid'} = 1; } # Loop with logging detail if (defined($config{'server'}{'log_detail'})) { # Lets see what we have to enable foreach my $detail (split(/[,\s;]/,$config{'server'}{'log_detail'})) { $cfg->{'logging'}{$detail} = 1; } } # Check log_mail if (defined($config{'server'}{'log_mail'}) && $config{'server'}{'log_mail'} ne "main") { # COMPATIBILITY if ($config{'server'}{'log_mail'} eq "maillog") { $cfg->{'log_mail'} = 'mail@syslog:native'; } else { $cfg->{'log_mail'} = $config{'server'}{'log_mail'}; } } # Check if the user specified a cache_file in the config if (defined($config{'server'}{'cache_file'})) { $cfg->{'cache_file'} = $config{'server'}{'cache_file'}; } # Save our config and stuff $self->{'config'} = $cfg; $self->{'cmdline'} = $cmdline; $self->{'inifile'} = \%config; } # Run straight after ->run sub post_configure_hook { my $self = shift; my $log_mail = $self->{'config'}{'log_mail'}; $self->log(LOG_NOTICE,"[CBPOLICYD] Policyd v2 / Cluebringer - v".VERSION); $self->log(LOG_NOTICE,"[CBPOLICYD] Initializing system modules."); # Init config cbp::config::Init($self); # Init caching engine awitpt::cache::Init($self,{ 'cache_file' => $self->{'config'}{'cache_file'}, 'cache_file_user' => $self->{'server'}->{'user'}, 'cache_file_group' => $self->{'server'}->{'group'} }); $self->log(LOG_NOTICE,"[CBPOLICYD] System modules initialized."); $self->log(LOG_NOTICE,"[CBPOLICYD] Module load started..."); # Load modules foreach my $module (@{$self->{'config'}{'module_list'}}) { # Split off dir and mod name $module =~ /^(\w+)\/(\w+)$/; my ($mod_dir,$mod_name) = ($1,$2); # Load module my $res = eval(" use cbp::${mod_dir}::${mod_name}; plugin_register(\$self,\"${mod_name}\",\$cbp::${mod_dir}::${mod_name}::pluginInfo); "); if ($@ || (defined($res) && $res != 0)) { $self->log(LOG_WARN,"[CBPOLICYD] Error loading plugin $module ($@)"); } } $self->log(LOG_NOTICE,"[CBPOLICYD] Module load done."); # Report if session tracking is on if ($self->{'config'}{'track_sessions'}) { $self->log(LOG_NOTICE,"[CBPOLICYD] Session tracking is ENABLED."); } else { $self->log(LOG_NOTICE,"[CBPOLICYD] Session tracking is DISABLED."); } # Check if we have some custom logging... if (defined($log_mail)) { # More flexible method to configure logging if ($log_mail =~ /^([^@]+)(?:@([^:]+))?(?:\:(\S+))?$/) { my $facility = $1; my $method = defined($2) ? $2 : 'syslog'; my $destination = $3; # Check method of logging if ($method eq "syslog") { $destination = 'native' if (!defined($destination)); $facility = 'mail' if (!defined($facility)); $self->log(LOG_DEBUG,"[CBPOLICYD] Opening syslog, destination = '$destination', facility = '$facility'."); # We may have some args to pass to setlogsock my @syslogArgs = split(/,/,$destination); if (!Sys::Syslog::setlogsock(@syslogArgs)) { $self->log(LOG_ERR,"[CBPOLICYD] Failed to set log socket: $!"); } if (!Sys::Syslog::openlog("cbpolicyd",'pid|ndelay',$facility)) { $self->log(LOG_ERR,"[CBPOLICYD] Failed to open syslog socket: $!"); } } else { $self->log(LOG_WARN,"[CBPOLICYD] Value of 'log_mail' not understood. Method '$method' is invalid."); } } else { $self->log(LOG_WARN,"[CBPOLICYD] Value '$log_mail' of 'log_mail' not understood."); } } } # Register plugin info sub plugin_register { my ($self,$module,$info) = @_; # If no info, return if (!defined($info)) { $self->log(LOG_WARN,"[CBPOLICYD] Plugin info not found for module => $module"); return -1; } # Set real module name & save $info->{'Module'} = $module; push(@{$self->{'modules'}},$info); # If we should, init the module if (defined($info->{'init'})) { $info->{'init'}($self); } return 0; } # Initialize child sub child_init_hook { my $self = shift; $self->SUPER::child_init_hook(); $self->log(LOG_DEBUG,"[CBPOLICYD] Starting up caching engine"); awitpt::cache::connect($self); # This is the database connection timestamp, if we connect, it resets to 0 # if not its used to check if we must kill the child and try a reconnect $self->{'client'}->{'dbh_status'} = time(); # Init system stuff $self->{'client'}->{'dbh'} = awitpt::db::dbilayer::Init($self,'cbp'); if (defined($self->{'client'}->{'dbh'})) { # Check if we succeeded if (!($self->{'client'}->{'dbh'}->connect())) { # If we succeeded, record OK $self->{'client'}->{'dbh_status'} = 0; } else { $self->log(LOG_WARN,"[CBPOLICYD] Failed to connect to database: ".$self->{'client'}->{'dbh'}->Error()." ($$)"); } } else { $self->log(LOG_WARN,"[CBPOLICYD] Failed to Initialize: ".awitpt::db::dbilayer::internalError()." ($$)"); } } # Destroy the child sub child_finish_hook { my $self = shift; my $server = $self->{'server'}; my $log_cache = defined($self->{'config'}{'logging'}{'cache'}); $self->SUPER::child_finish_hook(); $self->log(LOG_DEBUG,"[CBPOLICYD] Caching engine: hits = ".awitpt::cache::getCacheHits().", misses = ". awitpt::cache::getCacheMisses()) if ($log_cache); $self->log(LOG_DEBUG,"[CBPOLICYD] Shutting down caching engine ($$)"); awitpt::cache::disconnect($self); } # Process requests we get sub process_request { my $self = shift; my $server = $self->{'server'}; my $log = defined($self->{'config'}{'logging'}{'modules'}); # Check for unix/tcp peer and set peer_type my $sock = $self->{'server'}->{'client'}; if ($sock->NS_proto eq 'UNIX') { $server->{'peer_type'} = "UNIX"; # Some defaults for debugging, these are undef if UNIX $server->{'peeraddr'} = ""; $server->{'peerport'} = $sock->NS_unix_path; $server->{'sockaddr'} = ""; $server->{'sockport'} = ""; } elsif ($sock->NS_proto eq 'TCP') { $server->{'peer_type'} = "TCP"; } else { $self->log(LOG_WARN,"[CBPOLICYD] Unknown peer type, expected UNIX / TCP. Rejecting."); return; } # How many times did we pipeline... my $policyRequests = 0; # # Loop till we fill up the buffer # # Beginning label, we do pipelining ... CONN_READ: # Found module, set to 1 if found, 0 if otherwize my $found = 0; # Buffer my $buf = ""; # Create an FDSET for use in select() my $fdset = ""; vec($fdset, fileno(STDIN), 1) = 1; while (1) { # Loop with modules foreach my $module ( sort { $b->{'priority'} <=> $a->{'priority'} } @{$self->{'modules'}} ) { # Skip over if we don't have a check... next if (!defined($module->{'protocol_check'})); # Check protocol my $res = $module->{'protocol_check'}($self,$buf); if (defined($res) && $res == 1) { $found = $module; } } # Last if found last if ($found); # We need to store this cause we use it below a few times my $bufLen = length($buf); # Again ... too large if ($bufLen > 16*1024) { $self->log(LOG_WARN,"[CBPOLICYD] Request too large from => Peer: ".$server->{'peeraddr'}.":".$server->{'peerport'}.", Local: ". $server->{'sockaddr'}.":".$server->{'sockport'}); return; } # Setup timeout my $timeout; # If buffer length > 0, its a busy connection if ($bufLen > 0) { $timeout = $server->{'timeout_busy'}; # Else its idle } else { $timeout = $server->{'timeout_idle'}; } # Check for timeout.... my $n = select($fdset,undef,undef,$timeout); if (!$n) { $self->log(LOG_WARN,"[CBPOLICYD] Timed out after ".$timeout."s from => Peer: ".$server->{'peeraddr'}.":". $server->{'peerport'}.", Local: ".$server->{'sockaddr'}.":".$server->{'sockport'}); return; } # Read in 8kb $n = sysread(STDIN,$buf,8192,$bufLen); if (!$n) { my $reason = defined($n) ? "Client closed connection" : "sysread[$!]"; $self->log(LOG_WARN,"[CBPOLICYD] $reason => Peer: ".$server->{'peeraddr'}.":".$server->{'peerport'}.", Local: ". $server->{'sockaddr'}.":".$server->{'sockport'}); return; } } # Check if a protocol handler wasn't found... if (!$found) { $self->log(LOG_ERR,"[CBPOLICYD] Request not understood => Peer: ".$server->{'peeraddr'}.":".$server->{'peerport'}.", Local: ". $server->{'sockaddr'}.":".$server->{'sockport'}); return; } # Set protocol handler $server->{'_protocol_handler'} = $found; # If we have a init function, call it before processing... $server->{'_protocol_handler'}->{'protocol_init'}($self) if (defined($server->{'_protocol_handler'}->{'protocol_init'})); # Process buffer my $request = $server->{'_protocol_handler'}->{'protocol_parse'}($self,$buf); # Check data is ok... if ((my $res = $server->{'_protocol_handler'}->{'protocol_validate'}($self,$request))) { $self->log(LOG_ERR,"[CBPOLICYD] Protocol data validation error, $res"); $self->protocol_response(PROTO_ERROR); print($self->protocol_getresponse()); return; } # Data mangling... $request->{'sender'} = lc($request->{'sender'}); $request->{'recipient'} = lc($request->{'recipient'}) if (defined($request->{'recipient'})); $request->{'sasl_username'} = lc($request->{'sasl_username'}) if (defined($request->{'sasl_username'})); # Internal data $request->{'_timestamp'} = time(); # If this is a TCP peer type then it has a peer address if ($server->{'peer_type'} eq "TCP") { $request->{'_peer_address'} = $server->{'peeraddr'}; } # Check if we got connected, if not ... bypass if ($self->{'client'}->{'dbh_status'} > 0) { my $action; $self->log(LOG_WARN,"[CBPOLICYD] Client in BYPASS mode due to DB connection failure!"); # Check bypass mode if (!defined($self->{'inifile'}{'database'}{'bypass_mode'})) { $self->log(LOG_ERR,"[CBPOLICYD] No bypass_mode specified for failed database connections, defaulting to tempfail"); $self->protocol_response(PROTO_DB_ERROR); $action = "tempfail"; # Check for "tempfail" } elsif (lc($self->{'inifile'}{'database'}{'bypass_mode'}) eq "tempfail") { $self->protocol_response(PROTO_DB_ERROR); $action = "tempfail"; # And for "bypass" } elsif (lc($self->{'inifile'}{'database'}{'bypass_mode'}) eq "pass") { $self->protocol_response(PROTO_PASS); $action = "pass"; # Lasty for invalid } else { $self->log(LOG_ERR,"[CBPOLICYD] bypass_mode is invalid, defaulting to tempfail"); $self->protocol_response(PROTO_DB_ERROR); $action = "tempfail"; } $self->maillog("module=Core, action=$action, host=%s, from=%s, to=%s, reason=db_failure_bypass", $request->{'client_address'} ? $request->{'client_address'} : "unknown", $request->{'helo_name'} ? $request->{'helo_name'} : "", $request->{'sender'} ? $request->{'sender'} : "unknown", $request->{'recipient'} ? $request->{'recipient'} : "unknown"); print($self->protocol_getresponse()); # Check if we need to reconnect or not my $timeout = $self->{'inifile'}{'database'}{'bypass_timeout'}; if (!defined($timeout)) { $self->log(LOG_ERR,"[CBPOLICYD] No bypass_timeout specified for failed database connections, defaulting to 120s"); $timeout = 120; } # Get time left my $timepassed = $request->{'_timestamp'} - $self->{'client'}->{'dbh_status'}; # Then check... if ($timepassed >= $timeout) { $self->log(LOG_NOTICE,"[CBPOLICYD] Client BYPASS timeout exceeded, reconnecting..."); exit 0; } else { $self->log(LOG_NOTICE,"[CBPOLICYD] Client still in BYPASS mode, ".( $timeout - $timepassed )."s left till next reconnect"); return; } } # Setup database handle awitpt::db::dblayer::setHandle($self->{'client'}->{'dbh'}); # Grab session data my $sessionData = getSessionDataFromRequest($self,$request); if (ref $sessionData ne "HASH") { $self->log(LOG_DEBUG,"[CBPOLICYD:$$] Error getting session data"); $self->protocol_response(PROTO_ERROR); print($self->protocol_getresponse()); return; } # Increment counter $policyRequests++; $self->log(LOG_INFO,"[CBPOLICYD] Got request #$policyRequests" . ($policyRequests > 1 ? " (pipelined)" : "")); # Loop with modules foreach my $module ( sort { $b->{'priority'} <=> $a->{'priority'} } @{$self->{'modules'}} ) { # Skip over if we don't have a check... next if (!defined($module->{'request_process'})); $self->log(LOG_DEBUG,"[CBPOLICYD] Running module: ".$module->{'name'}) if ($log); # Run request in eval my $res; eval { $res = $module->{'request_process'}($self,$sessionData); }; # Check results if ($@) { $self->log(LOG_ERR,"[CBPOLICYD] Error running module request_process(): $@"); $res = $self->protocol_response(PROTO_ERROR); } # Check responses if (!defined($res)) { $res = $self->protocol_response(PROTO_ERROR); last; } elsif ($res == CBP_SKIP) { $self->log(LOG_DEBUG,"[CBPOLICYD] Module '".$module->{'name'}."' returned CBP_SKIP") if ($log); next; } elsif ($res == CBP_CONTINUE) { $self->log(LOG_DEBUG,"[CBPOLICYD] Module '".$module->{'name'}."' returned CBP_CONTINUE") if ($log); next; } elsif ($res == CBP_STOP) { $self->log(LOG_DEBUG,"[CBPOLICYD] Module '".$module->{'name'}."' returned CBP_STOP") if ($log); last; } elsif ($res == CBP_ERROR) { $self->log(LOG_ERR,"[CBPOLICYD] Error returned from module '".$module->{'name'}."'"); last; } } $self->log(LOG_DEBUG,"[CBPOLICYD] Done with modules") if ($log); # Update session data my $res = updateSessionData($self,$sessionData); if ($res) { $self->log(LOG_ERR,"[CBPOLICYD] Error updating session data"); $self->protocol_response(PROTO_ERROR); } # Grab and return response my $response = $self->protocol_getresponse(); print($response); # Carry on with pipelining? goto CONN_READ; } # Initialize child sub server_exit { my $self = shift; my $log_mail = $self->{'config'}{'log_mail'}; $self->log(LOG_DEBUG,"Destroying system modules."); # Destroy cache awitpt::cache::Destroy($self); $self->log(LOG_DEBUG,"System modules destroyed."); # Check if we using syslog if (defined($log_mail)) { $self->log(LOG_DEBUG,"Closing syslog."); Sys::Syslog::closelog(); $self->log(LOG_DEBUG,"Syslog closed."); }; # Parent exit $self->SUPER::server_exit(); } # Slightly better logging sub log { my ($self,$level,$msg,@args) = @_; # Check log level and set text my $logtxt = "UNKNOWN"; if ($level == LOG_DEBUG) { $logtxt = "DEBUG"; } elsif ($level == LOG_INFO) { $logtxt = "INFO"; } elsif ($level == LOG_NOTICE) { $logtxt = "NOTICE"; } elsif ($level == LOG_WARN) { $logtxt = "WARNING"; } elsif ($level == LOG_ERR) { $logtxt = "ERROR"; } # Parse message nicely if ($msg =~ /^(\[[^\]]+\]) (.*)/s) { $msg = "$1 $logtxt: $2"; } else { $msg = "[CORE] $logtxt: $msg"; } # If we have args, this is more than likely a format string & args if (@args > 0) { $msg = sprintf($msg,@args); } $self->SUPER::log($level,"[".$self->log_time." - $$] $msg"); } # Syslog logging sub maillog { my ($self,$msg,@args) = @_; my $log_mail = $self->{'config'}{'log_mail'}; # Log to syslog if (defined($log_mail)) { # If we have args use printf style if (@args) { Sys::Syslog::syslog('info',$msg,@args); } else { Sys::Syslog::syslog('info','%s',$msg); } # Or log to main mechanism } else { $self->log(LOG_INFO,sprintf($msg,@args)); } } # Protocol response setting... sub protocol_response { my $self = shift; my $server = $self->{'server'}; # Make sure the response handler exists if (!defined($server->{'_protocol_handler'}->{'protocol_response'})) { $self->log(LOG_ERR,"[CBPOLICYD] No protocol response handler available"); return -1; } return $server->{'_protocol_handler'}->{'protocol_response'}($self,@_); } # Get protocol response sub protocol_getresponse { my $self = shift; my $server = $self->{'server'}; # Make sure the response handler exists if (!defined($server->{'_protocol_handler'}->{'protocol_getresponse'})) { $self->log(LOG_ERR,"[CBPOLICYD] No protocol getresponse handler available"); return -1; } return $server->{'_protocol_handler'}->{'protocol_getresponse'}($self); } # Display help sub displayHelp { print(STDERR "Policyd (ClueBringer) v".VERSION." - Copyright (c) 2007-2009 AllWorldIT\n"); print(STDERR<<EOF); Usage: $0 [args] --config=<file> Configuration file --debug Put into debug mode --fg Don't go into background EOF } __PACKAGE__->run; 1; # vim: ts=4
Close