47fac22230
- .claude/CLAUDE.md - .claude/commands/subagentes.md - .claude/rules/INDEX.md - .mcp.json - bash/functions/cybersecurity/analyze_dns.md - bash/functions/cybersecurity/audit_http_headers.md - bash/functions/cybersecurity/audit_ssh_config.md - bash/functions/cybersecurity/check_firewall.md - bash/functions/cybersecurity/detect_suspicious_users.md - bash/functions/cybersecurity/encrypt_file.md - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
40 lines
1.0 KiB
Markdown
40 lines
1.0 KiB
Markdown
---
|
|
name: extract_urls
|
|
kind: function
|
|
lang: py
|
|
domain: cybersecurity
|
|
version: "1.0.0"
|
|
purity: pure
|
|
signature: "def extract_urls(text: str) -> list"
|
|
description: "Extrae todas las URLs (http/https) de un texto. Util para analisis de IoCs y threat intelligence."
|
|
tags: [url, extract, parsing, ioc, python, pendiente-usar]
|
|
uses_functions: []
|
|
uses_types: []
|
|
returns: []
|
|
returns_optional: false
|
|
error_type: ""
|
|
imports: [re]
|
|
params:
|
|
- name: text
|
|
desc: "string de texto del cual extraer URLs HTTP/HTTPS"
|
|
output: "lista de strings con todas las URLs encontradas"
|
|
tested: false
|
|
tests: []
|
|
test_file_path: ""
|
|
file_path: "python/functions/cybersecurity/cybersecurity.py"
|
|
---
|
|
|
|
## Ejemplo
|
|
|
|
```python
|
|
extract_urls("Visit https://example.com and http://test.org/path?q=1")
|
|
# ["https://example.com", "http://test.org/path?q=1"]
|
|
|
|
extract_urls("no urls here")
|
|
# []
|
|
```
|
|
|
|
## Notas
|
|
|
|
Usa regex para extraer URLs con esquema http/https. No valida que las URLs sean alcanzables. Util para extraer indicadores de compromiso (IoCs) de logs, emails o reportes de threat intelligence.
|