/opt/dedrads/__pycache__
NameSizeModeActions
alp.cpython-313.pyc188170644editdlrm
check_prov.cpython-313.pyc63940644editdlrm
clean_exim.cpython-313.pyc89020644editdlrm
cmspass.cpython-313.pyc63780644editdlrm
cms_check.cpython-313.pyc140790644editdlrm
cms_counter.cpython-313.pyc329480644editdlrm
cpanel_postgres_manager.cpython-313.pyc407620644editdlrm
docroot.cpython-313.pyc54920644editdlrm
envinfo.cpython-313.pyc81840644editdlrm
exclude_rbl.cpython-313.pyc66820644editdlrm
first_setup.cpython-313.pyc204930644editdlrm
fixwpcron.cpython-313.pyc72230644editdlrm
innodb_converter.cpython-313.pyc143470644editdlrm
mail_sources.cpython-313.pyc99690644editdlrm
modsec_disable.cpython-313.pyc158380644editdlrm
mysql_selector.cpython-313.pyc867480644editdlrm
show-conns-adv.cpython-313.pyc684140644editdlrm
sparta.cpython-313.pyc4909030644editdlrm
vhost_data.cpython-313.pyc69830644editdlrm
Edit: /opt/dedrads/__pycache__/cms_counter.cpython-313.pyc (32948B)
}j~SrSSKrSSKrSSKrSSKJr SSKrSSKrSSKrSSK r SSK r SSjr Sr SSjr SrSrSS jrSS jrSS jrSS jrSS jrSSjrSr\S:Xa\"5 gg)a CMS Counter 2.5 07/24/2026 Corey S ------- All Server Version - Should be acceptable for any server environment - Server Type determined by Fabric wrapper ckx.run_cms_counter() and passed to script via '-s' - 3rd Party/Additional Panels added to determine_panel_type() - Refactored NodeJS detection split into its own module - '--new' switch added to only check newly provisioned accounts - Overall code refactored to be more efficient - Determine and print version of certain CMS N)Pathc:SnU(ad[U5(aTUSLaO[R"USU[RS9RR S5R 5nU$U(as[U5(acUSLa^[R"USU[R[RS9RR S5R 5nU$U$![an[U5 SnAU$SnAff=f![a gf=f)z~ check_flag ignores if the command exits w/ anything other than 0 if True error_flag sends errors to /dev/null if set to True NT)shellcheckstdoututf-8F)rrrstderr) str subprocessrunPIPErdecodestrip ExceptionprintDEVNULL)command check_flag error_flagoutputes /opt/dedrads/cms_counter.pyr r s F3w<>wi'?B C C5gY>Y\`BBK  77>>wi'IL M M>wi|6 7 77wi:YY]IIK +&G N N  G Ns $ C55C<cX[RRS5(ag[RRS5(ag[RRS5(ag[RRS5(ag[R"S5 g)zFunction to determine Apache config file to use to check domains as different installs/versions can store the config in different files, starting w/config for 2.2 and checking different 2.4 config locations to endz!/usr/local/apache/conf/httpd.confz/etc/httpd/conf/httpd.confz/etc/apache2/httpd.confz/etc/apache2/conf/httpd.confz.Unable to determine Apache config! Quitting...Nr#r$r%sysexitr&r'ridentify_apache_configr6sm  ww~~9::2 ww~~233+ ww~~/00( ww~~455-HH >?r'c[RRS5(ag[RRS5(ag[RRS5(ag[R"S5 g)z$ Function to find NGINX config file z/etc/nginx/vhostsz/etc/nginx/conf.d/vhostsz/etc/nginx/nginx.confz/Unable to locate NGINX config file! Quitting...Nr3r&r'ridentify_nginx_configr8sV ww~~)**" ww~~011) ww~~-..&HH >?r'c,/nU(GaS[U5;GaURS5Sn[RR US35(a[ US3SS9nUR 5H^nSU;dM UR5SR5RS 5nUS U3U;dMHURUS U35 M` S S S 5 [U5S :Xa[S U3SSS9nU(aUR5(a[SUS3SSS9RS5n[U5S :aUS S:waUHn [SU S3SSS9n [SU S3S-SSS9RS5Sn X-nU(dMD[RR U5(dMjUS U3U;dMwURUS U35 M U$!,(df  GN=f![a g f=f![a  g f=f)z- Find possible Node.JS installs per doc root  /z /.htaccessrencodingPassengerAppRoot":Nrzid -u Frrz pgrep -U z nodezpwdx z | cut -d ':' -f 2zps --no-headers -o command  | zawk '{print $2}'.) r splitr#r$r%open readlinesrappendrlenr isdigit) r-domain install_listuserhtaccessline install_diruser_id node_procspidcwdrs r find_nodejsrWsFL4s7|+}}S!!$ 77>>wiz4 5 5  . ( 2 2 4-5*.**,q/*?*?*A*G*G*LK%+HAk] ='3!4 !- 3 3)/+$A!"!5$   "4&#%G7??,,!!'%2$$%+  z?Q&:a=B+>)("%$)#.@ C+0+0#C '*$?uC J"8!9+0+0 ' $eCj ',G +.-K(K "{ ; ;%+HAk] =#/!0)//VHAk]0MN- *. o  > )(#'(sN G5$G#9G#=G#G57H# G2-G52G55 HH HHc[U5nUS3SUS3SUS3SUS3SUS 3S US 3S US 3SUS3SUS3SUS3SUS3SUS3SUS3SUS3SUS3S0nUR5H-up#[RR U5(dM+Us $ [RR US35(ac[ US3SS9nUR 5H8n[R"SU[R5(dM0 S S S 5 g S S S 5 [RR US!35(ag"[RR US#35(a[RR US35(ad[ US3SS9nUR 5H8n[R"S$U[R5(dM0 S S S 5 g% S S S 5 g&g&[RR US'35(a[RR US(35(ag)[ US'3SS9nUR 5HnS*U;dM S S S 5 g* [RR US+35(aE[ US+3SS9nUR 5HnS,U;dM S S S 5 S S S 5 g, S S S 5 S S S 5 g-[RR US.35(ag/g !,(df  GN=f![an[U5 S nAGN,S nAff=f!,(df  g&=f![an[U5 S nAGNS nAff=f!,(df  N=f!,(df  N=f![an[U5 S nANS nAff=f)0zbDetermine CMS manually with provided document root by matching expected config files for known CMSz /concrete.phpConcretez /Mage.phpMagentoz/clientarea.phpWHMCSz/configuration.phpr+z/ut.phpPHPListz/passenger_wsgi.pyDjango)/wp-content/plugins/boldgrid-inspirationsBoldgridz/wp-config.phpr*z/sites/default/settings.phpDrupalz/includes/configure.phpZenCartz/config/config.inc.php Prestashopz/config/settings.inc.phpz/app/etc/env.phpz/app/etc/local.xmlz/vendor/laravelLaravelz /index.phprr= CodeIgniterNz/main.tsAngularz/main.js bootstrap Bootstrap Javascriptz /config.phpz/admin/config.phpOpenCartr,z /cron.phpphpBB Undeterminedz /index.htmlHTML) r itemsr#r$r%rHrIresearch IGNORECASErr) r-cms_dictionary config_filecontentindexrQrconfigcrons r determine_cmsrws'lG I]%z IY!9 I_' I'*H IW I'*H I>A: I^& I03X I,/ I+. I-0, I%() I'*I I_'N"!/ 4 4 6 77>>+ & &N!7 ww~~7):011 7):07Cu!OO-DyybmmDD,DC-D  ww~~7)8.// ww~~7)8.// 77>>wiz4 5 5  . % 199[$ FF#. !2 $  ww~~7);122 77>>wi'8; < < 7);1GD",,.D4''ED.77>>wiy";<<$IY1G$(NN$4D&$'.  ED%5 &ED ww~~7);122 YDC  !HH  $ a  ED  !HH s L5=L#L#L5L#L5 M)(=M)M*M)3M5M) N.N8N9N.6N8N N NN.&N ( N1N.# L2-L52L55 M? MM M&"M)&M)) N 3 NN  N N N+'N.+N.. O 8 OO cU(aL[RRU5(a([RRUS35(agg)Nr^r_r*r" directorys rdouble_check_wordpressr{9s?RWW^^I.. 77>> D G   r'crSnUS:XaSUSUS3S-nUnOUS:XaURS5nSU;agURS 5S :aS nURS 5S S :XaFURS 5n[U5S - nS nXv::aXTU- nXv:waUS- nUS - nXv::aMUnO4[U5S - nS nXv::aXTU- nXv:waUS- nUS - nXv::aMUnUSU3n[R R U5(a SUS3S-nOSnU(a [U5n U $[SW35 g)Napachezgrep 'ServerName z' z -A3 | grep DocumentRoot | zawk '{print $2}' | uniqnginxz.conf*_rrDr@r<rFr;z grep root rEz#awk '{print $2}' | uniq | tr -d ';'zCannot determine docroot for: ) removesuffixcountrGrKr#r$r%r r) rMweb_server_config web_server docroot_cmd domain_name new_domainlimitstart nginx_configr-s rmanual_find_docrootrBsKXxr*;)<=# #%C D  w ))'2 ;    S !A %J  %a(B.)//4 K(1,ne"44J~"c) QJE n ) K(1,ne"44J~"c) QJE n ) ,,AfX6 77>>, ' '|nC2<=  Kk" N 0 @Ar'c Uc/nUc/nUc/nSnSnSn0n/n /n /SQn [S5n [S5n Sn[U 5S:XaSn[5nU(a SUS3S -nO([U 5S:XaS n[5nU(aS US 3nU(a [U5nU(GaSUR 5GH>n[ UUUS 9nU(dM[ RRU5(dM>/nU RU5 URUU05 U[UUS9- n/US3PUS3PUS3PUS3PUS3PUS3PUS3PUS3PUS3PUS3PUS3PUS3PUS3PUS3PUS3PUS3PUS3PUS 3PUS!3PUS"3PUS#3PUS$3PUS%3PUS&3PUS'3PUS(3PUS)3PUS*3PUS+3PUS,3PUS-3PUS.3PUS/3PUS03PUS13PUS23PUS33PUS43PUS53PUS63PUS73PUS83Pn[U5nUR5Hn[ RRU5(dM)UR5(dM@[U5U;dMQU[[U5US9- n[[ RR!U55n[U5nU RU5 URUUS9U305 URU5 M GMA ['U5S::aUn [ RRS;5(a['U5S<:Xa[S;5n[)S=S>S?9nUR+5nSSS5 UR5HnUR5(dM['UR05S:- nWH]nUR0UUR SA5S<:XdM*UR0UU ;dM?U RUR0U5 M_ M ['U 5S::Ga['U 5S::GaU GHnSnSnU H$nUU ;aM UUR S95;dM"Un O [3USB9n[U5R55SC:XaU(aUU;aURU5 O;[U5R55SD:XaU(aUU;aURU5 U(a[75n [9UUSE9n!U(aU(aUU ;aUR;US5n"[<R>"5R SF5S<n#[ RRSGU35(a![SHU35R SI5S:n$OSJn$U(a#[%U#SKUSKW SKUSKU$SKU"SKUSKW!35 O[%USKU"SKU35 WH:n%U(a[%W#SKUSKW SKUSKW$SKU%SL3 5 M)[%USKU%SL35 M< GM [%SM['U535 [%SN['U535 g![a GN0f=f![a GNf=f!["a GM[an[%U5 SnAGMSnAff=f!,(df  GNC=f![a [,R."S@5 GNif=f)Oz? Function to get counts of CMS from all servers without cPanel N<rootbindaemonadmsyncshutdownhaltmailgamesftpnobodyzsystemd-networkdbuspolkitdrpctssntpsshdchronynscdnamedmailmancpanelcpanelcabcache cpanellogincpaneleximfiltercpaneleximscannercpanelroundcubecpanelconnecttrackcpanelanalyticscpsesmysqldovecotdovenullmailnullcpanelphppgadmincpanelphpmyadminrpcuser nfsnobody_imunifyz wp-toolkitredisr~telegrafsssdscopsclamavtier1advinmotionhubhosttier2slldpdpatchmanmoveuserpostgres cpanelsolrsaslauthnagioswazuhzsystemd-bus-proxyz6systemctl status nginx 1>/dev/null 2>/dev/null;echo $?z6systemctl status httpd 1>/dev/null 2>/dev/null;echo $?0r}zgrep ServerName rEz!awk '{print $2}' | sort -g | uniqr~zfind zR -type f -name '*.conf' -print | grep -Ev '\.ssl\.conf' | xargs -d ' ' -l basenamerMrrr-rMz /wp-adminz /wp-includesz /wp-contentz/wp-jsonz/adminz/cachez/tempz/tmpz /__wildcard__z/cgi-binz /.well-knownz/configz /languagez/pluginsz/mediaz /librariesz/imagesz /includesz/includez/modulesz /componentsz /templatesz/cliz/layoutsz/storagez/logsz/binz/uploadsz/docsz/stylez/filesz/soundsz/cartz/shopz/assetsz/systemz/documentationz /applicationz/scriptz/scriptsz/backupsz/backupr;r@z/homerz /etc/passwdrr=z&Unable to read /etc/passwd! Exiting...rB)r- wordpressboldgrid)r-r.rFz/var/cpanel/users/grep PLAN /var/cpanel/users/=zN/A z NodeJSUnique Wordpress Users: Unique Boldgrid Users: ) r r r6r8rGrr#r$r%rJupdaterWrriterdiris_dirbasenameNotADirectoryErrorrrKrHrIr4r5partsrwlowerr(r1getsocket gethostname)&verboseserver user_listunique_wordpress_usersunique_boldgrid_usersr domains_cmd domains_listdomains docroot_listusers sys_users nginx_status apache_statusrrr- node_installsbad_dirs docroot_dirddirnamer users_dirpasswd passwd_fileurrQget_cms docroot_userrOptr0rMhostname plan_typeinstalls& rcms_counter_no_cpanelrvs %!#$ "KLGL E=I|DLDM J =S  24 $%6$7s=:;  \ c ! 13 )*+GG ;' '--/K)""3%G w277>>'22 " ##G,WI{mGH"[ ' &M + -+ 0+! /+! , + ! * + ! * +! )+! (+! 1+! ,+! 0+! ++! -+! ,+! *+ ! .!+"! +#+$! -%+&! ,'+(! ,)+*! /++,! .-+.! (/+0! ,1+2! ,3+4! )5+6! (7+8! ,9+:! );+<! *=+>! *?+@! +A+B! )C+D! )E+F! +G+H! +I+J! 2K+L! 0M+N! +O+P! ,Q+R! ,S+T! +U+X#7m (002GGNN1-- ! #Ah 6% -,/F;2"!" '*"''*:*:1*=&>G #AA(//2#NN&'S+ay-K L%OOA.%3C0v 9~ ww~~g3y>Q#6M  @mg6&$..0 7""$AxxzzAGG q('D$**S/!*<<GGEN); QWWU^4 (% 5zQ3|,1#GGL9$7==--#'L  $G4GG ""$ 3  (>>&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+:a[CU UUUUSU9 g4['SV[U535 ['SW[U535 g4!["a S4nGNAf=fs snf!["a ['US>35 GMf=f!["an['U5 S4nAGM4S4nAff=f!["a GMf=f!["an['U5 S4nANS4nAff=f)Xa Function to determine CMS counter on servers with cPanel Attempting to use Softaculous first Checking manually if that returns no results Including users list as passed variable so we can run against specific users only as well, future-proofing/anticipating possible request r503z Moodle 3.5542r,98z Moodle 2.6343z Moodle 2.0517z Moodle 3.7485z Moodle 3.6670z Moodle 3.9668z Moodle 3.8699z Moodle 3.11681z Moodle 3.10706z Moodle 4.0713z Moodle 4.167z Magento 1.9545z Magento 2.3465z Magento 1.7486z Magento 2.2665rZz Magento 2.4.2z Magnto 2.4.1)688709r/var/cpanel/usersz(tail -250 /etc/passwd | cut -d ':' -f 1r:r@systemz.bakz-Unable To Determine cPanel Users! Quitting...zNo Users Detected. Quitting...z cPanel not detected. Quitting...z/var/softaculousrrNzp/usr/local/cpanel/3rdparty/bin/php /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/cli.php --list_ins --user=z --resp=jsonFrCerror script_namesofturlversidz: Error determining CMS WordPresssoftpathryrrrz*systemctl status httpd &>/dev/null;echo $?)rz*systemctl status nginx &>/dev/null;echo $?z grep -E 'z$' /etc/userdomainsrBrr}r~z$Unable to identify web server configrrNodeJSrFz cPanel )rrrr)rrrrrrr)"rads SECURE_USERrJr#r$r%r rGrrrKrrr4r5jsonloadsrkeysrr{r rrrr6r8rrWrrrmrr)*rnewr softaculousrrsoftaculous_idscms_info site_ownersrno_install_usersr secure_user user_list_cmdrrrrOr user_installsuser_installs_jsonrcmdrrNuser_cmsurlr0rr-rrrget_domains_cmd domain_list domain_stringrMrrrr. site_owners* rcms_counter_cpanelr+sK  | x l |  |  |  | | } } | | m } } }!" y#$'O*HKI=I|&&&{&% ww~~)** JMM*006I01I&&(AGG q( (2aggen4$$QWWU^4) AB 9~ 12 77>>- . . 34 77>>, - -KaDy  ""g1C1H1H1J&J ''-!$6 #5')#5  ,G,!#5g#>}#M09)D"4W"=e"D ( )&8&A$)'",;$'," $ (;6*>@4y()+005a8F=)S0,B,D)%- \*c1,A,C)%, DE1%*;#-G )(WW!)[(/'4':':3'?'B'H'H'J.M/"-:=!A%,GOOW]]3%7%:H$EF&& c(:1(=t'DE -w@ ))+11#6q9H$NN,S(__S$7 j&*Q k3%q/-%NN,S(__S$7 :,auAcU56-   !'=&;   "&#9"7    *3/E+F*GJK )#.C*D)EHI k *%)" *  ($-) %4&0G&J K ()8%!a !b )! !:  !HH sZ ZZ-[ Z C [-[$0 [6 ZZ Z=8[<Z==[ [! [[!$ [32[36 \ \\c [R"SS9nURSSSSSSS S 9 URS S S SSSS S 9 URSSSSSS9 [UR 55n/SQnSnUH>nUSUR 5:Xd"USU:XdUSUR 5:XdM<Un O U(d[R"S5 USn[RRS5(a [XSS9 g[XSS9 g)z{Main function, initializes global variables as globals, gets hostname and call relevant checks after determining enviromentzCMS Counter 2.1) descriptionz-vz --verboserz,Include Panel Type and Server Type in output store_constTF)desthelpactionconstdefaultz-nz--newrz2Check the 250 most recently provisioned users onlyz-sz --server-typerz(Server Type - passed by Fabric generallystore)r/r0r1)SharedResellerHubVPS DedicatedNz"Server Type not given! Quitting...r )rr)argparseArgumentParser add_argumentvars parse_argsrupperr4r5r#r$r%r+r)parserargs server_types server_typestverbs rmainrFs+ $ $1B CF    ;    A    7  !!# $DDLK Nbhhj (H~#H~+K   67  ?D ww~~)**4<d?r'__main__)NTT)NN)N)NNN)FNNNN)FFN)__doc__r#r r4pathlibrr:rrnrrr r(r1r6r8rWrwr{rrr+rF__name__r&r'rrKs   #L)VD @ @@FFR1j   ZFzj Z /@d zFr'