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

Function _rate_limit_hit

Scripts/ButSystem.py:10179–10193  ·  view source on GitHub ↗

Sliding-window rate limiter stored in memory for this process. Used for abusive login / signup / recovery / admin bursts.

(bucket: str, ident: str, limit: int, window_sec: int)

Source from the content-addressed store, hash-verified

10177 setServer((I18N.serverAnalyzing || 'SERVER: ANALYZING'));
10178 let faceCount = 0;
10179 for (const landmarks of faces) {
10180 faceCount++;
10181 const xs = landmarks.map(p => p.x), ys = landmarks.map(p => p.y);
10182 const minX = Math.max(0, Math.min(...xs) - 0.04), maxX = Math.min(1, Math.max(...xs) + 0.04);
10183 const minY = Math.max(0, Math.min(...ys) - 0.06), maxY = Math.min(1, Math.max(...ys) + 0.06);
10184 currentFaceBoxes.push({
10185 x: Math.round(minX * canvasEl.width), y: Math.round(minY * canvasEl.height),
10186 width: Math.round((maxX - minX) * canvasEl.width), height: Math.round((maxY - minY) * canvasEl.height)
10187 });
10188
10189 if (typeof drawConnectors !== 'undefined' && typeof drawLandmarks !== 'undefined') {
10190 try{ drawConnectors(ctx, landmarks, FACEMESH_TESSELATION, {color: '#B57EDC44', lineWidth: 0.5}); }catch(e){}
10191 try{ drawConnectors(ctx, landmarks, FACEMESH_FACE_OVAL, {color: '#B57EDC', lineWidth: 1.5}); }catch(e){}
10192 try{ drawConnectors(ctx, landmarks, FACEMESH_RIGHT_EYEBROW, {color: '#B57EDC', lineWidth: 1.5}); }catch(e){}
10193 try{ drawConnectors(ctx, landmarks, FACEMESH_LEFT_EYEBROW, {color: '#B57EDC', lineWidth: 1.5}); }catch(e){}
10194 try{ drawConnectors(ctx, landmarks, FACEMESH_RIGHT_EYE, {color: '#B57EDC', lineWidth: 1.5}); }catch(e){}
10195 try{ drawConnectors(ctx, landmarks, FACEMESH_LEFT_EYE, {color: '#B57EDC', lineWidth: 1.5}); }catch(e){}
10196 try{ drawConnectors(ctx, landmarks, FACEMESH_LIPS, {color: '#B57EDC', lineWidth: 1.5}); }catch(e){}

Callers 3

loginFunction · 0.70
signupFunction · 0.70
recoverFunction · 0.70

Calls 1

_rl_keyFunction · 0.70

Tested by

no test coverage detected