Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Apache
: 172.26.7.228 | : 18.116.63.107
Cant Read [ /etc/named.conf ]
5.6.40-24+ubuntu18.04.1+deb.sury.org+1
www-data
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
snap /
core22 /
1722 /
usr /
bin /
[ HOME SHELL ]
Name
Size
Permission
Action
[
50.44
KB
-rwxr-xr-x
aa-enabled
34.52
KB
-rwxr-xr-x
aa-exec
34.52
KB
-rwxr-xr-x
aa-features-abi
30.52
KB
-rwxr-xr-x
addpart
14.38
KB
-rwxr-xr-x
arch
30.51
KB
-rwxr-xr-x
awk
154.79
KB
-rwxr-xr-x
b2sum
50.52
KB
-rwxr-xr-x
base32
34.51
KB
-rwxr-xr-x
base64
34.51
KB
-rwxr-xr-x
basename
34.51
KB
-rwxr-xr-x
basenc
46.51
KB
-rwxr-xr-x
bash
1.33
MB
-rwxr-xr-x
bashbug
6.66
KB
-rwxr-xr-x
bootctl
70.49
KB
-rwxr-xr-x
bunzip2
38.38
KB
-rwxr-xr-x
busctl
90.49
KB
-rwxr-xr-x
bzcat
38.38
KB
-rwxr-xr-x
bzcmp
2.17
KB
-rwxr-xr-x
bzdiff
2.17
KB
-rwxr-xr-x
bzegrep
3.69
KB
-rwxr-xr-x
bzexe
4.78
KB
-rwxr-xr-x
bzfgrep
3.69
KB
-rwxr-xr-x
bzgrep
3.69
KB
-rwxr-xr-x
bzip2
38.38
KB
-rwxr-xr-x
bzip2recover
14.3
KB
-rwxr-xr-x
bzless
1.27
KB
-rwxr-xr-x
bzmore
1.27
KB
-rwxr-xr-x
c_rehash
6.8
KB
-rwxr-xr-x
captoinfo
86.41
KB
-rwxr-xr-x
cat
34.46
KB
-rwxr-xr-x
chage
70.49
KB
-rwxr-sr-x
chardet
965
B
-rwxr-xr-x
chardetect
965
B
-rwxr-xr-x
chattr
14.31
KB
-rwxr-xr-x
chcon
58.51
KB
-rwxr-xr-x
chfn
71.01
KB
-rwsr-xr-x
chgrp
54.51
KB
-rwxr-xr-x
chmod
54.51
KB
-rwxr-xr-x
choom
22.38
KB
-rwxr-xr-x
chown
58.51
KB
-rwxr-xr-x
chrt
26.38
KB
-rwxr-xr-x
chsh
43.76
KB
-rwsr-xr-x
cksum
34.41
KB
-rwxr-xr-x
clear
14.31
KB
-rwxr-xr-x
clear_console
14.23
KB
-rwxr-xr-x
cloud-id
972
B
-rwxr-xr-x
cloud-init
976
B
-rwxr-xr-x
cloud-init-per
2.06
KB
-rwxr-xr-x
cmp
42.39
KB
-rwxr-xr-x
comm
34.52
KB
-rwxr-xr-x
console-conf
982
B
-rwxr-xr-x
core-sshd-host-keygen
1.49
KB
-rwxr-xr-x
cp
138.51
KB
-rwxr-xr-x
csplit
106.51
KB
-rwxr-xr-x
ctstat
22.66
KB
-rwxr-xr-x
cut
38.51
KB
-rwxr-xr-x
cvtsudoers
296.4
KB
-rwxr-xr-x
dash
122.74
KB
-rwxr-xr-x
date
102.51
KB
-rwxr-xr-x
dbus-cleanup-sockets
14.29
KB
-rwxr-xr-x
dbus-daemon
227.32
KB
-rwxr-xr-x
dbus-monitor
26.29
KB
-rwxr-xr-x
dbus-run-session
14.29
KB
-rwxr-xr-x
dbus-send
26.29
KB
-rwxr-xr-x
dbus-update-activation-environ...
14.29
KB
-rwxr-xr-x
dbus-uuidgen
14.29
KB
-rwxr-xr-x
dd
66.52
KB
-rwxr-xr-x
delpart
14.38
KB
-rwxr-xr-x
df
83.08
KB
-rwxr-xr-x
dh_bash-completion
4.31
KB
-rwxr-xr-x
diff
130.55
KB
-rwxr-xr-x
diff3
54.52
KB
-rwxr-xr-x
dir
134.98
KB
-rwxr-xr-x
dircolors
38.52
KB
-rwxr-xr-x
dirname
30.38
KB
-rwxr-xr-x
dmesg
70.61
KB
-rwxr-xr-x
dnsdomainname
22.23
KB
-rwxr-xr-x
domainname
22.23
KB
-rwxr-xr-x
dpkg-deb
134.49
KB
-rwxr-xr-x
dpkg-realpath
4.09
KB
-rwxr-xr-x
du
146.51
KB
-rwxr-xr-x
ec2metadata
8.38
KB
-rwxr-xr-x
echo
34.3
KB
-rwxr-xr-x
editor
1.45
MB
-rwxr-xr-x
egrep
28
B
-rwxr-xr-x
env
42.95
KB
-rwxr-xr-x
ex
1.45
MB
-rwxr-xr-x
expand
34.53
KB
-rwxr-xr-x
expiry
22.59
KB
-rwxr-sr-x
expr
102.41
KB
-rwxr-xr-x
factor
70.51
KB
-rwxr-xr-x
faillog
22.59
KB
-rwxr-xr-x
fallocate
22.38
KB
-rwxr-xr-x
false
26.3
KB
-rwxr-xr-x
fgrep
28
B
-rwxr-xr-x
finalrd
2.06
KB
-rwxr-xr-x
fincore
22.42
KB
-rwxr-xr-x
find
275.48
KB
-rwxr-xr-x
findmnt
63.61
KB
-rwxr-xr-x
flock
22.48
KB
-rwxr-xr-x
fmt
38.51
KB
-rwxr-xr-x
fold
34.51
KB
-rwxr-xr-x
free
26.23
KB
-rwxr-xr-x
gdbserver
564.73
KB
-rwxr-xr-x
getconf
34.29
KB
-rwxr-xr-x
getent
38.65
KB
-rwxr-xr-x
getopt
22.38
KB
-rwxr-xr-x
gpasswd
70.38
KB
-rwsr-xr-x
gpgv
271.04
KB
-rwxr-xr-x
grep
178.45
KB
-rwxr-xr-x
groups
34.51
KB
-rwxr-xr-x
growpart
26.22
KB
-rwxr-xr-x
gunzip
2.29
KB
-rwxr-xr-x
gzexe
6.3
KB
-rwxr-xr-x
gzip
91.23
KB
-rwxr-xr-x
hardlink
34.43
KB
-rwxr-xr-x
head
42.51
KB
-rwxr-xr-x
helpztags
2.46
KB
-rwxr-xr-x
hostid
30.51
KB
-rwxr-xr-x
hostname
22.23
KB
-rwxr-xr-x
hostnamectl
30.38
KB
-rwxr-xr-x
i386
26.65
KB
-rwxr-xr-x
iconv
66.41
KB
-rwxr-xr-x
id
38.51
KB
-rwxr-xr-x
infocmp
62.38
KB
-rwxr-xr-x
infotocap
86.41
KB
-rwxr-xr-x
install
142.52
KB
-rwxr-xr-x
ionice
18.38
KB
-rwxr-xr-x
ip
702.05
KB
-rwxr-xr-x
ipcmk
22.45
KB
-rwxr-xr-x
ipcrm
18.38
KB
-rwxr-xr-x
ipcs
38.38
KB
-rwxr-xr-x
iptables-xml
96.95
KB
-rwxr-xr-x
ischroot
14.2
KB
-rwxr-xr-x
join
46.55
KB
-rwxr-xr-x
journalctl
78.39
KB
-rwxr-xr-x
json-patch-jsondiff
1004
B
-rwxr-xr-x
jsondiff
1004
B
-rwxr-xr-x
jsonpatch
3.77
KB
-rwxr-xr-x
jsonpointer
1.79
KB
-rwxr-xr-x
jsonschema
397
B
-rwxr-xr-x
kernel-install
4.79
KB
-rwxr-xr-x
kill
30.23
KB
-rwxr-xr-x
kmod
166.36
KB
-rwxr-xr-x
kmodsign
18.45
KB
-rwxr-xr-x
last
34.38
KB
-rwxr-xr-x
lastb
34.38
KB
-rwxr-xr-x
lastlog
27.63
KB
-rwxr-xr-x
lcf
7.6
KB
-rwxr-xr-x
ldd
5.32
KB
-rwxr-xr-x
less
194.38
KB
-rwxr-xr-x
lessecho
14.31
KB
-rwxr-xr-x
lessfile
8.83
KB
-rwxr-xr-x
lesskey
23.7
KB
-rwxr-xr-x
lesspipe
8.83
KB
-rwxr-xr-x
link
30.51
KB
-rwxr-xr-x
linux32
26.65
KB
-rwxr-xr-x
linux64
26.65
KB
-rwxr-xr-x
ln
58.51
KB
-rwxr-xr-x
lnstat
22.66
KB
-rwxr-xr-x
locale
57.56
KB
-rwxr-xr-x
locale-check
14.15
KB
-rwxr-xr-x
localectl
26.37
KB
-rwxr-xr-x
localedef
326.96
KB
-rwxr-xr-x
logger
34.97
KB
-rwxr-xr-x
login
51.73
KB
-rwxr-xr-x
loginctl
58.48
KB
-rwxr-xr-x
logname
30.51
KB
-rwxr-xr-x
ls
134.98
KB
-rwxr-xr-x
lsattr
14.31
KB
-rwxr-xr-x
lsblk
122.38
KB
-rwxr-xr-x
lscpu
98.38
KB
-rwxr-xr-x
lsipc
50.38
KB
-rwxr-xr-x
lslocks
30.7
KB
-rwxr-xr-x
lslogins
50.38
KB
-rwxr-xr-x
lsmem
34.38
KB
-rwxr-xr-x
lsmod
166.36
KB
-rwxr-xr-x
lsns
38.38
KB
-rwxr-xr-x
man
128
B
-rwxr-xr-x
mawk
154.79
KB
-rwxr-xr-x
mcookie
26.45
KB
-rwxr-xr-x
md5sum
42.41
KB
-rwxr-xr-x
md5sum.textutils
42.41
KB
-rwxr-xr-x
mesg
14.38
KB
-rwxr-xr-x
mkdir
66.51
KB
-rwxr-xr-x
mkfifo
38.51
KB
-rwxr-xr-x
mknod
42.51
KB
-rwxr-xr-x
mksquashfs
254.68
KB
-rwxr-xr-x
mkswapfile
865
B
-rwxr-xr-x
mktemp
38.51
KB
-rwxr-xr-x
more
42.38
KB
-rwxr-xr-x
mount
46.38
KB
-rwsr-xr-x
mountpoint
18.38
KB
-rwxr-xr-x
mv
134.52
KB
-rwxr-xr-x
namei
22.38
KB
-rwxr-xr-x
nawk
154.79
KB
-rwxr-xr-x
nc
38.63
KB
-rwxr-xr-x
nc.openbsd
38.63
KB
-rwxr-xr-x
netcat
38.63
KB
-rwxr-xr-x
networkctl
102.38
KB
-rwxr-xr-x
newgrp
39.55
KB
-rwsr-xr-x
nice
34.51
KB
-rwxr-xr-x
nisdomainname
22.23
KB
-rwxr-xr-x
nl
98.57
KB
-rwxr-xr-x
nohup
34.41
KB
-rwxr-xr-x
nproc
34.51
KB
-rwxr-xr-x
nsenter
26.6
KB
-rwxr-xr-x
nstat
30.38
KB
-rwxr-xr-x
numfmt
54.54
KB
-rwxr-xr-x
od
66.51
KB
-rwxr-xr-x
openssl
977.8
KB
-rwxr-xr-x
p11-kit
30.38
KB
-rwxr-xr-x
p11tool
218.38
KB
-rwxr-xr-x
pager
194.38
KB
-rwxr-xr-x
partx
58.38
KB
-rwxr-xr-x
passwd
58.57
KB
-rwsr-xr-x
paste
34.41
KB
-rwxr-xr-x
pathchk
34.51
KB
-rwxr-xr-x
pdb3
61.74
KB
-rwxr-xr-x
pdb3.10
61.74
KB
-rwxr-xr-x
perl
3.63
MB
-rwxr-xr-x
perl5.34.0
3.63
MB
-rwxr-xr-x
pgrep
30.24
KB
-rwxr-xr-x
pidof
22.08
KB
-rwxr-xr-x
pidwait
30.24
KB
-rwxr-xr-x
ping
74.88
KB
-rwxr-xr-x
ping4
74.88
KB
-rwxr-xr-x
ping6
74.88
KB
-rwxr-xr-x
pinky
34.41
KB
-rwxr-xr-x
pkaction
18.3
KB
-rwxr-xr-x
pkcheck
22.3
KB
-rwxr-xr-x
pkcs11-tool
157.02
KB
-rwxr-xr-x
pkill
30.24
KB
-rwxr-xr-x
pkttyagent
18.3
KB
-rwxr-xr-x
pldd
22.37
KB
-rwxr-xr-x
plymouth
46.3
KB
-rwxr-xr-x
pmap
34.24
KB
-rwxr-xr-x
pr
66.58
KB
-rwxr-xr-x
printenv
30.38
KB
-rwxr-xr-x
printf
50.44
KB
-rwxr-xr-x
prlimit
26.89
KB
-rwxr-xr-x
ps
138.45
KB
-rwxr-xr-x
ptx
126.55
KB
-rwxr-xr-x
pwd
34.51
KB
-rwxr-xr-x
pwdx
14.23
KB
-rwxr-xr-x
py3clean
7.63
KB
-rwxr-xr-x
py3compile
12.88
KB
-rwxr-xr-x
py3versions
11.63
KB
-rwxr-xr-x
pybabel
953
B
-rwxr-xr-x
pybabel-python3
953
B
-rwxr-xr-x
pydoc3
79
B
-rwxr-xr-x
pydoc3.10
79
B
-rwxr-xr-x
pygettext3
23.67
KB
-rwxr-xr-x
pygettext3.10
23.67
KB
-rwxr-xr-x
pyserial-miniterm
975
B
-rwxr-xr-x
pyserial-ports
969
B
-rwxr-xr-x
python3
5.64
MB
-rwxr-xr-x
python3.10
5.64
MB
-rwxr-xr-x
rbash
1.33
MB
-rwxr-xr-x
rcp
130.59
KB
-rwxr-xr-x
rdma
98.52
KB
-rwxr-xr-x
readlink
38.41
KB
-rwxr-xr-x
realpath
38.41
KB
-rwxr-xr-x
renice
14.38
KB
-rwxr-xr-x
reset
26.31
KB
-rwxr-xr-x
resizepart
22.38
KB
-rwxr-xr-x
resolvectl
130.52
KB
-rwxr-xr-x
rev
14.38
KB
-rwxr-xr-x
rgrep
30
B
-rwxr-xr-x
rlogin
827.04
KB
-rwxr-xr-x
rm
58.51
KB
-rwxr-xr-x
rmdir
42.41
KB
-rwxr-xr-x
routef
208
B
-rwxr-xr-x
routel
1.62
KB
-rwxr-xr-x
rsh
827.04
KB
-rwxr-xr-x
rtstat
22.66
KB
-rwxr-xr-x
run-parts
26.54
KB
-rwxr-xr-x
runcon
34.51
KB
-rwxr-xr-x
rview
1.45
MB
-rwxr-xr-x
savelog
10.24
KB
-rwxr-xr-x
sbattach
26.54
KB
-rwxr-xr-x
sbkeysync
34.74
KB
-rwxr-xr-x
sbsiglist
14.6
KB
-rwxr-xr-x
sbsign
34.7
KB
-rwxr-xr-x
sbvarsign
22.73
KB
-rwxr-xr-x
sbverify
34.61
KB
-rwxr-xr-x
scp
130.59
KB
-rwxr-xr-x
script
50.38
KB
-rwxr-xr-x
scriptlive
42.38
KB
-rwxr-xr-x
scriptreplay
34.38
KB
-rwxr-xr-x
sdiff
46.39
KB
-rwxr-xr-x
sed
110.57
KB
-rwxr-xr-x
select-editor
2.39
KB
-rwxr-xr-x
sensible-browser
1.26
KB
-rwxr-xr-x
sensible-editor
1.24
KB
-rwxr-xr-x
sensible-pager
565
B
-rwxr-xr-x
seq
46.51
KB
-rwxr-xr-x
setarch
26.65
KB
-rwxr-xr-x
setpriv
38.38
KB
-rwxr-xr-x
setsid
14.38
KB
-rwxr-xr-x
setterm
34.38
KB
-rwxr-xr-x
sftp
142.66
KB
-rwxr-xr-x
sg
39.55
KB
-rwsr-xr-x
sh
122.74
KB
-rwxr-xr-x
sha1sum
42.41
KB
-rwxr-xr-x
sha224sum
50.41
KB
-rwxr-xr-x
sha256sum
50.41
KB
-rwxr-xr-x
sha384sum
58.41
KB
-rwxr-xr-x
sha512sum
58.41
KB
-rwxr-xr-x
shred
50.51
KB
-rwxr-xr-x
shuf
46.51
KB
-rwxr-xr-x
skill
30.23
KB
-rwxr-xr-x
slabtop
22.23
KB
-rwxr-xr-x
sleep
34.51
KB
-rwxr-xr-x
slogin
827.04
KB
-rwxr-xr-x
snice
30.23
KB
-rwxr-xr-x
sort
98.8
KB
-rwxr-xr-x
splash-client
404
B
-rwxr-xr-x
split
50.97
KB
-rwxr-xr-x
sqfscat
131.9
KB
-rwxr-xr-x
sqfstar
254.68
KB
-rwxr-xr-x
ss
125.07
KB
-rwxr-xr-x
ssh
827.04
KB
-rwxr-xr-x
ssh-add
166.42
KB
-rwxr-xr-x
ssh-agent
286.43
KB
-rwxr-sr-x
ssh-argv0
1.42
KB
-rwxr-xr-x
ssh-copy-id
12.38
KB
-rwxr-xr-x
ssh-keygen
446.44
KB
-rwxr-xr-x
ssh-keyscan
190.44
KB
-rwxr-xr-x
stat
78.52
KB
-rwxr-xr-x
stdbuf
42.51
KB
-rwxr-xr-x
stty
74.51
KB
-rwxr-xr-x
su
54.38
KB
-rwsr-xr-x
sudo
226.97
KB
-rwsr-xr-x
sudoedit
226.97
KB
-rwsr-xr-x
sudoreplay
87.64
KB
-rwxr-xr-x
sum
34.41
KB
-rwxr-xr-x
sync
34.41
KB
-rwxr-xr-x
systemctl
1.06
MB
-rwxr-xr-x
systemd
1.54
MB
-rwxr-xr-x
systemd-analyze
1.73
MB
-rwxr-xr-x
systemd-ask-password
18.48
KB
-rwxr-xr-x
systemd-cat
18.38
KB
-rwxr-xr-x
systemd-cgls
22.48
KB
-rwxr-xr-x
systemd-cgtop
38.39
KB
-rwxr-xr-x
systemd-cryptenroll
50.53
KB
-rwxr-xr-x
systemd-delta
26.37
KB
-rwxr-xr-x
systemd-detect-virt
18.37
KB
-rwxr-xr-x
systemd-escape
22.37
KB
-rwxr-xr-x
systemd-hwdb
118.66
KB
-rwxr-xr-x
systemd-id128
26.37
KB
-rwxr-xr-x
systemd-inhibit
22.39
KB
-rwxr-xr-x
systemd-machine-id-setup
18.48
KB
-rwxr-xr-x
systemd-mount
50.59
KB
-rwxr-xr-x
systemd-notify
22.38
KB
-rwxr-xr-x
systemd-path
18.37
KB
-rwxr-xr-x
systemd-run
62.57
KB
-rwxr-xr-x
systemd-socket-activate
26.37
KB
-rwxr-xr-x
systemd-stdio-bridge
22.38
KB
-rwxr-xr-x
systemd-sysext
46.49
KB
-rwxr-xr-x
systemd-sysusers
62.68
KB
-rwxr-xr-x
systemd-tmpfiles
98.57
KB
-rwxr-xr-x
systemd-tty-ask-password-agent
34.37
KB
-rwxr-xr-x
systemd-umount
50.59
KB
-rwxr-xr-x
tabs
18.3
KB
-rwxr-xr-x
tac
98.41
KB
-rwxr-xr-x
tail
66.52
KB
-rwxr-xr-x
tar
505.81
KB
-rwxr-xr-x
taskset
22.38
KB
-rwxr-xr-x
tee
34.51
KB
-rwxr-xr-x
tempfile
14.02
KB
-rwxr-xr-x
test
42.44
KB
-rwxr-xr-x
tic
86.41
KB
-rwxr-xr-x
timedatectl
815
B
-rwxr-xr-x
timedatectl.real
46.37
KB
-rwxr-xr-x
timeout
38.95
KB
-rwxr-xr-x
tload
18.24
KB
-rwxr-xr-x
toe
22.3
KB
-rwxr-xr-x
top
130.06
KB
-rwxr-xr-x
touch
90.51
KB
-rwxr-xr-x
tput
26.34
KB
-rwxr-xr-x
tr
46.51
KB
-rwxr-xr-x
true
26.3
KB
-rwxr-xr-x
truncate
34.51
KB
-rwxr-xr-x
tset
26.31
KB
-rwxr-xr-x
tsort
46.51
KB
-rwxr-xr-x
tty
30.51
KB
-rwxr-xr-x
tzselect
15.02
KB
-rwxr-xr-x
ucf
40.9
KB
-rwxr-xr-x
ucfq
18.91
KB
-rwxr-xr-x
ucfr
10.47
KB
-rwxr-xr-x
uclampset
26.38
KB
-rwxr-xr-x
udevadm
1.08
MB
-rwxr-xr-x
umount
34.38
KB
-rwsr-xr-x
uname
34.51
KB
-rwxr-xr-x
uncompress
2.29
KB
-rwxr-xr-x
unexpand
34.53
KB
-rwxr-xr-x
uniq
42.51
KB
-rwxr-xr-x
unlink
30.51
KB
-rwxr-xr-x
unshare
30.6
KB
-rwxr-xr-x
unsquashfs
131.9
KB
-rwxr-xr-x
update-alternatives
58.24
KB
-rwxr-xr-x
uptime
14.23
KB
-rwxr-xr-x
users
34.51
KB
-rwxr-xr-x
utmpdump
22.38
KB
-rwxr-xr-x
vcs-run
6.75
KB
-rwxr-xr-x
vdir
134.98
KB
-rwxr-xr-x
vi
1.45
MB
-rwxr-xr-x
view
1.45
MB
-rwxr-xr-x
vim.tiny
1.45
MB
-rwxr-xr-x
vmstat
38.24
KB
-rwxr-xr-x
w
22.23
KB
-rwxr-xr-x
wall
22.38
KB
-rwxr-xr-x
watch
26.6
KB
-rwxr-xr-x
wc
42.42
KB
-rwxr-xr-x
wdctl
30.4
KB
-rwxr-xr-x
whereis
30.84
KB
-rwxr-xr-x
which
946
B
-rwxr-xr-x
which.debianutils
946
B
-rwxr-xr-x
who
50.52
KB
-rwxr-xr-x
whoami
30.51
KB
-rwxr-xr-x
wpa_passphrase
14.31
KB
-rwxr-xr-x
x86_64
26.65
KB
-rwxr-xr-x
xargs
62.41
KB
-rwxr-xr-x
xdg-open
38
B
-rwxr-xr-x
xdg-settings
1.68
KB
-rwxr-xr-x
xxd
18.28
KB
-rwxr-xr-x
yes
30.38
KB
-rwxr-xr-x
ypdomainname
22.23
KB
-rwxr-xr-x
zcat
1.94
KB
-rwxr-xr-x
zcmp
1.64
KB
-rwxr-xr-x
zdiff
5.76
KB
-rwxr-xr-x
zdump
26.21
KB
-rwxr-xr-x
zegrep
29
B
-rwxr-xr-x
zfgrep
29
B
-rwxr-xr-x
zforce
2.03
KB
-rwxr-xr-x
zgrep
7.91
KB
-rwxr-xr-x
zless
2.15
KB
-rwxr-xr-x
zmore
1.8
KB
-rwxr-xr-x
znew
4.47
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : c_rehash
#!/usr/bin/perl # WARNING: do not edit! # Generated by Makefile from ../tools/c_rehash.in # Copyright 1999-2021 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the Apache License 2.0 (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy # in the file LICENSE in the source distribution or at # https://www.openssl.org/source/license.html # Perl c_rehash script, scan all files in a directory # and add symbolic links to their hash values. my $dir = "/usr/lib/ssl"; my $prefix = "/usr"; my $errorcount = 0; my $openssl = $ENV{OPENSSL} || "openssl"; my $pwd; my $verbose = 0; my $symlink_exists=eval {symlink("",""); 1}; my $removelinks = 1; ## Parse flags. while ( $ARGV[0] =~ /^-/ ) { my $flag = shift @ARGV; last if ( $flag eq '--'); if ( $flag eq '-h' || $flag eq '-help' ) { help(); } elsif ( $flag eq '-n' ) { $removelinks = 0; } elsif ( $flag eq '-v' ) { $verbose++; } else { print STDERR "Usage error; try -h.\n"; exit 1; } } sub help { print "Usage: c_rehash [-old] [-h] [-help] [-v] [dirs...]\n"; print " -old use old-style digest\n"; print " -h or -help print this help text\n"; print " -v print files removed and linked\n"; exit 0; } eval "require Cwd"; if (defined(&Cwd::getcwd)) { $pwd=Cwd::getcwd(); } else { $pwd=`pwd`; chomp($pwd); } # DOS/Win32 or Unix delimiter? Prefix our installdir, then search. my $path_delim = ($pwd =~ /^[a-z]\:/i) ? ';' : ':'; $ENV{PATH} = "$prefix/bin" . ($ENV{PATH} ? $path_delim . $ENV{PATH} : ""); if (! -x $openssl) { my $found = 0; foreach (split /$path_delim/, $ENV{PATH}) { if (-x "$_/$openssl") { $found = 1; $openssl = "$_/$openssl"; last; } } if ($found == 0) { print STDERR "c_rehash: rehashing skipped ('openssl' program not available)\n"; exit 0; } } if (@ARGV) { @dirlist = @ARGV; } elsif ($ENV{SSL_CERT_DIR}) { @dirlist = split /$path_delim/, $ENV{SSL_CERT_DIR}; } else { $dirlist[0] = "$dir/certs"; } if (-d $dirlist[0]) { chdir $dirlist[0]; $openssl="$pwd/$openssl" if (!-x $openssl); chdir $pwd; } foreach (@dirlist) { if (-d $_ ) { if ( -w $_) { hash_dir($_); } else { print "Skipping $_, can't write\n"; $errorcount++; } } } exit($errorcount); sub copy_file { my ($src_fname, $dst_fname) = @_; if (open(my $in, "<", $src_fname)) { if (open(my $out, ">", $dst_fname)) { print $out $_ while (<$in>); close $out; } else { warn "Cannot open $dst_fname for write, $!"; } close $in; } else { warn "Cannot open $src_fname for read, $!"; } } sub hash_dir { my $dir = shift; my %hashlist; print "Doing $dir\n"; if (!chdir $dir) { print STDERR "WARNING: Cannot chdir to '$dir', $!\n"; return; } opendir(DIR, ".") || print STDERR "WARNING: Cannot opendir '.', $!\n"; my @flist = sort readdir(DIR); closedir DIR; if ( $removelinks ) { # Delete any existing symbolic links foreach (grep {/^[\da-f]+\.r{0,1}\d+$/} @flist) { if (-l $_) { print "unlink $_\n" if $verbose; unlink $_ || warn "Can't unlink $_, $!\n"; } } } FILE: foreach $fname (grep {/\.(pem)|(crt)|(cer)|(crl)$/} @flist) { # Check to see if certificates and/or CRLs present. my ($cert, $crl) = check_file($fname); if (!$cert && !$crl) { print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n"; next; } link_hash_cert($fname) if ($cert); link_hash_cert_old($fname) if ($cert); link_hash_crl($fname) if ($crl); link_hash_crl_old($fname) if ($crl); } chdir $pwd; } sub check_file { my ($is_cert, $is_crl) = (0,0); my $fname = $_[0]; open(my $in, "<", $fname); while(<$in>) { if (/^-----BEGIN (.*)-----/) { my $hdr = $1; if ($hdr =~ /^(X509 |TRUSTED |)CERTIFICATE$/) { $is_cert = 1; last if ($is_crl); } elsif ($hdr eq "X509 CRL") { $is_crl = 1; last if ($is_cert); } } } close $in; return ($is_cert, $is_crl); } sub compute_hash { my $fh; if ( $^O eq "VMS" ) { # VMS uses the open through shell # The file names are safe there and list form is unsupported if (!open($fh, "-|", join(' ', @_))) { print STDERR "Cannot compute hash on '$fname'\n"; return; } } else { if (!open($fh, "-|", @_)) { print STDERR "Cannot compute hash on '$fname'\n"; return; } } return (<$fh>, <$fh>); } # Link a certificate to its subject name hash value, each hash is of # the form <hash>.<n> where n is an integer. If the hash value already exists # then we need to up the value of n, unless its a duplicate in which # case we skip the link. We check for duplicates by comparing the # certificate fingerprints sub link_hash_cert { link_hash($_[0], 'cert', '-subject_hash'); } # Same as above except for a CRL. CRL links are of the form <hash>.r<n> sub link_hash_crl { link_hash($_[0], 'crl', '-hash'); } sub link_hash_cert_old { link_hash($_[0], 'cert', '-subject_hash_old'); } sub link_hash_crl_old { link_hash($_[0], 'crl', '-hash_old'); } sub link_hash { my ($fname, $type, $hash_cmd) = @_; my $is_cert = $type eq 'cert'; my ($hash, $fprint) = compute_hash($openssl, $is_cert ? "x509" : "crl", $hash_cmd, "-fingerprint", "-noout", "-in", $fname); chomp $hash; $hash =~ s/^.*=// if !$is_cert; chomp $fprint; return if !$hash; $fprint =~ s/^.*=//; $fprint =~ tr/://d; my $suffix = 0; # Search for an unused hash filename my $crlmark = $is_cert ? "" : "r"; while(exists $hashlist{"$hash.$crlmark$suffix"}) { # Hash matches: if fingerprint matches its a duplicate cert if ($hashlist{"$hash.$crlmark$suffix"} eq $fprint) { my $what = $is_cert ? 'certificate' : 'CRL'; print STDERR "WARNING: Skipping duplicate $what $fname\n"; return; } $suffix++; } $hash .= ".$crlmark$suffix"; if ($symlink_exists) { print "link $fname -> $hash\n" if $verbose; symlink $fname, $hash || warn "Can't symlink, $!"; } else { print "copy $fname -> $hash\n" if $verbose; copy_file($fname, $hash); } $hashlist{$hash} = $fprint; }
Close