/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_check.cpython-313.pyc (14079B)
}ja&SSKJr SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSK J r J r J r J r Jr "SS5r"SS5r"SS 5rS rS r\S :Xa\"5 gg) )PathN)greenyellowboldblueredc*\rSrSrSrSrSrSrSrg) Fingerprint z'Fingerprint to find a CMS installation.cXlX lURS5UlURS5UlS/S/S.Ul/Ulg)Nfile signature softaculous quarantine))cmsfp_datagetfilenamerexcludes paths_found)selfrrs /opt/dedrads/cms_check.py__init__Fingerprint.__init__sD  F+  [1*O? c HSSSUR/n[R"U[R[RSS9nUR GH!nUR 5n[RRU5(aURU5(aMPUR(a[USS9n[R"URUR55nU(aUR R#U5 O=UR$R&R)[+URSU355 SSS5 GMUR R#U5 GM$ SSS5 g!,(df  GM?=f!,(df  g=f) z.Uses mlocate to search for the file signature.z /bin/locatez-d/var/lib/mlocate/mlocate.dbutf-8)stdoutstderrencodingr#z not found within N)r subprocessPopenPIPEDEVNULLr!stripospathexistsshould_excluderopenresearchreadrappendrmain print_debugr)rcmdprocout_linelinestreammatchs rr0Fingerprint.searchs5   ) MM      ??%%   KK~~'ww~~d++t/B/B4/H/H>>dW5 " $..&++- H  ,,33D9 HHMM55 #t~~&66H$O P 65$$++D1(   65  s&A8FURRRSU35 [U5nSUR;a[URU;aJURRR[ SUR SURS355 gOdUR UR:waJURRR[ SUR SURS355 g[UR5Hhup4X0R;dMX@RU;dM*URRR[ SUSUR355 g URRRR(d9URRRHnXRR;dM g Og URRR[ S U355 g) zDetermines whether or not the path should be excluded. Args: path (str): found path Returns: bool: True if should be excluded, else False zChecking excludes on /z excluded: z does not match .Tzexcluded: excluded part, z in Fz4excluded: didn't determine if we shouldn't exclude: )rr3r4rrrname enumeratepartsrargs include_alldocument_rootsparents)rr+pos_pathindexpart docroot_paths rr-Fingerprint.should_exclude6s  !!$9$"@A: $-- }}D( ))$X]]O3C==/, )}} - ))$X]]O4!!%q2 $X^^4KE %==//HHMM--7v>""*..!13  5xx}}!!-- $ < < #3#33 !=  !! FtfM N r)rrrrrrN) __name__ __module__ __qualname____firstlineno____doc__rr0r-__static_attributes__rrr r s12<4rr c*\rSrSrSSjrSrSrSrg)CMSmcPXlX lX0lX l/Ul/UlgN)r3r?data actual_name fingerprintsversions)r cms_searchr?rWs rr CMS.__init__ns&    rcURRS5UlURRS/5H9n[X5nUR 5 UR R U5 M; g)zHLoads the actual name and the fingerprints from the CMS Signature data. r?rYN)rWrrXr r0rYr2)r fingerprintfps rloadCMS.loadvsY 99==099==>"Q&NND&*ii&C&CD&IIO+  $ r)rXrWrYr3r?rZN)r[ CMSSearch)rKrLrMrNrr`rfrPrQrrrSrSms) rrScJ\rSrSrSrSrSrSrSrSr Sr S r S r S r g ) rhc,0UlXl0UlgrV)rDrBinstalls)rrBs rrCMSSearch.__init__s   rcdUR5 UR5 UR5 g)z&Primary run entry to begin CMS search.N)collect_docroots load_cms_datadisplay_results)rs rrun CMSSearch.runs&   rcdURR(a[[U55 gg)z]Prints a debug message if verbose is enabled. Args: message (str): the message to print N)rBverboseprintr)rmessages rr4CMSSearch.print_debugs" 99   $w-  rcS00nURR5GH,up#UR5nURn[ U5S:dM3UR R S:Xa [X$5 MZUR R S:XaO[[[U555 UH n[XF5n[USU35 M" [5 MUR R S:XdMUHGnXFnXQS;a0USU'XqSU;a /USUU'USUURU5 MI GM/ UR R S:Xa [[R"U55 gg)zILists all found installations in a specific format based on given flags. rrsimplenormalz: jsonN)rlitemsrfrXrcrBoutputrvrrrr2r|dumps)rout_jsoncms_namecms_objrlrXinstalldomains rrqCMSSearch.display_resultss_2;!%!4!4!6 H224H!--K8}q 99##x/(-YY%%1$vk234#+!&x'8!97)45$,GYY%%/#+!)!2&uo=;=HUOK8!%)EECEHUOK8@  4V<CCFK $,"7* 99  v % $**X& ' &rcV[SSS9n[R"U[RS9nUH/n[ XX#5nUR5 X@R U'M1 SSS5 g![R an[U5 SnAN-SnAff=f!,(df  g=f)z1Safely loads the CMS signatures from a yaml file.z'/opt/dedrads/extras/cms_signatures.yamlr r$)LoaderN)r.yamlr` SafeLoaderrSrl YAMLErrorrv)rinfilecms_yamlrrerrs rrpCMSSearch.load_cms_datas  5  99VDOOD (Hdh.@ACHHJ.1MM(+ !)   >> c    s/BAA..B B BBB B(cURR5H"up#U[U5R;dM Us $ g)zReturns a domain for the document root that the provided path belongs to. Args: path (str): path of the installation Returns: str: domain of the document root z no-domain)rDr}rrE)rr+rIrs rrdCMSSearch.find_docroot_domains=%)$7$7$=$=$? LtDz111 %@rc2[S5RS5Hn[U5RS5Hn[USS9nSnSnUR5H|nUR S5(a*[UR 5SR 55nUR S5(dM[UR 5SR 5nM~ U(aU(aXPRU'S S S 5 M M g !,(df  M=f) z(Collects all document roots from cPanel.z/var/cpanel/userdata/*r r$z documentroot:z servername:N)rglobr. readlines startswithsplitr)rD)r user_folder user_itemr9docroot servernamer8s rroCMSSearch.collect_docrootss 78==cBK!+.33C8 )g6& G!#J & 0 0 2???;;&*4::<?+@+@+B&CG??=99)-a)>)>)@J !3 :7A++G4769C66sA,D5AD D c[RRS5n[R"5U- nUS:a?URR S:wa[ [S55 UR5 gg)zV Checks the mlocate database modification age and runs update if older than 24 hours. riQr|z%Locate DB is too old, running update.N) r*r+getmtimetimerBr~rvr update_db)rmtimediffs r check_db_ageCMSSearch.check_db_ages_   !>?yy{U" %<yy6)fDEF NN  rc[R"S/5nURRS:XagU(a[ [ S55 g[ [ S55 g)zUpdates the mlocate database.z /bin/updatedbr|Nz"Failed to update mlocate database.zUpdated mlocate database.)r%callrBr~rvrr)rret_codes rrCMSSearch.update_dbsG??O#45 99  v %   #:; < %34 5r)rBrDrlN)rKrLrMrNrrrr4rqrprdrorrrPrQrrrhrhs0  !(:  B  6rrhc[R"SS9n/SQnURSSSUSS9 URS S S S 9 URS S SS 9 UR5$)NzPUses signatures to determine what CMS installations are installed on the server.) description)r|rzr{z--output?ztype of outputr{)nargshelpchoicesdefaultz --include-all store_truezCIncludes all installations, including those not in a document root.)actionrz --verbosezVerbose output.)argparseArgumentParser add_argument parse_args)rBoutput_choicess rrrs  " " ' D 2N      k,=NO ?? rcn[5n[U5nUR5 UR5 grV)rrhrrr)rB cms_searchers rr3r3$s* rsf  55]]@  Fu6u6p8 zFr