feat: funciones Python para core, cybersecurity, datascience y finance
Agrega funciones Python reutilizables organizadas por dominio: - core: composicion funcional (pipe, compose, map, filter, reduce, etc.) - cybersecurity: analisis de amenazas y puertos - datascience: estadisticas y deteccion de outliers - finance: indicadores tecnicos y analisis financiero
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
---
|
||||
name: is_hex
|
||||
kind: function
|
||||
lang: py
|
||||
domain: cybersecurity
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def is_hex(s: str) -> bool"
|
||||
description: "Verifica si un string es hexadecimal valido. Acepta con o sin prefijo 0x. Requiere minimo 2 caracteres."
|
||||
tags: [hex, validation, encoding, python]
|
||||
uses_functions: []
|
||||
uses_types: []
|
||||
returns: []
|
||||
returns_optional: false
|
||||
error_type: ""
|
||||
imports: [re]
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
file_path: "python/functions/cybersecurity/cybersecurity.py"
|
||||
---
|
||||
|
||||
## Ejemplo
|
||||
|
||||
```python
|
||||
is_hex("4a6f686e")
|
||||
# True
|
||||
|
||||
is_hex("0x4a6f686e")
|
||||
# True
|
||||
|
||||
is_hex("xyz")
|
||||
# False
|
||||
|
||||
is_hex("a")
|
||||
# False (menos de 2 caracteres)
|
||||
```
|
||||
|
||||
## Notas
|
||||
|
||||
Util para validar hashes, direcciones de memoria, shellcode y otros datos hexadecimales en contexto de seguridad.
|
||||
Reference in New Issue
Block a user