GuardianUnivalle-Benito-Yucra 0.1.33__py3-none-any.whl → 0.1.34__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of GuardianUnivalle-Benito-Yucra might be problematic. Click here for more details.

@@ -106,18 +106,35 @@ def detectar_archivos_sospechosos() -> List[str]:
106
106
  return hallazgos
107
107
 
108
108
 
109
- def detectar_programas_instalados() -> List[str]:
109
+ def detectar_programas_instalados() -> list[str]:
110
110
  """
111
- Analiza programas instalados en el sistema (solo Windows)
112
- para encontrar software potencialmente malicioso.
111
+ Analiza programas instalados en Windows para detectar software potencialmente malicioso.
112
+ Funciona incluso si WMIC está en otra ruta o no está disponible.
113
113
  """
114
114
  hallazgos = []
115
115
  if platform.system() != "Windows":
116
116
  return hallazgos
117
117
 
118
+ # Rutas posibles de WMIC
119
+ posibles_rutas = [
120
+ "C:\\Windows\\System32\\wbem\\WMIC.exe",
121
+ "C:\\Windows\\SysWOW64\\wbem\\WMIC.exe",
122
+ "C:\\Windows\\System32\\WMIC.exe",
123
+ ]
124
+
125
+ wmic_path = None
126
+ for ruta in posibles_rutas:
127
+ if os.path.exists(ruta):
128
+ wmic_path = ruta
129
+ break
130
+
131
+ # Si no se encontró ruta, intenta usarlo directamente (PATH)
132
+ if wmic_path is None:
133
+ wmic_path = "wmic"
134
+
118
135
  try:
119
136
  salida = subprocess.check_output(
120
- ["wmic", "product", "get", "name"], stderr=subprocess.DEVNULL
137
+ [wmic_path, "product", "get", "name"], stderr=subprocess.DEVNULL, shell=True
121
138
  ).decode("utf-8", errors="ignore")
122
139
 
123
140
  for linea in salida.splitlines():
@@ -125,6 +142,9 @@ def detectar_programas_instalados() -> List[str]:
125
142
  if any(pat in nombre for pat in PATRONES_NOMBRES):
126
143
  hallazgos.append(nombre)
127
144
  registrar_evento("Keylogger", f"Software sospechoso: {nombre}")
145
+
146
+ except FileNotFoundError:
147
+ logger.warning("WMIC no encontrado. No se puede listar programas instalados.")
128
148
  except Exception as e:
129
149
  logger.error("Error al listar programas instalados: %s", e)
130
150
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: GuardianUnivalle-Benito-Yucra
3
- Version: 0.1.33
3
+ Version: 0.1.34
4
4
  Summary: Middleware y detectores de seguridad (SQLi, XSS, CSRF, DoS, Keylogger) para Django/Flask
5
5
  Author-email: Andres Benito Calle Yucra <benitoandrescalle035@gmail.com>
6
6
  License: MIT
@@ -6,15 +6,15 @@ GuardianUnivalle_Benito_Yucra/criptografia/intercambio_claves.py,sha256=9djnlzb0
6
6
  GuardianUnivalle_Benito_Yucra/criptografia/kdf.py,sha256=_sbepEY1qHEKga0ExrX2WRg1HeCPY5MC5CfXZWYyl-A,709
7
7
  GuardianUnivalle_Benito_Yucra/detectores/detector_csrf.py,sha256=wt9LRMG9XK4eSSmW91tlGmsJWfyk445b8-n2oxlXlwo,7893
8
8
  GuardianUnivalle_Benito_Yucra/detectores/detector_dos.py,sha256=KpsFnZvPmtKVgxR2Em_gIQvoho3sGOE_qQSWOEhts48,6163
9
- GuardianUnivalle_Benito_Yucra/detectores/detector_keylogger.py,sha256=6SQX9vZ6znv_2e-O-7N8fHMN5PatU0o_MMTnE9Nt_UA,7817
9
+ GuardianUnivalle_Benito_Yucra/detectores/detector_keylogger.py,sha256=Cb-XqpILzzcj8qu0zoG1KekyFF6zmsjHYDJs4eXEjfs,8472
10
10
  GuardianUnivalle_Benito_Yucra/detectores/detector_sql.py,sha256=o2IXqF3Nbsh5roPihyLal42iCzgxfyX3D6Ef-cxOpVo,6644
11
11
  GuardianUnivalle_Benito_Yucra/detectores/detector_xss.py,sha256=Ipw1XXBd1-SsOOhhl9joQGduTq0GhSa61TRTyASF3XE,6795
12
12
  GuardianUnivalle_Benito_Yucra/middleware_web/middleware_web.py,sha256=23pLLYqliUoMrIC6ZEwz3hKXeDjWfHSm9vYPWGmDDik,495
13
13
  GuardianUnivalle_Benito_Yucra/mitigacion/limitador_peticion.py,sha256=ipMOebYhql-6mSyHs0ddYXOcXq9w8P_IXLlpiIqGncw,246
14
14
  GuardianUnivalle_Benito_Yucra/mitigacion/lista_bloqueo.py,sha256=6AYWII4mrmwCLHCvGTyoBxR4Oasr4raSHpFbVjqn7d8,193
15
15
  GuardianUnivalle_Benito_Yucra/puntuacion/puntuacion_amenaza.py,sha256=Wx5XfcII4oweLvZsTBEJ7kUc9pMpP5-36RfI5C5KJXo,561
16
- guardianunivalle_benito_yucra-0.1.33.dist-info/licenses/LICENSE,sha256=5e4IdL542v1E8Ft0A24GZjrxZeTsVK7XrS3mZEUhPtM,37
17
- guardianunivalle_benito_yucra-0.1.33.dist-info/METADATA,sha256=_SC_fYJgSJQA84iallrASVDvpHuvzCqFZYWc4xWAk0c,1893
18
- guardianunivalle_benito_yucra-0.1.33.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
19
- guardianunivalle_benito_yucra-0.1.33.dist-info/top_level.txt,sha256=HTWfZM64WAV_QYr5cnXnLuabQt92dvlxqlR3pCwpbDQ,30
20
- guardianunivalle_benito_yucra-0.1.33.dist-info/RECORD,,
16
+ guardianunivalle_benito_yucra-0.1.34.dist-info/licenses/LICENSE,sha256=5e4IdL542v1E8Ft0A24GZjrxZeTsVK7XrS3mZEUhPtM,37
17
+ guardianunivalle_benito_yucra-0.1.34.dist-info/METADATA,sha256=FQPhIzUcYEulIzGZfnnDy9A-zLTGdW7WRLnHukzg_fQ,1893
18
+ guardianunivalle_benito_yucra-0.1.34.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
19
+ guardianunivalle_benito_yucra-0.1.34.dist-info/top_level.txt,sha256=HTWfZM64WAV_QYr5cnXnLuabQt92dvlxqlR3pCwpbDQ,30
20
+ guardianunivalle_benito_yucra-0.1.34.dist-info/RECORD,,