fix cpanel
This commit is contained in:
@@ -1,4 +1,436 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"id": "1783549261523-tcrg",
|
||||||
|
"timestamp": "2026-07-08T22:21:01.523Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/Zone/listzone",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/Zone/listzone",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 18,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783549261503-03wk",
|
||||||
|
"timestamp": "2026-07-08T22:21:01.503Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/DomainInfo/list_domains",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/DomainInfo/list_domains",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 17,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783549261483-d7m1",
|
||||||
|
"timestamp": "2026-07-08T22:21:01.483Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/DNS/list_zones",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/DNS/list_zones",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 60,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783543350629-jd9e",
|
||||||
|
"timestamp": "2026-07-08T20:42:30.629Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/Zone/listzone",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/Zone/listzone",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 17,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783543350611-tsw6",
|
||||||
|
"timestamp": "2026-07-08T20:42:30.611Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/DomainInfo/list_domains",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/DomainInfo/list_domains",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 18,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783543350591-l3l1",
|
||||||
|
"timestamp": "2026-07-08T20:42:30.591Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/DNS/list_zones",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/DNS/list_zones",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 68,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783543348369-wsxv",
|
||||||
|
"timestamp": "2026-07-08T20:42:28.369Z",
|
||||||
|
"provider": "cloudflare",
|
||||||
|
"operation": "GET /zones",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://api.cloudflare.com/client/v4/zones?per_page=50&page=1",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 400,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783542491230-vr8y",
|
||||||
|
"timestamp": "2026-07-08T20:28:11.230Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/Zone/listzone",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/Zone/listzone",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 17,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783542491211-vtcp",
|
||||||
|
"timestamp": "2026-07-08T20:28:11.211Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/DomainInfo/list_domains",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/DomainInfo/list_domains",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 16,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783542491193-gp56",
|
||||||
|
"timestamp": "2026-07-08T20:28:11.193Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/DNS/list_zones",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/DNS/list_zones",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 56,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783542078219-c7yq",
|
||||||
|
"timestamp": "2026-07-08T20:21:18.219Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/Zone/listzone",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/Zone/listzone",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 18,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783542078199-c936",
|
||||||
|
"timestamp": "2026-07-08T20:21:18.199Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/DomainInfo/list_domains",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/DomainInfo/list_domains",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 17,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783542078181-hy7b",
|
||||||
|
"timestamp": "2026-07-08T20:21:18.181Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/DNS/list_zones",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/DNS/list_zones",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 60,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783542077460-4tsb",
|
||||||
|
"timestamp": "2026-07-08T20:21:17.460Z",
|
||||||
|
"provider": "azure",
|
||||||
|
"operation": "GET /subscriptions/***/providers/Microsoft.Network/dnsZones",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://management.azure.com/subscriptions/***/providers/Microsoft.Network/dnsZones?api-version=2018-05-01",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 442,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783541770746-xpjc",
|
||||||
|
"timestamp": "2026-07-08T20:16:10.746Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/Zone/listzone",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/Zone/listzone",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 17,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783541770728-ie9l",
|
||||||
|
"timestamp": "2026-07-08T20:16:10.728Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/DomainInfo/list_domains",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/DomainInfo/list_domains",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 18,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783541770707-wtzl",
|
||||||
|
"timestamp": "2026-07-08T20:16:10.707Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/DNS/list_zones",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/DNS/list_zones",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 129,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783541747907-nv3v",
|
||||||
|
"timestamp": "2026-07-08T20:15:47.907Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/Zone/listzone",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/Zone/listzone",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 17,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783541747889-9c69",
|
||||||
|
"timestamp": "2026-07-08T20:15:47.889Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/DomainInfo/list_domains",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/DomainInfo/list_domains",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 18,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783541747870-m4zr",
|
||||||
|
"timestamp": "2026-07-08T20:15:47.870Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/DNS/list_zones",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/DNS/list_zones",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 19,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783541745079-eg1s",
|
||||||
|
"timestamp": "2026-07-08T20:15:45.079Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/Zone/listzone",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/Zone/listzone",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 17,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783541745061-d3at",
|
||||||
|
"timestamp": "2026-07-08T20:15:45.061Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/DomainInfo/list_domains",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/DomainInfo/list_domains",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 20,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783541745040-9wuc",
|
||||||
|
"timestamp": "2026-07-08T20:15:45.040Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/DNS/list_zones",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/DNS/list_zones",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 54,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783541707412-2o3y",
|
||||||
|
"timestamp": "2026-07-08T20:15:07.412Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/Zone/listzone",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/Zone/listzone",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 18,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783541707393-f65t",
|
||||||
|
"timestamp": "2026-07-08T20:15:07.393Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/DomainInfo/list_domains",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/DomainInfo/list_domains",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 18,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783541707374-o0hh",
|
||||||
|
"timestamp": "2026-07-08T20:15:07.374Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/DNS/list_zones",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/DNS/list_zones",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 54,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783541707287-omi7",
|
||||||
|
"timestamp": "2026-07-08T20:15:07.287Z",
|
||||||
|
"provider": "azure",
|
||||||
|
"operation": "GET /subscriptions/***/providers/Microsoft.Network/dnsZones",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://management.azure.com/subscriptions/***/providers/Microsoft.Network/dnsZones?api-version=2018-05-01",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 586,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783541669292-5yfo",
|
||||||
|
"timestamp": "2026-07-08T20:14:29.292Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/Zone/listzone",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/Zone/listzone",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 17,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783541669273-tv9i",
|
||||||
|
"timestamp": "2026-07-08T20:14:29.273Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/DomainInfo/list_domains",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/DomainInfo/list_domains",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 18,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783541669253-oytd",
|
||||||
|
"timestamp": "2026-07-08T20:14:29.253Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/DNS/list_zones",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/DNS/list_zones",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 74,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783541597125-af09",
|
||||||
|
"timestamp": "2026-07-08T20:13:17.125Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/Zone/listzone",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/Zone/listzone",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 18,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783541597106-ct16",
|
||||||
|
"timestamp": "2026-07-08T20:13:17.106Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/DomainInfo/list_domains",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/DomainInfo/list_domains",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 19,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783541597084-mqnn",
|
||||||
|
"timestamp": "2026-07-08T20:13:17.084Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/DNS/list_zones",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/DNS/list_zones",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 76,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783541489736-os41",
|
||||||
|
"timestamp": "2026-07-08T20:11:29.736Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/Zone/listzone",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/Zone/listzone",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 17,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783541489718-uirv",
|
||||||
|
"timestamp": "2026-07-08T20:11:29.718Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/DomainInfo/list_domains",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/DomainInfo/list_domains",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 18,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1783541489697-c9bo",
|
||||||
|
"timestamp": "2026-07-08T20:11:29.697Z",
|
||||||
|
"provider": "cpanel",
|
||||||
|
"operation": "GET /execute/DNS/list_zones",
|
||||||
|
"method": "GET",
|
||||||
|
"url": "https://cpsrv32.misshosting.com/execute/DNS/list_zones",
|
||||||
|
"status": 200,
|
||||||
|
"latency": 58,
|
||||||
|
"ok": true,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "1780770465729-72o2",
|
"id": "1780770465729-72o2",
|
||||||
"timestamp": "2026-06-06T18:27:45.730Z",
|
"timestamp": "2026-06-06T18:27:45.730Z",
|
||||||
|
|||||||
@@ -73,9 +73,13 @@ async function parseResponse(res, debug = false) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
const envelope = JSON.parse(text);
|
const envelope = JSON.parse(text);
|
||||||
if (debug) console.log('[cpanel] full envelope:', JSON.stringify(envelope, null, 2));
|
|
||||||
if (res.status >= 400) throw new Error(`cPanel HTTP ${res.status}`);
|
if (res.status >= 400) throw new Error(`cPanel HTTP ${res.status}`);
|
||||||
|
|
||||||
|
// Imunify360 / WAF blocks return a flat { message: "..." } with HTTP 200
|
||||||
|
if (envelope.message && !envelope.result) {
|
||||||
|
throw new Error(`cPanel blocked: ${envelope.message}`);
|
||||||
|
}
|
||||||
|
|
||||||
// UAPI wraps the payload in result{} but some installs omit it
|
// UAPI wraps the payload in result{} but some installs omit it
|
||||||
const result = envelope.result ?? envelope;
|
const result = envelope.result ?? envelope;
|
||||||
const statusVal = result.status ?? result.result;
|
const statusVal = result.status ?? result.result;
|
||||||
@@ -166,7 +170,6 @@ async function listZones() {
|
|||||||
const main = info.main_domain ? [info.main_domain] : [];
|
const main = info.main_domain ? [info.main_domain] : [];
|
||||||
const addon = Array.isArray(info.addon_domains) ? info.addon_domains : [];
|
const addon = Array.isArray(info.addon_domains) ? info.addon_domains : [];
|
||||||
const parked = Array.isArray(info.parked_domains) ? info.parked_domains : [];
|
const parked = Array.isArray(info.parked_domains) ? info.parked_domains : [];
|
||||||
// sub_domains are sub.domain.tld — only include the apex, not subs
|
|
||||||
domains = [...new Set([...main, ...addon, ...parked])].filter(Boolean);
|
domains = [...new Set([...main, ...addon, ...parked])].filter(Boolean);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -183,7 +186,9 @@ async function listZones() {
|
|||||||
return raw.replace(/\.$/, '');
|
return raw.replace(/\.$/, '');
|
||||||
}).filter(Boolean);
|
}).filter(Boolean);
|
||||||
}
|
}
|
||||||
} catch { /* ignore */ }
|
} catch (err) {
|
||||||
|
console.log('[cpanel] Zone::listzone unavailable:', err.message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return domains.map(d => ({ id: d, name: d }));
|
return domains.map(d => ({ id: d, name: d }));
|
||||||
|
|||||||
Reference in New Issue
Block a user