Compare commits

...

4 Commits

Author SHA1 Message Date
695f327ccd fix: corrige falsos positivos de IPs disponibles y actualiza versión a 1.7.1
- Se eliminó el parámetro `suspended=true` en las consultas a la API de UISP (/devices/ips) en `public.php` y `ApiHandlers.php`.
- Este parámetro causaba un error crítico donde la API excluía a los dispositivos activos de la red, devolviendo únicamente los dispositivos suspendidos. Como resultado, las IPs asignadas a clientes sanos (ej. segmento 54) se mostraban erróneamente como "disponibles".
- Se actualizó el manifest.json a la versión 1.7.1.
- Se actualizó el CHANGELOG.md y README.md reflejando la corrección del error y las fechas de lanzamiento.
2026-05-04 13:03:54 -06:00
a8dd6a8f38 primera implementación asíncrona con workers 2026-03-26 15:50:43 -06:00
c10f2a44fe antes de la asincronía 2026-03-26 15:33:32 -06:00
aaec7ce0b4 botón del modo claro y oscuro implementado 2026-02-23 12:42:30 -06:00
251 changed files with 23645 additions and 674 deletions

0
.DS_Store vendored Normal file → Executable file
View File

0
.gitignore vendored Normal file → Executable file
View File

40
CHANGELOG.md Normal file → Executable file
View File

