MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / _host_is_allowed

Function _host_is_allowed

Scripts/ButSystem.py:10256–10272  ·  view source on GitHub ↗
(hostname: str)

Source from the content-addressed store, hash-verified

10254 `${I18N.brows || 'BROWS'} | L:${browLStr} R:${browRStr}`,
10255 `${I18N.mouth || 'MOUTH'} | Wdh:${mouthW.toFixed(1)}% Opn:${mouthOpen.toFixed(2)}%`,
10256 `${I18N.asym || 'ASYM'} | Score: ${totalAsym}%`
10257 ];
10258 ctx.font = 'bold 11px monospace'; ctx.strokeStyle='black'; ctx.lineWidth=2.5; ctx.lineJoin='round';
10259 const blockWidth = 210, blockHeight = lines.length * 16;
10260 let textX = faceLeftPx + 15; if (textX + blockWidth > canvasEl.width) textX = faceRightPx - blockWidth - 15;
10261 textX = Math.max(10, Math.min(textX, canvasEl.width - blockWidth - 10));
10262 let startY = faceTopPx - blockHeight - 10; if (startY < 15) startY = faceTopPx + (faceHeight * canvasEl.height) + 20;
10263 startY = Math.max(15, Math.min(startY, canvasEl.height - blockHeight - 10));
10264 lines.forEach((line, idx) => {
10265 const y = startY + (idx * 16);
10266 ctx.strokeText(line, textX, y);
10267 if (idx === 0) ctx.fillStyle = '#00FFCC';
10268 else if (line.includes(I18N.asym || 'ASYM') && Number(totalAsym) > 5) ctx.fillStyle = '#FF4444';
10269 else ctx.fillStyle = 'white';
10270 ctx.fillText(line, textX, y);
10271 });
10272 ctx.translate(canvasEl.width, 0); ctx.scale(-1, 1);
10273 }
10274 const sourceTag = (sourceMode === 'camera') ? (I18N.live || 'LIVE') : (I18N.upload || 'UPLOAD');
10275 setStatus(`${I18N.analyzing || 'ANALYZING'} ${sourceTag} ${faceCount} FACE(S)`);

Callers 1

_validate_host_headerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected