XYZ File Manager
Current Path:
/usr/sbin
usr
/
sbin
/
📁
..
📄
a2disconf
(15.86 KB)
📄
a2dismod
(15.86 KB)
📄
a2dissite
(15.86 KB)
📄
a2enconf
(15.86 KB)
📄
a2enmod
(15.86 KB)
📄
a2ensite
(15.86 KB)
📄
a2query
(9.6 KB)
📄
add-shell
(1.03 KB)
📄
addgroup
(47.25 KB)
📄
adduser
(47.25 KB)
📄
agetty
(67.49 KB)
📄
apache2
(712.5 KB)
📄
apache2ctl
(7.19 KB)
📄
apachectl
(7.19 KB)
📄
arp
(66.13 KB)
📄
arpd
(104.48 KB)
📄
badblocks
(34.25 KB)
📄
blkdeactivate
(15.96 KB)
📄
blkdiscard
(34.31 KB)
📄
blkid
(122.34 KB)
📄
blkzone
(78.31 KB)
📄
blockdev
(78.31 KB)
📄
bridge
(152.54 KB)
📄
capsh
(53.29 KB)
📄
chcpu
(46.3 KB)
📄
check_forensic
(952 B)
📄
chgpasswd
(66.29 KB)
📄
chmem
(66.31 KB)
📄
chpasswd
(62.36 KB)
📄
chroot
(46.98 KB)
📄
cpgr
(60.43 KB)
📄
cppw
(60.43 KB)
📄
ctrlaltdel
(38.3 KB)
📄
dcb
(144.6 KB)
📄
debugfs
(233.83 KB)
📄
delgroup
(16.33 KB)
📄
deluser
(16.33 KB)
📄
devlink
(220.98 KB)
📄
dhclient
(2.63 MB)
📄
dhclient-script
(14.21 KB)
📄
dmsetup
(166.98 KB)
📄
dmstats
(166.98 KB)
📄
dpkg-fsys-usrunmess
(16.99 KB)
📄
dpkg-preconfigure
(3.83 KB)
📄
dpkg-reconfigure
(4.38 KB)
📄
dumpe2fs
(30.31 KB)
📄
e2freefrag
(14.3 KB)
📄
e2fsck
(348.27 KB)
📄
e2image
(54.45 KB)
📄
e2label
(114.52 KB)
📄
e2mmpstatus
(30.31 KB)
📄
e2scrub
(7.12 KB)
📄
e2scrub_all
(5.27 KB)
📄
e2undo
(22.3 KB)
📄
e4crypt
(26.3 KB)
📄
e4defrag
(30.23 KB)
📄
faillock
(14.24 KB)
📄
filefrag
(18.26 KB)
📄
findfs
(14.3 KB)
📄
fsck
(54.36 KB)
📄
fsck.cramfs
(42.37 KB)
📄
fsck.ext2
(348.27 KB)
📄
fsck.ext3
(348.27 KB)
📄
fsck.ext4
(348.27 KB)
📄
fsck.minix
(122.34 KB)
📄
fsfreeze
(14.3 KB)
📄
fstab-decode
(14.23 KB)
📄
fstrim
(74.31 KB)
📄
genl
(116.51 KB)
📄
getcap
(14.23 KB)
📄
getpcaps
(14.23 KB)
📄
getty
(67.49 KB)
📄
groupadd
(99.04 KB)
📄
groupdel
(90.85 KB)
📄
groupmems
(66.33 KB)
📄
groupmod
(99.01 KB)
📄
grpck
(66.3 KB)
📄
grpconv
(58.14 KB)
📄
grpunconv
(58.14 KB)
📄
halt
(1.29 MB)
📄
httxt2dbm
(14.23 KB)
📄
hwclock
(86.44 KB)
📄
iconvconfig
(30.84 KB)
📄
ifconfig
(82.01 KB)
📄
ifdown
(86.16 KB)
📄
ifquery
(86.16 KB)
📄
ifup
(86.16 KB)
📄
init
(90.38 KB)
📄
installkernel
(2.6 KB)
📄
invoke-rc.d
(16.13 KB)
📄
ip
(674.82 KB)
📄
ipmaddr
(18.56 KB)
📄
iptunnel
(26.55 KB)
📄
isosize
(30.31 KB)
📄
killall5
(26.31 KB)
📄
ldattach
(34.31 KB)
📄
ldconfig
(959.84 KB)
📄
locale-gen
(1.38 KB)
📄
logsave
(14.09 KB)
📄
losetup
(114.42 KB)
📄
make-ssl-cert
(6.65 KB)
📄
mii-tool
(27.08 KB)
📄
mke2fs
(138.58 KB)
📄
mkfs
(14.3 KB)
📄
mkfs.bfs
(34.31 KB)
📄
mkfs.cramfs
(42.24 KB)
📄
mkfs.ext2
(138.58 KB)
📄
mkfs.ext3
(138.58 KB)
📄
mkfs.ext4
(138.58 KB)
📄
mkfs.minix
(110.32 KB)
📄
mkhomedir_helper
(22.27 KB)
📄
mklost+found
(14.23 KB)
📄
mkswap
(114.31 KB)
📄
nameif
(14.65 KB)
📄
newusers
(102.92 KB)
📄
nologin
(14.23 KB)
📄
pam-auth-update
(20.79 KB)
📄
pam_getenv
(2.82 KB)
📄
pam_namespace_helper
(467 B)
📄
pam_timestamp_check
(14.24 KB)
📄
paperconfig
(4.07 KB)
📄
phpdismod
(7.11 KB)
📄
phpenmod
(7.11 KB)
📄
phpquery
(6.24 KB)
📄
pivot_root
(14.3 KB)
📄
plipconfig
(14.48 KB)
📄
poweroff
(1.29 MB)
📄
pwck
(58.26 KB)
📄
pwconv
(54.13 KB)
📄
pwhistory_helper
(18.24 KB)
📄
pwunconv
(54.17 KB)
📄
rarp
(37.13 KB)
📄
readprofile
(34.34 KB)
📄
reboot
(1.29 MB)
📄
remove-shell
(1.08 KB)
📄
resize2fs
(62.3 KB)
📄
rmt
(59.02 KB)
📄
rmt-tar
(59.02 KB)
📄
route
(69.17 KB)
📄
rtacct
(44.37 KB)
📄
rtcwake
(46.31 KB)
📄
rtmon
(112.45 KB)
📄
runlevel
(1.29 MB)
📄
runuser
(70.31 KB)
📄
service
(8.89 KB)
📄
setcap
(14.23 KB)
📄
shadowconfig
(2.22 KB)
📄
shutdown
(1.29 MB)
📄
slattach
(41.2 KB)
📄
split-logfile
(2.36 KB)
📄
sshd
(1.21 MB)
📄
start-stop-daemon
(43.42 KB)
📄
sulogin
(54.31 KB)
📄
swaplabel
(18.3 KB)
📄
swapoff
(22.3 KB)
📄
swapon
(50.3 KB)
📄
switch_root
(18.3 KB)
📄
sysctl
(30.31 KB)
📄
tarcat
(936 B)
📄
tc
(574 KB)
📄
telinit
(1.29 MB)
📄
tipc
(152.6 KB)
📄
tune2fs
(114.52 KB)
📄
unix_chkpwd
(38.24 KB)
📄
unix_update
(38.24 KB)
📄
update-ca-certificates
(5.29 KB)
📄
update-fonts-alias
(5.71 KB)
📄
update-fonts-dir
(3.98 KB)
📄
update-fonts-scale
(6.1 KB)
📄
update-gsfontmap
(470 B)
📄
update-locale
(2.99 KB)
📄
update-passwd
(38.49 KB)
📄
update-rc.d
(17.33 KB)
📄
update-shells
(3.89 KB)
📄
useradd
(155.8 KB)
📄
userdel
(110.95 KB)
📄
usermod
(143.61 KB)
📄
validlocale
(1.73 KB)
📄
vdpa
(116.66 KB)
📄
vigr
(72.64 KB)
📄
vipw
(72.64 KB)
📄
wipefs
(46.31 KB)
📄
zic
(58.73 KB)
📄
zramctl
(114.42 KB)
Editing: make-ssl-cert
#!/bin/bash -e # This is a mockup of a script to produce a snakeoil cert # The aim is to have a debconfisable ssl-certificate script # shellcheck source=/dev/null disable=SC1091 . /usr/share/debconf/confmodule db_version 2.0 db_capb backup progname=$(basename "${0}") usage() { cat <<EOF Usage: ${progname} [options] <template> <output> ${progname} [options] generate-default-snakeoil Options: -h,--help This usage text -f,--force-overwrite Overwrite existing .pem and .key files -n,--no-overwrite Never overwrite existing snakeoil .pem and .key files, even if algorithms are out of date -x,--expiration-days <N> Override default expiration time EOF exit "${1}"; } ask_via_debconf() { RET="" if db_settitle make-ssl-cert/title ; then : # OK else echo "Debconf failed with error code $? $RET" >&2 echo "Maybe your debconf database is corrupt." >&2 echo "Try re-installing ssl-cert." >&2 fi RET="" while [ "x$RET" = "x" ]; do db_fset make-ssl-cert/hostname seen false db_input high make-ssl-cert/hostname || true db_go db_get make-ssl-cert/hostname done db_get make-ssl-cert/hostname HostName="$RET" db_fset make-ssl-cert/hostname seen false db_fset make-ssl-cert/altname seen false db_input high make-ssl-cert/altname || true db_go db_get make-ssl-cert/altname AddAltName="$RET" db_fset make-ssl-cert/altname seen false SubjectAltName="DNS:$HostName" [ -z "$AddAltName" ] || SubjectAltName="$SubjectAltName,$AddAltName" } make_snakeoil() { if ! HostName="$(hostname -f)" ; then HostName="$(hostname)" echo "make-ssl-cert: Could not get FQDN, using '$HostName'". echo "make-ssl-cert: You may want to fix your /etc/hosts and/or DNS setup and run" echo "make-ssl-cert: 'make-ssl-cert generate-default-snakeoil --force-overwrite'" echo "make-ssl-cert: again." fi SubjectAltName="DNS:$HostName" if [ ${#HostName} -gt 64 ] ; then # The certificate's common name cannot be longer than 64 chars. # Use the short name instead. HostName="$(hostname)" fi } create_temporary_cnf() { sed -e s#@HostName@#"$HostName"# -e s#@SubjectAltName@#"$SubjectAltName"# "${template}" > "${TMPFILE}" } create_hash_link() { local file="$1" local cryptfile filename i filename=$(basename "$file") cryptfile=$(dirname "$file")/$(openssl x509 -hash -noout -in "$file") i=0 while [ -L "${cryptfile}.$i" ] ; do if [ "$(readlink "${cryptfile}.$i")" = "$filename" ] ; then return 0 fi i=$(( i + 1 )) done ln -sf "$filename" "${cryptfile}.$i" } check_min_algo() { local file="$1" local bits if ! openssl x509 -text -in "$file" | grep -q 'Signature Algorithm:.*sha256' ; then echo "Signature algorithm of $file is not sha256. Recreating." >&2 return 1 fi bits=$(openssl x509 -text -in "$file" |grep -o "Public-Key: \\(.*\\)") # value: "Public-Key: (2048 bit)" bits="${bits##*\(}" bits="${bits% bit\)}" case "$bits" in [0-9][0-9][0-9][0-9]) ;; *) echo "WARNING: Cannot determine RSA key length" >&2 return 0 ;; esac if [ "$bits" -lt 2048 ] ; then echo "RSA key length of $file is $bits. Recreating with 2048 bits" >&2 return 1 fi return 0 } # Process arguments subcommand= template= opt_force_overwrite="false" opt_no_overwrite="false" opt_expiration_days="3650" # Transform long options to short ones newargs=() for arg in "${@}"; do case "${arg}" in --help) newargs+=(-h) ;; --force-overwrite) # Move to front so that we accept --force-overwrite at the end, for # compatibility with 1.0.x. newargs=("-f" "${newargs[@]}") ;; --no-overwrite) newargs+=(-n) ;; --expiration-days) newargs+=(-x) ;; --*) printf "Unrecognized option %s\n\n" "${arg}" usage 1 ;; *) newargs+=("$arg") ;; esac done set -- "${newargs[@]}" # Parse short options while getopts "hfnx:" opt "${@}"; do case "${opt}" in h) usage 0 ;; f) opt_force_overwrite="true" ;; n) opt_no_overwrite="true" ;; x) opt_expiration_days="${OPTIND}" ;; *) printf "Unrecognized option %s\n\n" "-${opt}" usage 1 ;; esac done shift "$((OPTIND - 1))" if $opt_force_overwrite && $opt_no_overwrite ; then usage 1 fi # Parse subcommand if [ "${1}" = "generate-default-snakeoil" ]; then subcommand="${1}" else subcommand="manual" template="${1}" fi # Takes two arguments, the base layout and the output cert. if [ "${subcommand}" = "manual" ]; then output="${2}" [ -n "${template}" ] || usage 1 [ -n "${output}" ] || usage 1 # be anal in manual mode. if [ ! -f "${template}" ]; then printf "Could not open template file: %s!\n" "${template}"; exit 1; fi if [ -f "${output}" ] && [ "${opt_force_overwrite}" != "true" ]; then printf "%s file already exists!\n" "${output}"; exit 1; fi ask_via_debconf elif [ "${subcommand}" = "generate-default-snakeoil" ]; then template="/usr/share/ssl-cert/ssleay.cnf" if [ -f "/etc/ssl/certs/ssl-cert-snakeoil.pem" ] && [ -f "/etc/ssl/private/ssl-cert-snakeoil.key" ]; then if "${opt_no_overwrite}" ; then exit 0 fi if ! "${opt_force_overwrite}" ; then if check_min_algo "/etc/ssl/certs/ssl-cert-snakeoil.pem" ; then exit 0 fi fi fi make_snakeoil else usage 1 fi # # should be a less common char # problem is that openssl virtually accepts everything and we need to # sacrifice one char. TMPFILE="$(mktemp)" || exit 1 TMPOUT="$(mktemp)" || exit 1 trap 'rm -f ${TMPFILE} ${TMPOUT}' EXIT create_temporary_cnf # create the certificate. umask 077 if [ "${subcommand}" = "manual" ]; then if ! openssl req -config "${TMPFILE}" -new -x509 -days "${opt_expiration_days}" -nodes -sha256 \ -out "${output}" -keyout "${output}" > "${TMPOUT}" 2>&1 then echo "Could not create certificate. Openssl output was:" >&2 cat "${TMPOUT}" >&2 exit 1 fi chmod 600 "${output}" create_hash_link "${output}" elif [ "${subcommand}" = "generate-default-snakeoil" ]; then if ! openssl req -config "${TMPFILE}" -new -x509 -days "${opt_expiration_days}" -nodes -sha256 \ -out /etc/ssl/certs/ssl-cert-snakeoil.pem \ -keyout /etc/ssl/private/ssl-cert-snakeoil.key > "${TMPOUT}" 2>&1 then echo "Could not create certificate. Openssl output was:" >&2 cat "${TMPOUT}" >&2 exit 1 fi chmod 644 /etc/ssl/certs/ssl-cert-snakeoil.pem chmod 640 /etc/ssl/private/ssl-cert-snakeoil.key chown root:ssl-cert /etc/ssl/private/ssl-cert-snakeoil.key create_hash_link /etc/ssl/certs/ssl-cert-snakeoil.pem else usage 1 fi
Upload File
Create Folder