Linux vmi2545633.contaboserver.net 6.1.0-32-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.129-1 (2025-03-06) x86_64
Apache/2.4.62 (Debian)
Server IP : 127.0.0.1 & Your IP : 127.0.0.1
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
sbin /
Delete
Unzip
Name
Size
Permission
Date
Action
a2disconf
15.86
KB
-rwxr-xr-x
2024-10-04 15:16
a2dismod
15.86
KB
-rwxr-xr-x
2024-10-04 15:16
a2dissite
15.86
KB
-rwxr-xr-x
2024-10-04 15:16
a2enconf
15.86
KB
-rwxr-xr-x
2024-10-04 15:16
a2enmod
15.86
KB
-rwxr-xr-x
2024-10-04 15:16
a2ensite
15.86
KB
-rwxr-xr-x
2024-10-04 15:16
a2query
9.6
KB
-rwxr-xr-x
2024-10-04 15:21
aa-remove-unknown
3.13
KB
-rwxr-xr-x
2023-02-14 11:49
aa-status
38.3
KB
-rwxr-xr-x
2023-02-14 11:49
aa-teardown
137
B
-rwxr-xr-x
2022-11-22 00:54
accessdb
14.46
KB
-rwxr-xr-x
2023-03-12 22:23
add-shell
1.03
KB
-rwxr-xr-x
2023-07-28 23:46
addgnupghome
3
KB
-rwxr-xr-x
2023-03-26 13:03
addgroup
47.25
KB
-rwxr-xr-x
2023-05-25 15:54
adduser
47.25
KB
-rwxr-xr-x
2023-05-25 15:54
agetty
67.49
KB
-rwxr-xr-x
2024-11-21 20:01
apache2
712.5
KB
-rwxr-xr-x
2024-10-04 15:21
apache2ctl
7.19
KB
-rwxr-xr-x
2024-10-04 15:16
apachectl
7.19
KB
-rwxr-xr-x
2024-10-04 15:16
apparmor_parser
1.39
MB
-rwxr-xr-x
2023-02-14 11:49
apparmor_status
38.3
KB
-rwxr-xr-x
2023-02-14 11:49
applygnupgdefaults
2.17
KB
-rwxr-xr-x
2023-03-26 13:03
arpd
104.48
KB
-rwxr-xr-x
2023-05-22 13:19
arptables
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
arptables-nft
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
arptables-nft-restore
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
arptables-nft-save
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
arptables-restore
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
arptables-save
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
aspell-autobuildhash
13.36
KB
-rwxr-xr-x
2023-03-14 21:17
badblocks
34.25
KB
-rwxr-xr-x
2023-03-05 03:16
biosdecode
27.13
KB
-rwxr-xr-x
2022-06-30 18:37
blkdeactivate
15.96
KB
-rwxr-xr-x
2022-10-19 19:37
blkdiscard
34.31
KB
-rwxr-xr-x
2024-11-21 20:01
blkid
122.34
KB
-rwxr-xr-x
2024-11-21 20:01
blkzone
78.31
KB
-rwxr-xr-x
2024-11-21 20:01
blockdev
78.31
KB
-rwxr-xr-x
2024-11-21 20:01
bridge
152.54
KB
-rwxr-xr-x
2023-05-22 13:19
capsh
53.29
KB
-rwxr-xr-x
2023-05-15 18:34
cfdisk
106.66
KB
-rwxr-xr-x
2024-11-21 20:01
chcpu
46.3
KB
-rwxr-xr-x
2024-11-21 20:01
check_forensic
952
B
-rwxr-xr-x
2011-04-26 15:10
chgpasswd
66.29
KB
-rwxr-xr-x
2023-03-23 12:40
chmem
66.31
KB
-rwxr-xr-x
2024-11-21 20:01
chpasswd
62.36
KB
-rwxr-xr-x
2023-03-23 12:40
chroot
46.98
KB
-rwxr-xr-x
2022-09-20 15:27
cpgr
60.43
KB
-rwxr-xr-x
2023-03-23 12:40
cppw
60.43
KB
-rwxr-xr-x
2023-03-23 12:40
cron
50.56
KB
-rwxr-xr-x
2023-03-02 07:33
ctrlaltdel
38.3
KB
-rwxr-xr-x
2024-11-21 20:01
dcb
144.6
KB
-rwxr-xr-x
2023-05-22 13:19
debugfs
233.83
KB
-rwxr-xr-x
2023-03-05 03:16
delgroup
16.33
KB
-rwxr-xr-x
2023-05-25 15:54
deluser
16.33
KB
-rwxr-xr-x
2023-05-25 15:54
depmod
174.27
KB
-rwxr-xr-x
2022-12-10 00:02
devlink
220.98
KB
-rwxr-xr-x
2023-05-22 13:19
dhclient
2.63
MB
-rwxr-xr-x
2023-04-17 12:20
dhclient-script
14.21
KB
-rwxr-xr-x
2023-04-17 12:20
discover
23.23
KB
-rwxr-xr-x
2022-01-09 07:48
discover-modprobe
4.9
KB
-rwxr-xr-x
2022-01-09 07:48
discover-pkginstall
5.66
KB
-rwxr-xr-x
2022-01-09 07:48
dmidecode
127.16
KB
-rwxr-xr-x
2022-06-30 18:37
dmsetup
166.98
KB
-rwxr-xr-x
2022-10-19 19:37
dmstats
166.98
KB
-rwxr-xr-x
2022-10-19 19:37
dpkg-fsys-usrunmess
16.99
KB
-rwxr-xr-x
2023-05-11 02:04
dpkg-preconfigure
3.83
KB
-rwxr-xr-x
2023-01-08 21:50
dpkg-reconfigure
4.38
KB
-rwxr-xr-x
2023-01-08 21:50
dumpe2fs
30.31
KB
-rwxr-xr-x
2023-03-05 03:16
e2freefrag
14.3
KB
-rwxr-xr-x
2023-03-05 03:16
e2fsck
348.27
KB
-rwxr-xr-x
2023-03-05 03:16
e2image
54.45
KB
-rwxr-xr-x
2023-03-05 03:16
e2label
114.52
KB
-rwxr-xr-x
2023-03-05 03:16
e2mmpstatus
30.31
KB
-rwxr-xr-x
2023-03-05 03:16
e2scrub
7.12
KB
-rwxr-xr-x
2023-03-05 03:16
e2scrub_all
5.27
KB
-rwxr-xr-x
2023-03-05 03:16
e2undo
22.3
KB
-rwxr-xr-x
2023-03-05 03:16
e4crypt
26.3
KB
-rwxr-xr-x
2023-03-05 03:16
e4defrag
30.23
KB
-rwxr-xr-x
2023-03-05 03:16
ebtables
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
ebtables-nft
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
ebtables-nft-restore
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
ebtables-nft-save
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
ebtables-restore
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
ebtables-save
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
ebtables-translate
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
faillock
14.24
KB
-rwxr-xr-x
2023-09-21 20:55
fdisk
158.35
KB
-rwxr-xr-x
2024-11-21 20:01
filefrag
18.26
KB
-rwxr-xr-x
2023-03-05 03:16
findfs
14.3
KB
-rwxr-xr-x
2024-11-21 20:01
fsck
54.36
KB
-rwxr-xr-x
2024-11-21 20:01
fsck.cramfs
42.37
KB
-rwxr-xr-x
2024-11-21 20:01
fsck.ext2
348.27
KB
-rwxr-xr-x
2023-03-05 03:16
fsck.ext3
348.27
KB
-rwxr-xr-x
2023-03-05 03:16
fsck.ext4
348.27
KB
-rwxr-xr-x
2023-03-05 03:16
fsck.minix
122.34
KB
-rwxr-xr-x
2024-11-21 20:01
fsfreeze
14.3
KB
-rwxr-xr-x
2024-11-21 20:01
fstab-decode
14.23
KB
-rwxr-xr-x
2023-04-03 06:25
fstrim
74.31
KB
-rwxr-xr-x
2024-11-21 20:01
genl
116.51
KB
-rwxr-xr-x
2023-05-22 13:19
getcap
14.23
KB
-rwxr-xr-x
2023-05-15 18:34
getpcaps
14.23
KB
-rwxr-xr-x
2023-05-15 18:34
getty
67.49
KB
-rwxr-xr-x
2024-11-21 20:01
groupadd
99.04
KB
-rwxr-xr-x
2023-03-23 12:40
groupdel
90.85
KB
-rwxr-xr-x
2023-03-23 12:40
groupmems
66.33
KB
-rwxr-xr-x
2023-03-23 12:40
groupmod
99.01
KB
-rwxr-xr-x
2023-03-23 12:40
grpck
66.3
KB
-rwxr-xr-x
2023-03-23 12:40
grpconv
58.14
KB
-rwxr-xr-x
2023-03-23 12:40
grpunconv
58.14
KB
-rwxr-xr-x
2023-03-23 12:40
grub-bios-setup
934.42
KB
-rwxr-xr-x
2023-10-02 14:11
grub-install
1.14
MB
-rwxr-xr-x
2023-10-02 14:11
grub-macbless
922.26
KB
-rwxr-xr-x
2023-10-02 14:11
grub-mkconfig
8.46
KB
-rwxr-xr-x
2023-10-02 14:11
grub-mkdevicemap
216.7
KB
-rwxr-xr-x
2023-10-02 14:11
grub-probe
934.57
KB
-rwxr-xr-x
2023-10-02 14:11
grub-reboot
4.73
KB
-rwxr-xr-x
2023-10-02 14:11
grub-set-default
3.47
KB
-rwxr-xr-x
2023-10-02 14:11
halt
1.29
MB
-rwxr-xr-x
2025-03-06 14:56
httxt2dbm
14.23
KB
-rwxr-xr-x
2024-10-04 15:21
hwclock
86.44
KB
-rwxr-xr-x
2024-11-21 20:01
iconvconfig
30.84
KB
-rwxr-xr-x
2025-03-06 22:46
ifdown
86.16
KB
-rwxr-xr-x
2023-01-24 13:07
ifquery
86.16
KB
-rwxr-xr-x
2023-01-24 13:07
ifup
86.16
KB
-rwxr-xr-x
2023-01-24 13:07
init
90.38
KB
-rwxr-xr-x
2025-03-06 14:56
insmod
174.27
KB
-rwxr-xr-x
2022-12-10 00:02
install-sgmlcatalog
4.44
KB
-rwxr-xr-x
2022-10-06 18:03
installkernel
2.6
KB
-rwxr-xr-x
2023-07-28 23:46
invoke-rc.d
16.13
KB
-rwxr-xr-x
2022-07-02 15:23
ip
674.82
KB
-rwxr-xr-x
2023-05-22 13:19
ip6tables
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
ip6tables-apply
6.87
KB
-rwxr-xr-x
2023-01-12 10:27
ip6tables-legacy
88.98
KB
-rwxr-xr-x
2023-01-16 13:44
ip6tables-legacy-restore
88.98
KB
-rwxr-xr-x
2023-01-16 13:44
ip6tables-legacy-save
88.98
KB
-rwxr-xr-x
2023-01-16 13:44
ip6tables-nft
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
ip6tables-nft-restore
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
ip6tables-nft-save
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
ip6tables-restore
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
ip6tables-restore-translate
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
ip6tables-save
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
ip6tables-translate
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
iptables
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
iptables-apply
6.87
KB
-rwxr-xr-x
2023-01-12 10:27
iptables-legacy
88.98
KB
-rwxr-xr-x
2023-01-16 13:44
iptables-legacy-restore
88.98
KB
-rwxr-xr-x
2023-01-16 13:44
iptables-legacy-save
88.98
KB
-rwxr-xr-x
2023-01-16 13:44
iptables-nft
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
iptables-nft-restore
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
iptables-nft-save
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
iptables-restore
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
iptables-restore-translate
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
iptables-save
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
iptables-translate
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
isosize
30.31
KB
-rwxr-xr-x
2024-11-21 20:01
ispell-autobuildhash
15.52
KB
-rwxr-xr-x
2023-03-14 21:17
iucode-tool
58.26
KB
-rwxr-xr-x
2023-02-17 19:51
iucode_tool
58.26
KB
-rwxr-xr-x
2023-02-17 19:51
kbdrate
14.52
KB
-rwxr-xr-x
2023-03-23 09:34
killall5
26.31
KB
-rwxr-xr-x
2023-04-03 06:25
ldattach
34.31
KB
-rwxr-xr-x
2024-11-21 20:01
ldconfig
959.84
KB
-rwxr-xr-x
2025-03-06 22:46
locale-gen
1.38
KB
-rwxr-xr-x
2025-03-06 22:46
logrotate
98.16
KB
-rwxr-xr-x
2022-12-14 18:16
logsave
14.09
KB
-rwxr-xr-x
2023-03-05 03:16
losetup
114.42
KB
-rwxr-xr-x
2024-11-21 20:01
lsmod
174.27
KB
-rwxr-xr-x
2022-12-10 00:02
make-ssl-cert
6.65
KB
-rwxr-xr-x
2021-12-30 16:52
mariadbd
25.77
MB
-rwxr-xr-x
2025-02-19 00:56
mke2fs
138.58
KB
-rwxr-xr-x
2023-03-05 03:16
mkfs
14.3
KB
-rwxr-xr-x
2024-11-21 20:01
mkfs.bfs
34.31
KB
-rwxr-xr-x
2024-11-21 20:01
mkfs.cramfs
42.24
KB
-rwxr-xr-x
2024-11-21 20:01
mkfs.ext2
138.58
KB
-rwxr-xr-x
2023-03-05 03:16
mkfs.ext3
138.58
KB
-rwxr-xr-x
2023-03-05 03:16
mkfs.ext4
138.58
KB
-rwxr-xr-x
2023-03-05 03:16
mkfs.minix
110.32
KB
-rwxr-xr-x
2024-11-21 20:01
mkhomedir_helper
22.27
KB
-rwxr-xr-x
2023-09-21 20:55
mkinitramfs
12.4
KB
-rwxr-xr-x
2024-08-24 23:14
mklost+found
14.23
KB
-rwxr-xr-x
2023-03-05 03:16
mkswap
114.31
KB
-rwxr-xr-x
2024-11-21 20:01
modinfo
174.27
KB
-rwxr-xr-x
2022-12-10 00:02
modprobe
174.27
KB
-rwxr-xr-x
2022-12-10 00:02
mysqld
25.77
MB
-rwxr-xr-x
2025-02-19 00:56
newusers
102.92
KB
-rwxr-xr-x
2023-03-23 12:40
nfnl_osf
18.23
KB
-rwxr-xr-x
2023-01-16 13:44
nft
26.15
KB
-rwxr-xr-x
2023-09-16 05:47
nginx
1.2
MB
-rwxr-xr-x
2025-02-17 19:40
nologin
14.23
KB
-rwxr-xr-x
2023-03-23 12:40
ownership
14.38
KB
-rwxr-xr-x
2022-06-30 18:37
pam-auth-update
20.79
KB
-rwxr-xr-x
2023-09-21 20:55
pam_getenv
2.82
KB
-rwxr-xr-x
2023-09-21 20:55
pam_namespace_helper
467
B
-rwxr-xr-x
2023-09-21 20:55
pam_timestamp_check
14.24
KB
-rwxr-xr-x
2023-09-21 20:55
php-fpm8.4
5.68
MB
-rwxr-xr-x
2025-10-01 20:26
phpdismod
7.11
KB
-rwxr-xr-x
2025-03-09 16:33
phpenmod
7.11
KB
-rwxr-xr-x
2025-03-09 16:33
phpquery
6.24
KB
-rwxr-xr-x
2025-03-09 16:33
pivot_root
14.3
KB
-rwxr-xr-x
2024-11-21 20:01
poweroff
1.29
MB
-rwxr-xr-x
2025-03-06 14:56
pwck
58.26
KB
-rwxr-xr-x
2023-03-23 12:40
pwconv
54.13
KB
-rwxr-xr-x
2023-03-23 12:40
pwhistory_helper
18.24
KB
-rwxr-xr-x
2023-09-21 20:55
pwunconv
54.17
KB
-rwxr-xr-x
2023-03-23 12:40
qemu-ga
985.25
KB
-rwxr-xr-x
2025-01-04 14:47
readprofile
34.34
KB
-rwxr-xr-x
2024-11-21 20:01
reboot
1.29
MB
-rwxr-xr-x
2025-03-06 14:56
remove-default-ispell
2.86
KB
-rwxr-xr-x
2023-03-14 21:17
remove-default-wordlist
2.86
KB
-rwxr-xr-x
2023-03-14 21:17
remove-shell
1.08
KB
-rwxr-xr-x
2023-07-28 23:46
resize2fs
62.3
KB
-rwxr-xr-x
2023-03-05 03:16
rmmod
174.27
KB
-rwxr-xr-x
2022-12-10 00:02
rmt
59.02
KB
-rwxr-xr-x
2024-01-20 09:27
rmt-tar
59.02
KB
-rwxr-xr-x
2024-01-20 09:27
rtacct
44.37
KB
-rwxr-xr-x
2023-05-22 13:19
rtcwake
46.31
KB
-rwxr-xr-x
2024-11-21 20:01
rtmon
112.45
KB
-rwxr-xr-x
2023-05-22 13:19
runlevel
1.29
MB
-rwxr-xr-x
2025-03-06 14:56
runuser
70.31
KB
-rwxr-xr-x
2024-11-21 20:01
select-default-ispell
3.23
KB
-rwxr-xr-x
2023-03-14 21:17
select-default-wordlist
3.21
KB
-rwxr-xr-x
2023-03-14 21:17
service
8.89
KB
-rwxr-xr-x
2022-09-18 01:53
setcap
14.23
KB
-rwxr-xr-x
2023-05-15 18:34
setvesablank
14.51
KB
-rwxr-xr-x
2023-03-23 09:34
sfdisk
142.3
KB
-rwxr-xr-x
2024-11-21 20:01
shadowconfig
2.22
KB
-rwxr-xr-x
2022-11-11 08:28
shutdown
1.29
MB
-rwxr-xr-x
2025-03-06 14:56
split-logfile
2.36
KB
-rwxr-xr-x
2024-10-04 15:21
sshd
1.21
MB
-rwxr-xr-x
2025-02-14 13:06
start-stop-daemon
43.42
KB
-rwxr-xr-x
2023-05-11 02:04
sudo_logsrvd
244.57
KB
-rwxr-xr-x
2023-06-27 11:45
sudo_sendlog
151.41
KB
-rwxr-xr-x
2023-06-27 11:45
sulogin
54.31
KB
-rwxr-xr-x
2024-11-21 20:01
swaplabel
18.3
KB
-rwxr-xr-x
2024-11-21 20:01
swapoff
22.3
KB
-rwxr-xr-x
2024-11-21 20:01
swapon
50.3
KB
-rwxr-xr-x
2024-11-21 20:01
switch_root
18.3
KB
-rwxr-xr-x
2024-11-21 20:01
sysctl
30.31
KB
-rwxr-xr-x
2022-12-19 06:06
tarcat
936
B
-rwxr-xr-x
2024-01-20 09:27
tc
574
KB
-rwxr-xr-x
2023-05-22 13:19
tcptraceroute
1.56
KB
-rwxr-xr-x
2023-02-25 12:24
tcptraceroute.db
1.56
KB
-rwxr-xr-x
2023-02-25 12:24
telinit
1.29
MB
-rwxr-xr-x
2025-03-06 14:56
tipc
152.6
KB
-rwxr-xr-x
2023-05-22 13:19
traceroute
71.23
KB
-rwxr-xr-x
2023-02-25 12:24
tune2fs
114.52
KB
-rwxr-xr-x
2023-03-05 03:16
ufw
4.84
KB
-rwxr-xr-x
2023-05-18 14:03
unix_chkpwd
38.24
KB
-rwxr-sr-x
2023-09-21 20:55
unix_update
38.24
KB
-rwxr-xr-x
2023-09-21 20:55
update-ca-certificates
5.29
KB
-rwxr-xr-x
2023-03-11 08:47
update-catalog
9.17
KB
-rwxr-xr-x
2022-10-06 18:03
update-default-aspell
1
KB
-rwxr-xr-x
2023-03-14 21:17
update-default-ispell
9.68
KB
-rwxr-xr-x
2023-03-14 21:17
update-default-wordlist
7.5
KB
-rwxr-xr-x
2023-03-14 21:17
update-dictcommon-aspell
1
KB
-rwxr-xr-x
2023-03-14 21:17
update-dictcommon-hunspell
782
B
-rwxr-xr-x
2023-03-14 21:17
update-grub
64
B
-rwxr-xr-x
2023-10-02 14:11
update-grub2
64
B
-rwxr-xr-x
2023-10-02 14:11
update-initramfs
6.75
KB
-rwxr-xr-x
2024-08-22 19:30
update-locale
2.99
KB
-rwxr-xr-x
2025-03-06 22:46
update-mime
9.39
KB
-rwxr-xr-x
2021-11-29 13:07
update-passwd
38.49
KB
-rwxr-xr-x
2022-09-20 10:22
update-pciids
1.71
KB
-rwxr-xr-x
2023-01-17 23:50
update-rc.d
17.33
KB
-rwxr-xr-x
2022-07-02 15:23
update-shells
3.89
KB
-rwxr-xr-x
2023-07-28 23:46
update-xmlcatalog
16.88
KB
-rwxr-xr-x
2019-02-27 00:18
upgrade-from-grub-legacy
1.56
KB
-rwxr-xr-x
2023-10-02 14:11
useradd
155.8
KB
-rwxr-xr-x
2023-03-23 12:40
userdel
110.95
KB
-rwxr-xr-x
2023-03-23 12:40
usermod
143.61
KB
-rwxr-xr-x
2023-03-23 12:40
validlocale
1.73
KB
-rwxr-xr-x
2025-03-06 22:46
vcstime
14.38
KB
-rwxr-xr-x
2023-03-23 09:34
vdpa
116.66
KB
-rwxr-xr-x
2023-05-22 13:19
vigr
72.64
KB
-rwxr-xr-x
2023-03-23 12:40
vipw
72.64
KB
-rwxr-xr-x
2023-03-23 12:40
visudo
256.63
KB
-rwxr-xr-x
2023-06-27 11:45
vpddecode
14.51
KB
-rwxr-xr-x
2022-06-30 18:37
wipefs
46.31
KB
-rwxr-xr-x
2024-11-21 20:01
xtables-legacy-multi
88.98
KB
-rwxr-xr-x
2023-01-16 13:44
xtables-monitor
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
xtables-nft-multi
223.16
KB
-rwxr-xr-x
2023-01-16 13:44
zic
58.73
KB
-rwxr-xr-x
2025-03-06 22:46
zramctl
114.42
KB
-rwxr-xr-x
2024-11-21 20:01
Save
Rename
#!/usr/bin/perl ## ---------------------------------------------------------------------- ## Debian update-xmlcatalog ## ---------------------------------------------------------------------- ## Copyright (c) 2003-2004 Ardo van Rangelrooij ## ## This is free software; see the GNU General Public Licence version 2 ## or later for copying conditions. There is NO warranty. ## ---------------------------------------------------------------------- =head1 NAME update-xmlcatalog - maintain XML catalog files =head1 SYNOPSIS B<update-xmlcatalog> B<--add> B<--root> S<B<--package> I<package>> S<B<--type> I<type>> S<B<--id> I<id>> B<update-xmlcatalog> B<--del> B<--root> S<B<--package> I<package>> S<B<--type> I<type>> S<B<--id> I<id>> B<update-xmlcatalog> B<--add> S<B<--package> I<package>> S<B<--local> I<local>> S<B<--type> I<type>> S<B<--id> I<id>> B<update-xmlcatalog> B<--del> S<B<--package> I<package>> S<B<--local> I<local>> S<B<--type> I<type>> S<B<--id> I<id>> B<update-xmlcatalog> B<--add> S<B<--local> I<local>> S<B<--file> I<file>> S<B<--type> I<type>> S<B<--id> I<id>> B<update-xmlcatalog> B<--del> S<B<--local> I<local>> S<B<--file> I<file>> S<B<--type> I<type>> S<B<--id> I<id>> B<update-xmlcatalog> B<--help> =head1 DESCRIPTION B<update-xmlcatalog> add entries to and removes entries from the root XML catalog file, a package XML catalog file or a local XML catalog file. =head1 OPTIONS =over 4 =item B<--add> Adds the entry to the root XML catalog file, a package XML catalog file or a local XML catalog file. If the XML catalog file does not exist yet, it is automatically created. =item B<--del> Deletes the entry from the root XML catalog file, the package XML catalog file or the local XML catalog file. A resulting empty XML catalog is not automatically deleted from the filesystem. =item B<--file> I<file> Indicates a local filename. =item B<--id> I<id> Indicates the XML catalog file entry identifier. =item B<--local> I<local> Indicates a local XML catalog file. =item B<--package> I<package> Indicates a package XML catalog file. =item B<--root> Indicates the root XML catalog file. =item B<--type> I<type> Indicates the XML catalog file entry type (public, system, uri). =item B<--help> Displays the usage information. =item B<--verbose> Optional switch to make a verbose output. =item B<--sort> Optional switch to sort the manipulated catalog content. Tip: To sort a catalog without adding or removing an item, just add an already existing item to the catalog. =back =head1 NOTES B<update-xmlcatalog> is the de-facto standard tool to be used to maintain XML catalog files on a Debian system, similar to that L<update-catalog(8)> is the standard tool to be used to main SGML catalog files on a Debian system. A Debian XML Policy document to this effect is currently under development. B<update-xmlcatalog> and L<xmlcatalog(1)> are incompatible. The former has an internal database of all the entries in all the XML catalog files it maintains and regenerates the indicated XML catalog file completely from scratch upon an update. The latter updates the indicated XML catalog file directly. This means that any change made to an XML catalog file using L<xmlcatalog(1)> is overwritten the next time that XML catalog file is updated using B<update-xmlcatalog>. =head1 SEE ALSO F</usr/share/doc/xml-core/README.Debian> =head1 AUTHOR B<Ardo van Rangelrooij> E<lt>ardo@debian.orgE<gt> =cut ## ---------------------------------------------------------------------- use strict; ## ---------------------------------------------------------------------- use File::Spec; use Getopt::Long; ## ---------------------------------------------------------------------- $0 =~ m|[^/]+$|; ## ---------------------------------------------------------------------- my $name = $&; ## ---------------------------------------------------------------------- use vars qw( $catalog_data $catalog_data_dir ); use vars qw( $catalog $catalog_dir ); use vars qw( %catalog $key $entry ); ## ---------------------------------------------------------------------- $catalog_data_dir = '/var/lib/xml-core'; $catalog_dir = '/etc/xml'; ## ---------------------------------------------------------------------- use vars qw( $add ); use vars qw( $del ); use vars qw( $file ); use vars qw( $help ); use vars qw( $local ); use vars qw( $package ); use vars qw( $root ); use vars qw( $type $id ); use vars qw( $verbose ); use vars qw( $sort ); ## ---------------------------------------------------------------------- if ( ! GetOptions( 'add' => \$add, 'del' => \$del, 'file=s' => \$file, 'help' => \$help, 'id=s' => \$id, 'local=s' => \$local, 'package=s' => \$package, 'root' => \$root, 'type=s' => \$type, 'verbose' => \$verbose, 'sort' => \$sort, ) ) { &help; exit 1; } ## ---------------------------------------------------------------------- if ( defined( $help ) ) { &help; exit -1; } ## ---------------------------------------------------------------------- if ( ! ( defined( $add ) || defined( $del ) ) ) { print STDERR "$name: error: either 'add' or 'del' must be given\n"; exit 1; } elsif ( ( defined( $add ) && defined( $del ) ) ) { print STDERR "$name: error: only one of 'add' and 'del' can be given\n"; exit 1; } ## ---------------------------------------------------------------------- if ( defined( $add ) ) { if ( defined( $root ) ) { if ( defined( $package ) ) { my $catalog = File::Spec->catfile( $catalog_dir, "$package.xml" ); if ( ! -f $catalog ) { print STDERR "$name: error: package catalog $catalog not found\n"; exit 1; } } else { print STDERR "$name: error: package catalog not given\n"; exit 1; } if ( defined( $local) || defined( $file ) ) { print STDERR "$name: error: local catalog and file not for adding to root catalog file\n"; exit 1; } } elsif ( defined( $package ) ) { if ( defined( $local ) ) { if ( ! -f $local ) { print STDERR "$name: error: local catalog $local not found\n"; exit 1; } } else { print STDERR "$name: error: local catalog not given\n"; exit 1; } if ( defined( $file ) ) { print STDERR "$name: error: file not for adding to package catalog file\n"; exit 1; } } elsif ( defined( $local ) ) { if ( defined( $file ) ) { if ( ! -f $file ) { print STDERR "$name: error: file $file not found\n"; exit 1; } } else { print STDERR "$name: error: file not given\n"; exit 1; } } else { print STDERR "$name: error: catalog not given\n"; exit 1; } } elsif ( defined( $del ) ) { if ( defined( $root ) ) { my $catalog = File::Spec->catfile( $catalog_dir, 'catalog' ); if ( ! -f $catalog ) { print STDERR "$name: error: root catalog $catalog not found\n"; exit 1; } if ( defined( $package) || defined( $local ) || defined( $file ) ) { print STDERR "$name: error: package catalog, local catalog or file not for deleting from root catalog file\n"; exit 1; } } elsif ( defined( $package ) ) { my $catalog = File::Spec->catfile( $catalog_dir, "$package.xml" ); if ( ! -f $catalog ) { print STDERR "$name: error: package catalog $catalog not found\n"; exit 1; } if ( defined( $local ) || defined( $file ) ) { print STDERR "$name: error: local catalog or file not for deleting from package catalog file\n"; exit 1; } } elsif ( defined( $local ) ) { if ( ! -f $local ) { print STDERR "$name: error: local catalog $local not found\n"; exit 1; } if ( defined( $file ) ) { print STDERR "$name: error: file not for deleting from local catalog file\n"; exit 1; } } else { print STDERR "$name: error: catalog not given\n"; exit 1; } } ## ---------------------------------------------------------------------- if ( defined( $type ) ) { if ( $type !~ /^(public|system|uri)$/ ) { print STDERR "$name: error: wrong type\n"; exit 1; } } else { print STDERR "$name: error: type not given\n"; exit 1; } ## ---------------------------------------------------------------------- if ( ! defined( $id ) ) { print STDERR "$name: error: id not given\n"; exit 1; } ## ---------------------------------------------------------------------- if ( defined( $root ) ) { $catalog = 'catalog'; $catalog_data = File::Spec->catfile( $catalog_data_dir, $catalog ); $catalog = File::Spec->catfile( $catalog_dir, $catalog ); my $start = $type; $start .= 'Id' unless $type eq 'uri'; $start .= 'StartString'; $id = "$start=\"$id\""; $type = ( $type eq 'uri' ) ? "\U$type" : "\u$type"; $type = "delegate$type"; $package = "catalog=\"file:///etc/xml/$package.xml\""; $key = "$type $id"; $entry = "$package"; } elsif ( defined( $package ) ) { $catalog_data = File::Spec->catfile( $catalog_data_dir, $package ); $catalog = File::Spec->catfile( $catalog_dir, "$package.xml" ); my $start = $type; $start .= 'Id' unless $type eq 'uri'; $start .= 'StartString'; $id = "$start=\"$id\""; $type = ( $type eq 'uri' ) ? "\U$type" : "\u$type"; $type = "delegate$type"; $local = "catalog=\"file://$local\""; $key = "$type $id"; $entry = "$local"; } elsif ( defined( $local ) ) { $catalog = $local; $catalog_data = $local; $catalog_data =~ tr|/|_|; $catalog_data = File::Spec->catfile( $catalog_data_dir, $catalog_data ); my $start = ( $type eq 'uri' ) ? 'name' : $type; $start .= 'Id' unless $type eq 'uri'; $id = "$start=\"$id\""; $file = "uri=\"$file\""; $key = "$type $id"; $entry = "$file"; } ## ---------------------------------------------------------------------- if ( defined( $add ) ) { &read_catalog_data if -f $catalog_data; if ( &add_entry ) { &create_backup if -f $catalog; &write_catalog_data; &write_catalog; } else { exit 1; } } elsif ( defined( $del ) ) { &read_catalog_data; if ( &del_entry ) { &create_backup; &write_catalog_data; &write_catalog; } else { exit 1; } } ## ---------------------------------------------------------------------- exit 0; ## ---------------------------------------------------------------------- sub add_entry { ## ------------------------------------------------------------------ if ( exists( $catalog{ $key } ) ) { if ( $catalog{ $key } ne $entry ) { print STDERR "$name: error: entity already registered with a different value\n"; print STDERR " Entity : [$key]\n"; print STDERR " Old value: [$catalog{$key}]\n"; print STDERR " New value: [$entry]\n"; return; } else { print STDERR "$name: notice: entity already registered\n" if $verbose; return 1; } } else { print "$name: adding entity to catalog data $catalog_data with the same value\n" if $verbose; $catalog{ $key } = $entry; return 1; } } ## add_entry ## ---------------------------------------------------------------------- sub del_entry { ## ------------------------------------------------------------------ if ( exists( $catalog{ $key } ) ) { print "$name: removing entity from catalog data $catalog_data\n" if $verbose; delete( $catalog{ $key } ); return 1; } else { print STDERR "$name: error: entity not registered\n"; return; } } ## del_entry ## ---------------------------------------------------------------------- sub read_catalog_data { ## ------------------------------------------------------------------ print "$name: reading catalog data $catalog_data\n" if $verbose; open( CATALOG_DATA, '<', $catalog_data ) or die "$name: cannot open catalog data $catalog_data for reading: $!"; while ( <CATALOG_DATA> ) { chop; my ( $key, $entry ) = split( />/ ); $key =~ s/^<//; $entry =~ s/^<//; $catalog{ $key } = $entry; } close( CATALOG_DATA ) or die "$name: cannot close catalog data $catalog_data: $!"; } ## read_catalog_data ## ---------------------------------------------------------------------- sub write_catalog_data { ## ------------------------------------------------------------------ print "$name: writing catalog data $catalog_data\n" if $verbose; open( CATALOG_DATA, '>', $catalog_data ) or die "$name: cannot open catalog data $catalog_data for writing: $!"; my $counter = 0; # Adding the optional sort of the catalog. See #626036. my @catalog_keys = ( $sort ? sort keys %catalog : keys %catalog ); for my $key ( @catalog_keys ) { print( CATALOG_DATA "<$key><$catalog{ $key }>\n" ); $counter++; } close( CATALOG_DATA ) or die "$name: cannot close catalog data $catalog_data: $!"; ## ------------------------------------------------------------------ if ( $counter == 0 ) { print "$name: removing catalog data $catalog_data\n" if $verbose; unlink( $catalog_data ); } } ## write_catalog_data ## ---------------------------------------------------------------------- sub create_backup { ## ------------------------------------------------------------------ my $backup = $catalog . '.old'; ## ------------------------------------------------------------------ if ( -f $backup ) { print "$name: removing backup $backup\n" if $verbose; unlink( $backup ) or die "$name: cannot remove backup $backup: $!"; } ## ------------------------------------------------------------------ print "$name: moving catalog $catalog to backup $backup\n" if $verbose; rename( $catalog, $backup ) or die "$name: cannot move catalog $catalog to backup $backup: $!"; } ## create_backup ## ---------------------------------------------------------------------- sub write_catalog { ## ------------------------------------------------------------------ my @catalog = (); ## ------------------------------------------------------------------ my $header = '/usr/share/xml-core/catalog.header'; open( HEADER, '<', $header ) or die "$name: cannot open catalog header $header for reading: $!"; while ( <HEADER> ) { chop; push( @catalog, $_ ); } close( HEADER ) or die "$name: cannot close catalog header $header: $!"; ## ------------------------------------------------------------------ my $counter = 0; # Adding the optional sort of the catalog. See #626036. my @catalog_keys = ( $sort ? sort keys %catalog : keys %catalog ); for my $key ( @catalog_keys ) { push( @catalog, "<$key $catalog{ $key }/>" ); $counter++; } ## ------------------------------------------------------------------ my $footer = '/usr/share/xml-core/catalog.footer'; open( FOOTER, '<', $footer ) or die "$name: cannot open catalog footer $footer for reading: $!"; while ( <FOOTER> ) { chop; push( @catalog, $_ ); } close( FOOTER ) or die "$name: cannot close catalog footer $footer: $!"; ## ------------------------------------------------------------------ print "$name: writing catalog $catalog\n" if $verbose; open( CATALOG, '>', $catalog ) or die "$name: cannot open catalog $catalog for writing: $!"; for ( @catalog ) { print( CATALOG $_, "\n" ); } close( CATALOG ) or die "$name: cannot close catalog $catalog: $!"; ## ------------------------------------------------------------------ if ( $counter == 0 ) { print "$name: removing catalog $catalog\n" if $verbose; unlink( $catalog ); } } ## write_catalog ## ---------------------------------------------------------------------- sub help { ## ------------------------------------------------------------------ print <<END; Usage: $name <options> --add --root --type <type> \\ --id <id> --package <package> $name <options> --del --root --type <type> \\ --id <id> $name <options> --add --package <package> --type <type> \\ --id <id> --local <local> $name <options> --del --package <package> --type <type> \\ --id <id> $name <options> --add --local <local> --type <type> \\ --id <id> --file <file> $name <options> --del --local <local> --type <type> \\ --id <id> $name --help With: --file <file> = a local filename --id <id> = catalog entry idenitifier --local <local> = a local XML catalog --package <package> = a package XML catalog --root = the root XML catalog (= /etc/xml/catalog) --type <type> = catalog entry type (= public, system, uri) Options: --verbose = be verbose --sort = sorts the manipulated catalog content END } ## help ## ---------------------------------------------------------------------- __END__ ## ----------------------------------------------------------------------