@ -7,10 +7,46 @@ y este proyecto adhiere a [Semantic Versioning](https://semver.org/lang/es/).
--- ---
## [1.7.1] - 2026-05-04
### 🐛 Corregido
- **Falsos Positivos de IPs Disponibles**: Se eliminó el parámetro `suspended=true` en las consultas a la API de UISP (`/devices/ips`). Esto solucionó un error crítico donde los clientes activos eran excluidos de los resultados, lo que causaba que sus IPs asignadas (ej. segmento 54) se mostraran erróneamente como "disponibles". Ahora se muestran correctamente como "en uso".
## [1.7.0] - 2026-03-26
### ✨ Añadido
- **Detección de IPs Flotantes**: Nuevo sistema para identificar dispositivos con `authorized: false` (estado "Pending Adoption") que no eran detectados por `/devices/ips`.
- Método `obtenerIpsFlotantes()` en `IpSearchService.php`
- Campo `floating` en la respuesta JSON del backend
- Badge naranja "IP Flotante" con estado `⚠️ IP Flotante - {nombre} ({modelo})`
- Las IPs flotantes cuentan como "en uso" en las estadísticas
- **Workers Paralelos**: Sistema de pool de workers para validación concurrente de IPs.
- `runProgressiveValidation()` ahora usa 7 workers simultáneos (configurable)
- `runProgressiveVerification()` también usa 7 workers paralelos
- Progreso en tiempo real: `"Validando IP's... 45/100 procesadas, 8 disponibles"`
- Mejora de rendimiento de ~5-7x respecto a la versión secuencial
- **Inserción Ordenada**: Función `insertRowSorted()` que inserta IPs en la tabla manteniendo el orden por último octeto, sin importar qué worker termina primero.
### 🐛 Corregido
- **Numeración Consecutiva**: La columna `#` ahora muestra números consecutivos (1, 2, 3...) solo para filas visibles.
- Función `renumberVisibleRows()` recalcula la numeración al ocultar/mostrar IPs administrativas
- Corregido bug donde la numeración comenzaba en 49+ al ocultar filas admin
### 🔧 Mejorado
- **Rendimiento Frontend**: Búsqueda ~7x más rápida gracias a workers paralelos
- **Mensajes de progreso**: Actualizados para indicar modo paralelo y conteo de IPs procesadas
---
## [1.6.2] - 2025-12-09
### 🐛 Bug Fixes
- **Límite Inteligente (Smart Limit)**: Ahora la opción de límite (5, 10 IPs) busca activamente hasta encontrar esa cantidad de IPs *disponibles*. Antiguamente solo verificaba las primeras de la lista y si estaban ocupadas por ping devolvía 0 resultados.
## [1.6.1] - 2025-12-08 ## [1.6.1] - 2025-12-08
### 🚀 Mejoras de UX/UI ### 🚀 Mejoras de UX/UI
- Reorganización de elementos del formulario: Checkboxes agrupados y dropdown de límite al final. - Reorganización de elementos del formulario: Checkboxes apilados verticalmente (Ping arriba, Ocultar Admin abajo) y dropdown de límite al final.
- **Mensajes de progreso persistentes**: Los mensajes de estado ("Validando por ping...", "Consultando...") ahora permanecen visibles durante todo el proceso. - **Mensajes de progreso persistentes**: Los mensajes de estado ("Validando por ping...", "Consultando...") ahora permanecen visibles durante todo el proceso.
- **Badge de IP**: Ahora muestra "No disponible" en rojo cuando una IP está en uso por ping o validación de sitios (antes mostraba "Cliente" en verde). - **Badge de IP**: Ahora muestra "No disponible" en rojo cuando una IP está en uso por ping o validación de sitios (antes mostraba "Cliente" en verde).
- **Estadísticas reales**: Los contadores de "IPs Disponibles" y "IPs en Uso" ahora reflejan exactamente lo que se muestra en la tabla después de la validación progresiva. - **Estadísticas reales**: Los contadores de "IPs Disponibles" y "IPs en Uso" ahora reflejan exactamente lo que se muestra en la tabla después de la validación progresiva.
@ -414,4 +450,4 @@ Este proyecto sigue [Semantic Versioning](https://semver.org/lang/es/):
--- ---
**Última actualización**: 26 de noviembre de 2025 **Última actualización**: 4 de mayo de 2026

23
README.md Normal file → Executable file
View File

@ -1,6 +1,6 @@
# SIIP - Buscador de IP's Disponibles UISP # SIIP - Buscador de IP's Disponibles UISP
[![Version](https://img.shields.io/badge/version-1.6.1-blue.svg)](manifest.json) [![Version](https://img.shields.io/badge/version-1.7.1-blue.svg)](manifest.json)
[![UCRM](https://img.shields.io/badge/UCRM-Compatible-green.svg)](https://uisp.com/) [![UCRM](https://img.shields.io/badge/UCRM-Compatible-green.svg)](https://uisp.com/)
[![UNMS](https://img.shields.io/badge/UNMS-Compatible-green.svg)](https://uisp.com/) [![UNMS](https://img.shields.io/badge/UNMS-Compatible-green.svg)](https://uisp.com/)
@ -732,17 +732,14 @@ Los logs se guardan en:
Para ver el historial completo de cambios y versiones, consulta el archivo **[CHANGELOG.md](CHANGELOG.md)**. Para ver el historial completo de cambios y versiones, consulta el archivo **[CHANGELOG.md](CHANGELOG.md)**.
### Versión Actual: 1.2.0 (2025-11-26) ### Versión Actual: 1.7.1 (2026-05-04)
**Cambios destacados**: **Cambios destacados**:
- 🏓 Verificación por ping para detectar dispositivos no registrados - 🐛 Corrección de falsos positivos en búsqueda de IPs por parámetro `suspended=true`
- ⚡ Ping paralelo de hasta 30 IPs simultáneamente - 🔶 Detección de IPs flotantes (dispositivos no autorizados/pendiente de adopción)
- 🎛️ Control opcional vía configuración - ⚡ Workers paralelos (7x más rápido) con inserción ordenada por octeto
- 📊 Estadísticas detalladas de verificación - 🔢 Numeración consecutiva corregida en tabla de resultados
- ✨ API REST completa con endpoints `event.ip_request` y `event.ip_check` - 📊 Progreso en tiempo real durante la validación paralela
- 🔌 Soporte para webhooks y eventos personalizados
- 🎯 Filtrado automático de IPs administrativas
- 📚 Documentación completa con ejemplos en múltiples lenguajes
[Ver changelog completo →](CHANGELOG.md) [Ver changelog completo →](CHANGELOG.md)
@ -771,7 +768,7 @@ Para ver el historial completo de cambios y versiones, consulta el archivo **[CH
--- ---
**Versión 1.5.1** - Diciembre 2025 **Versión 1.7.1** - Mayo 2026
Desarrollado por [SIIP Internet](https://siip.mx) Desarrollado por [SIIP Internet](https://siip.mx)
--- ---
@ -783,5 +780,5 @@ Este plugin es propiedad de **SIIP Internet**. Todos los derechos reservados.
--- ---
**Versión**: 1.5.0 **Versión**: 1.7.1
**Última actualización**: 27 de noviembre de 2025 **Última actualización**: 4 de mayo de 2026

169
bin/pack-plugin-custom Executable file
View File

@ -0,0 +1,169 @@
#!/usr/bin/env php
<?php
if (! class_exists(ZipArchive::class)) {
echo 'This script requires zip PHP extension.' . PHP_EOL;
exit(1);
}
function checkRequiredFiles(string $pluginRootDir): void
{
if (! is_file(sprintf('%s/manifest.json', $pluginRootDir))) {
echo sprintf('Manifest file not found in "%s".', $pluginRootDir) . PHP_EOL;
exit(1);
}
if (! is_file(sprintf('%s/main.php', $pluginRootDir))) {
echo sprintf('WARNING: Plugin does not have required main.php file in "%s".', $pluginRootDir) . PHP_EOL;
}
}
function getPluginRootDir(?string $rootDir): string
{
if ($rootDir === null) {
$rootDir = realpath(__DIR__ . '/..'); // Assuming bin/pack-plugin-custom, so root is one level up
echo sprintf('Plugin root dir not given, trying to find automatically: "%s"', $rootDir) . PHP_EOL;
} else {
if (! is_dir($rootDir)) {
echo 'Given directory does not exist.' . PHP_EOL;
exit(1);
}
$rootDir = realpath($rootDir);
}
return $rootDir;
}
function getPluginInfo(string $pluginRootDir): array
{
$manifestContent = file_get_contents($pluginRootDir . '/manifest.json');
if ($manifestContent === false) {
echo 'Could not read manifest.json.' . PHP_EOL;
exit(1);
}
$manifest = json_decode($manifestContent, true, 512, JSON_BIGINT_AS_STRING);
$error = json_last_error();
if ($error !== JSON_ERROR_NONE) {
echo sprintf('Could not decode manifest: "%s"', $error) . PHP_EOL;
exit(1);
}
$name = $manifest['information']['name'] ?? null;
if ($name === null) {
echo 'Could not get plugin\'s name from manifest.' . PHP_EOL;
exit(1);
}
if (! preg_match('~^[a-z0-9_-]+$~', $name)) {
echo 'Plugin\'s name contains invalid characters. Valid characters are: a-z, 0-9, _ (underscore) and - (hyphen).' . PHP_EOL;
exit(1);
}
$version = $manifest['information']['version'] ?? '0.0.0';
return ['name' => $name, 'version' => $version];
}
$pluginRootDir = getPluginRootDir($argv[1] ?? null);
checkRequiredFiles($pluginRootDir);
$pluginInfo = getPluginInfo($pluginRootDir);
$pluginName = $pluginInfo['name'];
$pluginVersion = $pluginInfo['version'];
// Custom: Add version to zip name
$zipName = sprintf('%s-%s.zip', $pluginName, $pluginVersion);
// Create the zip in the plugin root directory logic
// If structure matches UBNT repo (src separate), put it one level up.
// But commonly specific plugins are just the root.
// The original script checks for README.md in parent and src dir to decide if it's in a mono-repo.
// We will simplify and default to current dir, but keep the check just in case.
if (file_exists(sprintf('%s/../README.md', $pluginRootDir)) && is_dir(sprintf('%s/../src', $pluginRootDir))) {
$zipPath = sprintf('%s/../%s', $pluginRootDir, $zipName);
} else {
$zipPath = sprintf('%s/%s', $pluginRootDir, $zipName);
}
// Delete old ZIP archive.
if (file_exists($zipPath)) {
unlink($zipPath);
}
// Install composer dependencies.
echo 'Installing composer dependencies...' . PHP_EOL;
shell_exec('composer install --classmap-authoritative --no-dev --no-interaction --quiet');
// Create the ZIP archive.
$zip = new ZipArchive();
if ($zip->open($zipPath, ZipArchive::CREATE) !== true) {
echo 'Can\'t open zip file.' . PHP_EOL;
exit(1);
}
$files = new CallbackFilterIterator(
new \RecursiveIteratorIterator(
new \RecursiveDirectoryIterator($pluginRootDir, \RecursiveDirectoryIterator::SKIP_DOTS)
),
function (SplFileInfo $fileInfo) {
return $fileInfo->isFile();
}
);
$ignoredFiles = [
'ucrm.json',
'.ucrm-plugin-running',
'.ucrm-plugin-execution-requested',
$zipName,
'.DS_Store', // Added DS_Store
];
// Add wildcard support for ignored files if needed, but for now simple check
$ignoredDirectories = [
'.git/',
'.idea/',
'vendor/bin/', // Don't include binaries in the zip if not needed, or at least this script
'bin/', // Don't include this script itself if we don't want to distributed it (optional)
];
// We probably want to include vendor/bin/pack-plugin (original) if it was there,
// but we definitely want to exclude .git.
/** @var SplFileInfo $fileInfo */
foreach ($files as $fileInfo) {
// Get relative path
$filename = substr($fileInfo->getPathname(), strlen($pluginRootDir) + 1);
// Fix slashes for zip
$filename = str_replace('\\', '/', $filename);
if (in_array(basename($filename), $ignoredFiles, true)) {
// Simple check for filename
continue;
}
// Check ignored files by full relative path
if (in_array($filename, $ignoredFiles, true)) {
continue;
}
foreach ($ignoredDirectories as $ignoredDirectory) {
if (strpos($filename, $ignoredDirectory) === 0) {
continue 2;
}
}
// Exclude the script itself if it's inside the root
if (realpath($fileInfo->getPathname()) === realpath(__FILE__)) {
continue;
}
if (! $zip->addFile($fileInfo->getPathname(), $filename)) {
echo sprintf('Unable to add file "%s".', $filename) . PHP_EOL;
exit(1);
}
}
$zip->close();
echo sprintf('Created plugin ZIP archive: "%s"', realpath($zipPath)) . PHP_EOL;

0
composer.json Normal file → Executable file
View File

0
composer.lock generated Normal file → Executable file
View File

2
data/config.json Normal file → Executable file
View File

@ -1 +1 @@
{"ipserver":"sistema.siip.mx","apitoken":"72VoFACForJQzveorR1sTLrXXwrnnK/oy6Bp9luwFTGC/dRdeQWNmFZqJeHuUzqK","unmsApiToken":"393eb3d0-9b46-4a47-b9b4-473e4e24a89c","debugMode":true,"logging_level":true,"enablePingVerification":true,"adminRangeStart":"2","adminRangeEnd":"50","adminRangeFinalStart":"254","adminRangeFinalEnd":"255","useCustomAdminRanges":true,"customAdminRangesJson":"{\"segmentos\":[{\"segmento\":\"13\",\"administrativas_iniciales\":[{\"inicio\":2,\"hasta\":50}],\"administrativas_finales\":[{\"inicio\":253,\"hasta\":254}]},{\"segmento\":\"100\",\"administrativas_iniciales\":[{\"inicio\":2,\"hasta\":50}],\"administrativas_finales\":[{\"inicio\":254,\"hasta\":254}]}]}","adminPassword":"Siip.2963"} {"ipserver":"sistema.siip.mx","apitoken":"72VoFACForJQzveorR1sTLrXXwrnnK/oy6Bp9luwFTGC/dRdeQWNmFZqJeHuUzqK","unmsApiToken":"393eb3d0-9b46-4a47-b9b4-473e4e24a89c","enablePingVerification":true,"adminRangeStart":"1","adminRangeEnd":"50","adminRangeFinalStart":"254","adminRangeFinalEnd":"255","useCustomAdminRanges":true,"customAdminRangesJson":"{\"segmentos\":[{\"segmento\":\"13\",\"administrativas_iniciales\":[{\"inicio\":2,\"hasta\":50}],\"administrativas_finales\":[{\"inicio\":253,\"hasta\":254}]},{\"segmento\":\"100\",\"administrativas_iniciales\":[{\"inicio\":2,\"hasta\":50}],\"administrativas_finales\":[{\"inicio\":254,\"hasta\":254}]}]}","adminPassword":"Siip.2963","debugMode":true,"logging_level":true}

0
data/devices_debug.json Normal file → Executable file
View File

21635
data/plugin.log Normal file → Executable file

File diff suppressed because it is too large Load Diff

0
main.php Normal file → Executable file
View File

2
manifest.json Normal file → Executable file
View File

@ -5,7 +5,7 @@
"displayName": "SIIP - Buscador de IP's Disponibles UISP", "displayName": "SIIP - Buscador de IP's Disponibles UISP",
"description": "Este plugin permite buscar IP's disponibles en UISP (UNMS) y asignarlas a los clientes en UCRM. Evitando así la asignación de IP's duplicadas y mejorando la gestión de direcciones IP en la red.", "description": "Este plugin permite buscar IP's disponibles en UISP (UNMS) y asignarlas a los clientes en UCRM. Evitando así la asignación de IP's duplicadas y mejorando la gestión de direcciones IP en la red.",
"url": "https://siip.mx", "url": "https://siip.mx",
"version": "1.6.1", "version": "1.7.1",
"ucrmVersionCompliancy": { "ucrmVersionCompliancy": {
"min": "1.0.0", "min": "1.0.0",
"max": null "max": null

1179
public.php Normal file → Executable file

File diff suppressed because it is too large Load Diff

Binary file not shown.

0
src/AdminRangeHelper.php Normal file → Executable file
View File

4
src/ApiHandlers.php Normal file → Executable file
View File

@ -99,7 +99,7 @@ function handleIpRequest($data, $log) {
} }
// Buscar IPs // Buscar IPs
$apiUrl = "https://{$config['ipserver']}/nms/api/v2.1/devices/ips?suspended=true&management=true&includeObsolete=true"; $apiUrl = "https://{$config['ipserver']}/nms/api/v2.1/devices/ips?management=true&includeObsolete=true";
$apiToken = $config['unmsApiToken']; $apiToken = $config['unmsApiToken'];
$ipService = new \SiipAvailableIps\IpSearchService($apiUrl, $apiToken, $log, $config); $ipService = new \SiipAvailableIps\IpSearchService($apiUrl, $apiToken, $log, $config);
@ -203,7 +203,7 @@ function handleIpCheck($data, $log) {
return; return;
} }
$apiUrl = "https://{$config['ipserver']}/nms/api/v2.1/devices/ips?suspended=true&management=true&includeObsolete=true"; $apiUrl = "https://{$config['ipserver']}/nms/api/v2.1/devices/ips?management=true&includeObsolete=true";
$apiToken = $config['unmsApiToken']; $apiToken = $config['unmsApiToken'];
// Verificar si se solicita ping // Verificar si se solicita ping

0
src/CrmService.php Normal file → Executable file
View File

149
src/IpSearchService.php Normal file → Executable file
View File

@ -199,6 +199,30 @@ class IpSearchService
} }
} }
// Detectar IPs flotantes (dispositivos no autorizados / Pending Adoption)
$floatingIps = [];
try {
$floatingIps = $this->obtenerIpsFlotantes($segmento);
if (!empty($floatingIps)) {
// Agregar IPs flotantes a la lista de IPs en uso para excluirlas de disponibles
$floatingIpAddresses = array_column($floatingIps, 'ip');
$ipsEnUso = array_unique(array_merge($ipsEnUso, $floatingIpAddresses));
if ($this->logger) {
$this->logger->appendLog(sprintf(
'Detectadas %d IPs flotantes (dispositivos no autorizados) en segmento %s: %s',
count($floatingIps),
$segmento,
implode(', ', $floatingIpAddresses)
));
}
}
} catch (\Exception $e) {
if ($this->logger) {
$this->logger->appendLog('Error al detectar IPs flotantes: ' . $e->getMessage());
}
}
// Filtrar IPs del segmento solicitado // Filtrar IPs del segmento solicitado
$segmentoPrefix = "172.16.$segmento."; $segmentoPrefix = "172.16.$segmento.";
$segmentIps = []; $segmentIps = [];
@ -364,6 +388,7 @@ class IpSearchService
), ),
'data' => $ipsDisponibles, 'data' => $ipsDisponibles,
'used' => $segmentIps, 'used' => $segmentIps,
'floating' => $floatingIps,
'segment' => "172.16.$segmento.x", 'segment' => "172.16.$segmento.x",
'ping_verified' => $pingVerified 'ping_verified' => $pingVerified
]; ];
@ -539,4 +564,128 @@ class IpSearchService
return $ipToSite; return $ipToSite;
} }
/**
* Obtiene IPs de dispositivos no autorizados (Pending Adoption) en un segmento
* Estos dispositivos no aparecen en /devices/ips pero en /devices
*
* @param string $segmento Tercer octeto del segmento
* @return array Array de dispositivos flotantes [{ip, name, model, status}]
*/
private function obtenerIpsFlotantes($segmento)
{
$urlParts = parse_url($this->apiUrl);
$baseUrl = $urlParts['scheme'] . '://' . $urlParts['host'];
$devicesUrl = $baseUrl . '/nms/api/v2.1/devices?authorized=false';
if ($this->logger) {
$this->logger->appendLog('Buscando dispositivos no autorizados (Pending Adoption)...');
}
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $devicesUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'accept: application/json',
"x-auth-token: {$this->apiToken}"
]);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$result = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
// Si la API de authorized=false no devuelve resultados útiles,
// intentar con /devices completo y filtrar
$devices = [];
if ($httpCode === 200 && $result !== false) {
$parsed = json_decode($result, true);
if (is_array($parsed) && !empty($parsed)) {
$devices = $parsed;
}
}
// Si no encontramos dispositivos no autorizados con el filtro,
// consultar todos los dispositivos y filtrar manualmente
if (empty($devices)) {
$allDevicesUrl = $baseUrl . '/nms/api/v2.1/devices';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $allDevicesUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'accept: application/json',
"x-auth-token: {$this->apiToken}"
]);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
$result = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode !== 200 || $result === false) {
if ($this->logger) {
$this->logger->appendLog("Error al obtener dispositivos: HTTP $httpCode");
}
return [];
}
$allDevices = json_decode($result, true);
if (!is_array($allDevices)) {
return [];
}
// Filtrar solo dispositivos no autorizados
$devices = array_filter($allDevices, function($device) {
return isset($device['identification']['authorized'])
&& $device['identification']['authorized'] === false;
});
}
// Filtrar por segmento y construir resultado
$segmentoPrefix = "172.16.$segmento.";
$floating = [];
foreach ($devices as $device) {
$primaryIp = $device['ipAddress'] ?? '';
$cleanIp = explode('/', $primaryIp)[0];
if (strpos($cleanIp, $segmentoPrefix) === 0) {
$floating[] = [
'ip' => $cleanIp,
'name' => $device['identification']['name'] ?? 'Desconocido',
'model' => $device['identification']['model'] ?? 'N/A',
'status' => $device['overview']['status'] ?? 'unknown',
];
continue;
}
// Buscar en ipAddressList
foreach ($device['ipAddressList'] ?? [] as $listIp) {
if (strpos($listIp, $segmentoPrefix) === 0) {
$floating[] = [
'ip' => $listIp,
'name' => $device['identification']['name'] ?? 'Desconocido',
'model' => $device['identification']['model'] ?? 'N/A',
'status' => $device['overview']['status'] ?? 'unknown',
];
}
}
}
if ($this->logger) {
$this->logger->appendLog(sprintf(
'Dispositivos no autorizados en segmento %s: %d encontrados',
$segmento,
count($floating)
));
}
return $floating;
}
} }

0
src/IpValidator.php Normal file → Executable file
View File

0
src/PingService.php Normal file → Executable file
View File

0
test_debug.php Normal file → Executable file
View File

18
test_ips.php Normal file
View File

@ -0,0 +1,18 @@
<?php
$token = '393eb3d0-9b46-4a47-b9b4-473e4e24a89c';
$baseUrl = 'https://sistema.siip.mx/nms/api/v2.1/devices/ips';
function fetchIps($url, $token) {
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['x-auth-token: ' . $token]);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$res = curl_exec($ch);
curl_close($ch);
$data = json_decode($res, true);
return count($data);
}
echo "With suspended=true: " . fetchIps($baseUrl . '?suspended=true&management=true&includeObsolete=true', $token) . "\n";
echo "Without suspended=true: " . fetchIps($baseUrl . '?management=true&includeObsolete=true', $token) . "\n";
echo "With suspended=false: " . fetchIps($baseUrl . '?suspended=false&management=true&includeObsolete=true', $token) . "\n";

0
ucrm.json Normal file → Executable file
View File

0
unms-swagger.json Normal file → Executable file
View File

0
unms.yaml Normal file → Executable file
View File

0
unmscrm.apib Normal file → Executable file
View File

0
vendor/.DS_Store vendored Normal file → Executable file
View File

