§
ž} gy
ã óœ — d Z ddlZddlmZ ddlmZ ddlmZ ddlm Z ddl
mZ ddlm
Z
dd lmZ G d
„ de
¦ « Z G d„ d
¦ « ZdS )u
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License,
or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.Â
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Copyright © 2019 Cloud Linux Software Inc.
This software is also available under ImunifyAV commercial license,
see
é N)ÚCancelledError)Úsuppress)ÚIterator)ÚFileBasedResourceLimits)Ú"APP_VERSION_DETECTOR_INTENSITY_KEY)ÚScanFailedError)Úresource_limitsc ó — e Zd ZdS )ÚAVDExecutionErrorN)Ú__name__Ú
__module__Ú__qualname__© ó ú^/opt/imunify360/venv/lib/python3.11/site-packages/imav/malwarelib/scan/app_version_detector.pyr r ! s € € € € € Ø€Dr r c ó8 — e Zd Zg d¢Zd„ Zdee ddfd„ZdS )ÚAppVersionDetector)z9/opt/app-version-detector/app-version-detector-wrapper.shzW--sqlite-db-report=/var/lib/cloudlinux-app-version-detector/components_versions.sqlite3z--stdin-dirsz--paths-in-base64z--scan-depth=3c ó — d | _ d S )N)Ú_proc)Úselfs r Ú__init__zAppVersionDetector.__init__2 s
€ ؈Œ
ˆ
ˆ
r ÚpathsÚreturnNc ƒ óž K — d |¦ « }t j | j t j t j t j t j t j t ¬¦ « ƒ d {V —†| _
d x}} | j
|¬¦ « ƒ d {V —†\ }}nt# t $ rg t t ¦ « 5 | j
¦ « | j
¦ « ƒ d {V —† d d d ¦ « n# 1 swxY w Y Y nw xY w| j
j dk r%t% d| j | j
j ||d d ¬¦ « ‚d S )Nó
)Ú
intensity_cpuÚintensity_ioÚstdoutÚstderrÚstdinÚkey)Úinputr z$AVD exited with non-zero return code)ÚmessageÚcommandÚreturn_codeÚoutÚerrÚpathÚscan_id)Újoinr Úcreate_subprocessÚ_cmdr ÚCPUÚIOÚ
subprocessÚPIPEr r Úcommunicater r ÚProcessLookupErrorÚkillÚwaitÚ
returncoder )r r r r&