18
vendor/autoload.php vendored Normal file → Executable file
View File

@ -2,6 +2,24 @@
// autoload.php @generated by Composer // autoload.php @generated by Composer
if (PHP_VERSION_ID < 50600) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, $err);
} elseif (!headers_sent()) {
echo $err;
}
}
trigger_error(
$err,
E_USER_ERROR
);
}
require_once __DIR__ . '/composer/autoload_real.php'; require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInita8750288fc198a75aec345f4f4b7fd12::getLoader(); return ComposerAutoloaderInita8750288fc198a75aec345f4f4b7fd12::getLoader();

105
vendor/composer/ClassLoader.php vendored Normal file → Executable file
View File

@ -42,35 +42,37 @@ namespace Composer\Autoload;
*/ */
class ClassLoader class ClassLoader
{ {
/** @var ?string */ /** @var \Closure(string):void */
private static $includeFile;
/** @var string|null */
private $vendorDir; private $vendorDir;
// PSR-4 // PSR-4
/** /**
* @var array[] * @var array<string, array<string, int>>
* @psalm-var array<string, array<string, int>>
*/ */
private $prefixLengthsPsr4 = array(); private $prefixLengthsPsr4 = array();
/** /**
* @var array[] * @var array<string, list<string>>
* @psalm-var array<string, array<int, string>>
*/ */
private $prefixDirsPsr4 = array(); private $prefixDirsPsr4 = array();
/** /**
* @var array[] * @var list<string>
* @psalm-var array<string, string>
*/ */
private $fallbackDirsPsr4 = array(); private $fallbackDirsPsr4 = array();
// PSR-0 // PSR-0
/** /**
* @var array[] * List of PSR-0 prefixes
* @psalm-var array<string, array<string, string[]>> *
* Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
*
* @var array<string, array<string, list<string>>>
*/ */
private $prefixesPsr0 = array(); private $prefixesPsr0 = array();
/** /**
* @var array[] * @var list<string>
* @psalm-var array<string, string>
*/ */
private $fallbackDirsPsr0 = array(); private $fallbackDirsPsr0 = array();
@ -78,8 +80,7 @@ class ClassLoader
private $useIncludePath = false; private $useIncludePath = false;
/** /**
* @var string[] * @var array<string, string>
* @psalm-var array<string, string>
*/ */
private $classMap = array(); private $classMap = array();
@ -87,29 +88,29 @@ class ClassLoader
private $classMapAuthoritative = false; private $classMapAuthoritative = false;
/** /**
* @var bool[] * @var array<string, bool>
* @psalm-var array<string, bool>
*/ */
private $missingClasses = array(); private $missingClasses = array();
/** @var ?string */ /** @var string|null */
private $apcuPrefix; private $apcuPrefix;
/** /**
* @var self[] * @var array<string, self>
*/ */
private static $registeredLoaders = array(); private static $registeredLoaders = array();
/** /**
* @param ?string $vendorDir * @param string|null $vendorDir
*/ */
public function __construct($vendorDir = null) public function __construct($vendorDir = null)
{ {
$this->vendorDir = $vendorDir; $this->vendorDir = $vendorDir;
self::initializeIncludeClosure();
} }
/** /**
* @return string[] * @return array<string, list<string>>
*/ */
public function getPrefixes() public function getPrefixes()
{ {
@ -121,8 +122,7 @@ class ClassLoader
} }
/** /**
* @return array[] * @return array<string, list<string>>
* @psalm-return array<string, array<int, string>>
*/ */
public function getPrefixesPsr4() public function getPrefixesPsr4()
{ {
@ -130,8 +130,7 @@ class ClassLoader
} }
/** /**
* @return array[] * @return list<string>
* @psalm-return array<string, string>
*/ */
public function getFallbackDirs() public function getFallbackDirs()
{ {
@ -139,8 +138,7 @@ class ClassLoader
} }
/** /**
* @return array[] * @return list<string>
* @psalm-return array<string, string>
*/ */
public function getFallbackDirsPsr4() public function getFallbackDirsPsr4()
{ {
@ -148,8 +146,7 @@ class ClassLoader
} }
/** /**
* @return string[] Array of classname => path * @return array<string, string> Array of classname => path
* @psalm-return array<string, string>
*/ */
public function getClassMap() public function getClassMap()
{ {
@ -157,8 +154,7 @@ class ClassLoader
} }
/** /**
* @param string[] $classMap Class to filename map * @param array<string, string> $classMap Class to filename map
* @psalm-param array<string, string> $classMap
* *
* @return void * @return void
*/ */
@ -176,23 +172,24 @@ class ClassLoader
* appending or prepending to the ones previously set for this prefix. * appending or prepending to the ones previously set for this prefix.
* *
* @param string $prefix The prefix * @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 root directories * @param list<string>|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories * @param bool $prepend Whether to prepend the directories
* *
* @return void * @return void
*/ */
public function add($prefix, $paths, $prepend = false) public function add($prefix, $paths, $prepend = false)
{ {
$paths = (array) $paths;
if (!$prefix) { if (!$prefix) {
if ($prepend) { if ($prepend) {
$this->fallbackDirsPsr0 = array_merge( $this->fallbackDirsPsr0 = array_merge(
(array) $paths, $paths,
$this->fallbackDirsPsr0 $this->fallbackDirsPsr0
); );
} else { } else {
$this->fallbackDirsPsr0 = array_merge( $this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0, $this->fallbackDirsPsr0,
(array) $paths $paths
); );
} }
@ -201,19 +198,19 @@ class ClassLoader
$first = $prefix[0]; $first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) { if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = (array) $paths; $this->prefixesPsr0[$first][$prefix] = $paths;
return; return;
} }
if ($prepend) { if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge( $this->prefixesPsr0[$first][$prefix] = array_merge(
(array) $paths, $paths,
$this->prefixesPsr0[$first][$prefix] $this->prefixesPsr0[$first][$prefix]
); );
} else { } else {
$this->prefixesPsr0[$first][$prefix] = array_merge( $this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix], $this->prefixesPsr0[$first][$prefix],
(array) $paths $paths
); );
} }
} }
@ -223,7 +220,7 @@ class ClassLoader
* appending or prepending to the ones previously set for this namespace. * appending or prepending to the ones previously set for this namespace.
* *
* @param string $prefix The prefix/namespace, with trailing '\\' * @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories * @param list<string>|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories * @param bool $prepend Whether to prepend the directories
* *
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
@ -232,17 +229,18 @@ class ClassLoader
*/ */
public function addPsr4($prefix, $paths, $prepend = false) public function addPsr4($prefix, $paths, $prepend = false)
{ {
$paths = (array) $paths;
if (!$prefix) { if (!$prefix) {
// Register directories for the root namespace. // Register directories for the root namespace.
if ($prepend) { if ($prepend) {
$this->fallbackDirsPsr4 = array_merge( $this->fallbackDirsPsr4 = array_merge(
(array) $paths, $paths,
$this->fallbackDirsPsr4 $this->fallbackDirsPsr4
); );
} else { } else {
$this->fallbackDirsPsr4 = array_merge( $this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4, $this->fallbackDirsPsr4,
(array) $paths $paths
); );
} }
} elseif (!isset($this->prefixDirsPsr4[$prefix])) { } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
@ -252,18 +250,18 @@ class ClassLoader
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
} }
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths; $this->prefixDirsPsr4[$prefix] = $paths;
} elseif ($prepend) { } elseif ($prepend) {
// Prepend directories for an already registered namespace. // Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge( $this->prefixDirsPsr4[$prefix] = array_merge(
(array) $paths, $paths,
$this->prefixDirsPsr4[$prefix] $this->prefixDirsPsr4[$prefix]
); );
} else { } else {
// Append directories for an already registered namespace. // Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge( $this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix], $this->prefixDirsPsr4[$prefix],
(array) $paths $paths
); );
} }
} }
@ -273,7 +271,7 @@ class ClassLoader
* replacing any others previously set for this prefix. * replacing any others previously set for this prefix.
* *
* @param string $prefix The prefix * @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 base directories * @param list<string>|string $paths The PSR-0 base directories
* *
* @return void * @return void
*/ */
@ -291,7 +289,7 @@ class ClassLoader
* replacing any others previously set for this namespace. * replacing any others previously set for this namespace.
* *
* @param string $prefix The prefix/namespace, with trailing '\\' * @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories * @param list<string>|string $paths The PSR-4 base directories
* *
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
* *
@ -425,7 +423,8 @@ class ClassLoader
public function loadClass($class) public function loadClass($class)
{ {
if ($file = $this->findFile($class)) { if ($file = $this->findFile($class)) {
includeFile($file); $includeFile = self::$includeFile;
$includeFile($file);
return true; return true;
} }
@ -476,9 +475,9 @@ class ClassLoader
} }
/** /**
* Returns the currently registered loaders indexed by their corresponding vendor directories. * Returns the currently registered loaders keyed by their corresponding vendor directories.
* *
* @return self[] * @return array<string, self>
*/ */
public static function getRegisteredLoaders() public static function getRegisteredLoaders()
{ {
@ -555,6 +554,14 @@ class ClassLoader
return false; return false;
} }
/**
* @return void
*/
private static function initializeIncludeClosure()
{
if (self::$includeFile !== null) {
return;
} }
/** /**
@ -564,9 +571,9 @@ class ClassLoader
* *
* @param string $file * @param string $file
* @return void * @return void
* @private
*/ */
function includeFile($file) self::$includeFile = \Closure::bind(static function($file) {
{
include $file; include $file;
}, null, null);
}
} }

31
vendor/composer/InstalledVersions.php vendored Normal file → Executable file
View File

@ -21,12 +21,14 @@ use Composer\Semver\VersionParser;
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
* *
* To require its presence, you can require `composer-runtime-api ^2.0` * To require its presence, you can require `composer-runtime-api ^2.0`
*
* @final
*/ */
class InstalledVersions class InstalledVersions
{ {
/** /**
* @var mixed[]|null * @var mixed[]|null
* @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
*/ */
private static $installed; private static $installed;
@ -37,7 +39,7 @@ class InstalledVersions
/** /**
* @var array[] * @var array[]
* @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}> * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/ */
private static $installedByVendor = array(); private static $installedByVendor = array();
@ -96,7 +98,7 @@ class InstalledVersions
{ {
foreach (self::getInstalled() as $installed) { foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) { if (isset($installed['versions'][$packageName])) {
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
} }
} }
@ -117,7 +119,7 @@ class InstalledVersions
*/ */
public static function satisfies(VersionParser $parser, $packageName, $constraint) public static function satisfies(VersionParser $parser, $packageName, $constraint)
{ {
$constraint = $parser->parseConstraints($constraint); $constraint = $parser->parseConstraints((string) $constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName)); $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint); return $provided->matches($constraint);
@ -241,7 +243,7 @@ class InstalledVersions
/** /**
* @return array * @return array
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string} * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
*/ */
public static function getRootPackage() public static function getRootPackage()
{ {
@ -255,7 +257,7 @@ class InstalledVersions
* *
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
* @return array[] * @return array[]
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
*/ */
public static function getRawData() public static function getRawData()
{ {
@ -278,7 +280,7 @@ class InstalledVersions
* Returns the raw data of all installed.php which are currently loaded for custom implementations * Returns the raw data of all installed.php which are currently loaded for custom implementations
* *
* @return array[] * @return array[]
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}> * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/ */
public static function getAllRawData() public static function getAllRawData()
{ {
@ -301,7 +303,7 @@ class InstalledVersions
* @param array[] $data A vendor/composer/installed.php data set * @param array[] $data A vendor/composer/installed.php data set
* @return void * @return void
* *
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
*/ */
public static function reload($data) public static function reload($data)
{ {
@ -311,7 +313,7 @@ class InstalledVersions
/** /**
* @return array[] * @return array[]
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}> * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/ */
private static function getInstalled() private static function getInstalled()
{ {
@ -326,7 +328,9 @@ class InstalledVersions
if (isset(self::$installedByVendor[$vendorDir])) { if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir]; $installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) { } elseif (is_file($vendorDir.'/composer/installed.php')) {
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require $vendorDir.'/composer/installed.php';
$installed[] = self::$installedByVendor[$vendorDir] = $required;
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1]; self::$installed = $installed[count($installed) - 1];
} }
@ -338,12 +342,17 @@ class InstalledVersions
// only require the installed.php file if this file is loaded from its dumped location, // only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') { if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = require __DIR__ . '/installed.php'; /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require __DIR__ . '/installed.php';
self::$installed = $required;
} else { } else {
self::$installed = array(); self::$installed = array();
} }
} }
if (self::$installed !== array()) {
$installed[] = self::$installed; $installed[] = self::$installed;
}
return $installed; return $installed;
} }

0
vendor/composer/LICENSE vendored Normal file → Executable file
View File

4
vendor/composer/autoload_classmap.php vendored Normal file → Executable file
View File

@ -2,7 +2,7 @@
// autoload_classmap.php @generated by Composer // autoload_classmap.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__)); $vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir); $baseDir = dirname($vendorDir);
return array( return array(
@ -111,7 +111,9 @@ return array(
'Psr\\Http\\Message\\UriFactoryInterface' => $vendorDir . '/psr/http-factory/src/UriFactoryInterface.php', 'Psr\\Http\\Message\\UriFactoryInterface' => $vendorDir . '/psr/http-factory/src/UriFactoryInterface.php',
'Psr\\Http\\Message\\UriInterface' => $vendorDir . '/psr/http-message/src/UriInterface.php', 'Psr\\Http\\Message\\UriInterface' => $vendorDir . '/psr/http-message/src/UriInterface.php',
'SiipAvailableIps\\AdminRangeHelper' => $baseDir . '/src/AdminRangeHelper.php', 'SiipAvailableIps\\AdminRangeHelper' => $baseDir . '/src/AdminRangeHelper.php',
'SiipAvailableIps\\CrmService' => $baseDir . '/src/CrmService.php',
'SiipAvailableIps\\IpSearchService' => $baseDir . '/src/IpSearchService.php', 'SiipAvailableIps\\IpSearchService' => $baseDir . '/src/IpSearchService.php',
'SiipAvailableIps\\IpValidator' => $baseDir . '/src/IpValidator.php',
'SiipAvailableIps\\PingService' => $baseDir . '/src/PingService.php', 'SiipAvailableIps\\PingService' => $baseDir . '/src/PingService.php',
'Symfony\\Component\\Filesystem\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/filesystem/Exception/ExceptionInterface.php', 'Symfony\\Component\\Filesystem\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/filesystem/Exception/ExceptionInterface.php',
'Symfony\\Component\\Filesystem\\Exception\\FileNotFoundException' => $vendorDir . '/symfony/filesystem/Exception/FileNotFoundException.php', 'Symfony\\Component\\Filesystem\\Exception\\FileNotFoundException' => $vendorDir . '/symfony/filesystem/Exception/FileNotFoundException.php',

2
vendor/composer/autoload_files.php vendored Normal file → Executable file
View File

@ -2,7 +2,7 @@
// autoload_files.php @generated by Composer // autoload_files.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__)); $vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir); $baseDir = dirname($vendorDir);
return array( return array(

2
vendor/composer/autoload_namespaces.php vendored Normal file → Executable file
View File

@ -2,7 +2,7 @@
// autoload_namespaces.php @generated by Composer // autoload_namespaces.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__)); $vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir); $baseDir = dirname($vendorDir);
return array( return array(

2
vendor/composer/autoload_psr4.php vendored Normal file → Executable file
View File

@ -2,7 +2,7 @@
// autoload_psr4.php @generated by Composer // autoload_psr4.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__)); $vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir); $baseDir = dirname($vendorDir);
return array( return array(

40
vendor/composer/autoload_real.php vendored Normal file → Executable file
View File

@ -25,47 +25,27 @@ class ComposerAutoloaderInita8750288fc198a75aec345f4f4b7fd12
require __DIR__ . '/platform_check.php'; require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInita8750288fc198a75aec345f4f4b7fd12', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInita8750288fc198a75aec345f4f4b7fd12', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInita8750288fc198a75aec345f4f4b7fd12', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInita8750288fc198a75aec345f4f4b7fd12', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php'; require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInita8750288fc198a75aec345f4f4b7fd12::getInitializer($loader)); call_user_func(\Composer\Autoload\ComposerStaticInita8750288fc198a75aec345f4f4b7fd12::getInitializer($loader));
} else {
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
$loader->addClassMap($classMap);
}
}
$loader->setClassMapAuthoritative(true); $loader->setClassMapAuthoritative(true);
$loader->register(true); $loader->register(true);
if ($useStaticLoader) { $filesToLoad = \Composer\Autoload\ComposerStaticInita8750288fc198a75aec345f4f4b7fd12::$files;
$includeFiles = Composer\Autoload\ComposerStaticInita8750288fc198a75aec345f4f4b7fd12::$files; $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequirea8750288fc198a75aec345f4f4b7fd12($fileIdentifier, $file);
}
return $loader;
}
}
/**
* @param string $fileIdentifier
* @param string $file
* @return void
*/
function composerRequirea8750288fc198a75aec345f4f4b7fd12($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
require $file; require $file;
} }
}, null, null);
foreach ($filesToLoad as $fileIdentifier => $file) {
$requireFile($fileIdentifier, $file);
}
return $loader;
}
} }

2
vendor/composer/autoload_static.php vendored Normal file → Executable file
View File

@ -189,7 +189,9 @@ class ComposerStaticInita8750288fc198a75aec345f4f4b7fd12
'Psr\\Http\\Message\\UriFactoryInterface' => __DIR__ . '/..' . '/psr/http-factory/src/UriFactoryInterface.php', 'Psr\\Http\\Message\\UriFactoryInterface' => __DIR__ . '/..' . '/psr/http-factory/src/UriFactoryInterface.php',
'Psr\\Http\\Message\\UriInterface' => __DIR__ . '/..' . '/psr/http-message/src/UriInterface.php', 'Psr\\Http\\Message\\UriInterface' => __DIR__ . '/..' . '/psr/http-message/src/UriInterface.php',
'SiipAvailableIps\\AdminRangeHelper' => __DIR__ . '/../..' . '/src/AdminRangeHelper.php', 'SiipAvailableIps\\AdminRangeHelper' => __DIR__ . '/../..' . '/src/AdminRangeHelper.php',
'SiipAvailableIps\\CrmService' => __DIR__ . '/../..' . '/src/CrmService.php',
'SiipAvailableIps\\IpSearchService' => __DIR__ . '/../..' . '/src/IpSearchService.php', 'SiipAvailableIps\\IpSearchService' => __DIR__ . '/../..' . '/src/IpSearchService.php',
'SiipAvailableIps\\IpValidator' => __DIR__ . '/../..' . '/src/IpValidator.php',
'SiipAvailableIps\\PingService' => __DIR__ . '/../..' . '/src/PingService.php', 'SiipAvailableIps\\PingService' => __DIR__ . '/../..' . '/src/PingService.php',
'Symfony\\Component\\Filesystem\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/filesystem/Exception/ExceptionInterface.php', 'Symfony\\Component\\Filesystem\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/filesystem/Exception/ExceptionInterface.php',
'Symfony\\Component\\Filesystem\\Exception\\FileNotFoundException' => __DIR__ . '/..' . '/symfony/filesystem/Exception/FileNotFoundException.php', 'Symfony\\Component\\Filesystem\\Exception\\FileNotFoundException' => __DIR__ . '/..' . '/symfony/filesystem/Exception/FileNotFoundException.php',

0
vendor/composer/installed.json vendored Normal file → Executable file
View File

30
vendor/composer/installed.php vendored Normal file → Executable file
View File

@ -1,58 +1,58 @@
<?php return array( <?php return array(
'root' => array( 'root' => array(
'name' => '__root__',
'pretty_version' => 'dev-main', 'pretty_version' => 'dev-main',
'version' => 'dev-main', 'version' => 'dev-main',
'reference' => 'a8dd6a8f38f63db29b864b5e3efb3a6a73048c90',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
'reference' => 'ab8a60f55685ad4c70661113dab21b4e372aae0e',
'name' => '__root__',
'dev' => false, 'dev' => false,
), ),
'versions' => array( 'versions' => array(
'__root__' => array( '__root__' => array(
'pretty_version' => 'dev-main', 'pretty_version' => 'dev-main',
'version' => 'dev-main', 'version' => 'dev-main',
'reference' => 'a8dd6a8f38f63db29b864b5e3efb3a6a73048c90',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
'reference' => 'ab8a60f55685ad4c70661113dab21b4e372aae0e',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'guzzlehttp/guzzle' => array( 'guzzlehttp/guzzle' => array(
'pretty_version' => '7.9.3', 'pretty_version' => '7.9.3',
'version' => '7.9.3.0', 'version' => '7.9.3.0',
'reference' => '7b2f29fe81dc4da0ca0ea7d42107a0845946ea77',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/guzzle', 'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
'aliases' => array(), 'aliases' => array(),
'reference' => '7b2f29fe81dc4da0ca0ea7d42107a0845946ea77',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'guzzlehttp/promises' => array( 'guzzlehttp/promises' => array(
'pretty_version' => '2.2.0', 'pretty_version' => '2.2.0',
'version' => '2.2.0.0', 'version' => '2.2.0.0',
'reference' => '7c69f28996b0a6920945dd20b3857e499d9ca96c',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/promises', 'install_path' => __DIR__ . '/../guzzlehttp/promises',
'aliases' => array(), 'aliases' => array(),
'reference' => '7c69f28996b0a6920945dd20b3857e499d9ca96c',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'guzzlehttp/psr7' => array( 'guzzlehttp/psr7' => array(
'pretty_version' => '2.7.1', 'pretty_version' => '2.7.1',
'version' => '2.7.1.0', 'version' => '2.7.1.0',
'reference' => 'c2270caaabe631b3b44c85f99e5a04bbb8060d16',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/psr7', 'install_path' => __DIR__ . '/../guzzlehttp/psr7',
'aliases' => array(), 'aliases' => array(),
'reference' => 'c2270caaabe631b3b44c85f99e5a04bbb8060d16',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'psr/http-client' => array( 'psr/http-client' => array(
'pretty_version' => '1.0.3', 'pretty_version' => '1.0.3',
'version' => '1.0.3.0', 'version' => '1.0.3.0',
'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../psr/http-client', 'install_path' => __DIR__ . '/../psr/http-client',
'aliases' => array(), 'aliases' => array(),
'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'psr/http-client-implementation' => array( 'psr/http-client-implementation' => array(
@ -64,10 +64,10 @@
'psr/http-factory' => array( 'psr/http-factory' => array(
'pretty_version' => '1.1.0', 'pretty_version' => '1.1.0',
'version' => '1.1.0.0', 'version' => '1.1.0.0',
'reference' => '2b4765fddfe3b508ac62f829e852b1501d3f6e8a',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../psr/http-factory', 'install_path' => __DIR__ . '/../psr/http-factory',
'aliases' => array(), 'aliases' => array(),
'reference' => '2b4765fddfe3b508ac62f829e852b1501d3f6e8a',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'psr/http-factory-implementation' => array( 'psr/http-factory-implementation' => array(
@ -79,10 +79,10 @@
'psr/http-message' => array( 'psr/http-message' => array(
'pretty_version' => '2.0', 'pretty_version' => '2.0',
'version' => '2.0.0.0', 'version' => '2.0.0.0',
'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../psr/http-message', 'install_path' => __DIR__ . '/../psr/http-message',
'aliases' => array(), 'aliases' => array(),
'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'psr/http-message-implementation' => array( 'psr/http-message-implementation' => array(
@ -94,55 +94,55 @@
'ralouphie/getallheaders' => array( 'ralouphie/getallheaders' => array(
'pretty_version' => '3.0.3', 'pretty_version' => '3.0.3',
'version' => '3.0.3.0', 'version' => '3.0.3.0',
'reference' => '120b605dfeb996808c31b6477290a714d356e822',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../ralouphie/getallheaders', 'install_path' => __DIR__ . '/../ralouphie/getallheaders',
'aliases' => array(), 'aliases' => array(),
'reference' => '120b605dfeb996808c31b6477290a714d356e822',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/deprecation-contracts' => array( 'symfony/deprecation-contracts' => array(
'pretty_version' => 'v3.5.1', 'pretty_version' => 'v3.5.1',
'version' => '3.5.1.0', 'version' => '3.5.1.0',
'reference' => '74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
'aliases' => array(), 'aliases' => array(),
'reference' => '74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/filesystem' => array( 'symfony/filesystem' => array(
'pretty_version' => 'v6.4.13', 'pretty_version' => 'v6.4.13',
'version' => '6.4.13.0', 'version' => '6.4.13.0',
'reference' => '4856c9cf585d5a0313d8d35afd681a526f038dd3',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/filesystem', 'install_path' => __DIR__ . '/../symfony/filesystem',
'aliases' => array(), 'aliases' => array(),
'reference' => '4856c9cf585d5a0313d8d35afd681a526f038dd3',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/polyfill-ctype' => array( 'symfony/polyfill-ctype' => array(
'pretty_version' => 'v1.32.0', 'pretty_version' => 'v1.32.0',
'version' => '1.32.0.0', 'version' => '1.32.0.0',
'reference' => 'a3cc8b044a6ea513310cbd48ef7333b384945638',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-ctype', 'install_path' => __DIR__ . '/../symfony/polyfill-ctype',
'aliases' => array(), 'aliases' => array(),
'reference' => 'a3cc8b044a6ea513310cbd48ef7333b384945638',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/polyfill-mbstring' => array( 'symfony/polyfill-mbstring' => array(
'pretty_version' => 'v1.32.0', 'pretty_version' => 'v1.32.0',
'version' => '1.32.0.0', 'version' => '1.32.0.0',
'reference' => '6d857f4d76bd4b343eac26d6b539585d2bc56493',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
'aliases' => array(), 'aliases' => array(),
'reference' => '6d857f4d76bd4b343eac26d6b539585d2bc56493',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'ubnt/ucrm-plugin-sdk' => array( 'ubnt/ucrm-plugin-sdk' => array(
'pretty_version' => '0.9.0', 'pretty_version' => '0.9.0',
'version' => '0.9.0.0', 'version' => '0.9.0.0',
'reference' => '02ca1d4ce7fca1bc7f49ef0259a03d0bfedec19f',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../ubnt/ucrm-plugin-sdk', 'install_path' => __DIR__ . '/../ubnt/ucrm-plugin-sdk',
'aliases' => array(), 'aliases' => array(),
'reference' => '02ca1d4ce7fca1bc7f49ef0259a03d0bfedec19f',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
), ),

0
vendor/composer/platform_check.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/CHANGELOG.md vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/LICENSE vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/README.md vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/UPGRADING.md vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/composer.json vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/BodySummarizer.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/BodySummarizerInterface.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/Client.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/ClientInterface.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/ClientTrait.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/Exception/ClientException.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/Exception/RequestException.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/Exception/ServerException.php vendored Normal file → Executable file
View File

View File

0
vendor/guzzlehttp/guzzle/src/Exception/TransferException.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/Handler/Proxy.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/HandlerStack.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/MessageFormatter.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/Middleware.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/Pool.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/RequestOptions.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/RetryMiddleware.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/TransferStats.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/Utils.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/functions.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/guzzle/src/functions_include.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/promises/CHANGELOG.md vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/promises/LICENSE vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/promises/README.md vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/promises/composer.json vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/promises/src/AggregateException.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/promises/src/CancellationException.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/promises/src/Coroutine.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/promises/src/Create.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/promises/src/Each.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/promises/src/EachPromise.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/promises/src/FulfilledPromise.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/promises/src/Is.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/promises/src/Promise.php vendored Normal file → Executable file
View File

0
vendor/guzzlehttp/promises/src/PromiseInterface.php vendored Normal file → Executable file
View File

Some files were not shown because too many files have changed in this diff Show More