rcdebug 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rcdebug/__init__.py +7 -0
- rcdebug/cli.py +475 -0
- rcdebug/client_bridge.py +776 -0
- rcdebug/data/flaws_120000.txt +4 -0
- rcdebug/data/luau_debugger_pack_120.json +1202 -0
- rcdebug/debugger_pack.py +115 -0
- rcdebug/exporter.py +135 -0
- rcdebug/flaw_catalog.py +650 -0
- rcdebug/github_harvester.py +181 -0
- rcdebug/learner.py +745 -0
- rcdebug/luau_payload.py +505 -0
- rcdebug/mcp_inspector.py +796 -0
- rcdebug/models.py +146 -0
- rcdebug/terminal.py +161 -0
- rcdebug-1.0.0.dist-info/METADATA +171 -0
- rcdebug-1.0.0.dist-info/RECORD +20 -0
- rcdebug-1.0.0.dist-info/WHEEL +5 -0
- rcdebug-1.0.0.dist-info/entry_points.txt +2 -0
- rcdebug-1.0.0.dist-info/licenses/LICENSE +21 -0
- rcdebug-1.0.0.dist-info/top_level.txt +1 -0
rcdebug/models.py
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Data models for rcdebug findings, telemetry snapshots, and audit sessions.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from dataclasses import dataclass, field
|
|
8
|
+
from datetime import datetime
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
SEVERITY_ORDER = {
|
|
13
|
+
"INFO": 1,
|
|
14
|
+
"WARN": 2,
|
|
15
|
+
"CRITICAL": 3,
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
SeverityFilter = str | set[str] | frozenset[str] | tuple[str, ...] | list[str] | None
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def normalize_severity(sev: str) -> str:
|
|
23
|
+
upper = (sev or "INFO").strip().upper()
|
|
24
|
+
if upper in ("CRITICAL", "CRIT", "HIGH", "ERROR"):
|
|
25
|
+
return "CRITICAL"
|
|
26
|
+
if upper in ("WARN", "WARNING", "MEDIUM"):
|
|
27
|
+
return "WARN"
|
|
28
|
+
return "INFO"
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def normalize_filter_set(filter_level: SeverityFilter) -> frozenset[str] | None:
|
|
32
|
+
if not filter_level:
|
|
33
|
+
return None
|
|
34
|
+
if isinstance(filter_level, str):
|
|
35
|
+
return frozenset({normalize_severity(filter_level)})
|
|
36
|
+
levels = frozenset(normalize_severity(item) for item in filter_level if item)
|
|
37
|
+
return levels or None
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def format_filter_label(filter_level: SeverityFilter) -> str:
|
|
41
|
+
levels = normalize_filter_set(filter_level)
|
|
42
|
+
if not levels:
|
|
43
|
+
return "ALL (CRITICAL, WARN, INFO)"
|
|
44
|
+
ordered = sorted(levels, key=lambda s: -SEVERITY_ORDER.get(s, 0))
|
|
45
|
+
return ", ".join(ordered)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def matches_filter(severity: str, filter_level: SeverityFilter) -> bool:
|
|
49
|
+
"""
|
|
50
|
+
Returns True if `severity` should be displayed under `filter_level`.
|
|
51
|
+
If `filter_level` is None/empty, all severities are shown.
|
|
52
|
+
Accepts a single severity string or a collection of severities (e.g. {'CRITICAL', 'WARN'}).
|
|
53
|
+
"""
|
|
54
|
+
levels = normalize_filter_set(filter_level)
|
|
55
|
+
if not levels:
|
|
56
|
+
return True
|
|
57
|
+
return normalize_severity(severity) in levels
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
@dataclass
|
|
61
|
+
class Finding:
|
|
62
|
+
severity: str
|
|
63
|
+
title: str
|
|
64
|
+
path: str
|
|
65
|
+
flaw: str
|
|
66
|
+
abuse: str
|
|
67
|
+
fix: str
|
|
68
|
+
category: str = "General"
|
|
69
|
+
code_example: str = ""
|
|
70
|
+
timestamp: str = field(default_factory=lambda: datetime.now().strftime("%H:%M:%S"))
|
|
71
|
+
metadata: dict[str, Any] = field(default_factory=dict)
|
|
72
|
+
rank: int = 999999
|
|
73
|
+
confidence: float = 1.0
|
|
74
|
+
|
|
75
|
+
def __post_init__(self) -> None:
|
|
76
|
+
self.severity = normalize_severity(self.severity)
|
|
77
|
+
|
|
78
|
+
def sort_key(self) -> tuple[int, int, float, str]:
|
|
79
|
+
return (-SEVERITY_ORDER.get(self.severity, 0), self.rank, -self.confidence, self.title)
|
|
80
|
+
|
|
81
|
+
def to_dict(self) -> dict[str, Any]:
|
|
82
|
+
return {
|
|
83
|
+
"severity": self.severity,
|
|
84
|
+
"title": self.title,
|
|
85
|
+
"path": self.path,
|
|
86
|
+
"flaw": self.flaw,
|
|
87
|
+
"abuse": self.abuse,
|
|
88
|
+
"fix": self.fix,
|
|
89
|
+
"category": self.category,
|
|
90
|
+
"code_example": self.code_example,
|
|
91
|
+
"timestamp": self.timestamp,
|
|
92
|
+
"metadata": self.metadata,
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
@dataclass
|
|
97
|
+
class MemorySnapshot:
|
|
98
|
+
timestamp: str
|
|
99
|
+
elapsed_sec: float
|
|
100
|
+
workspace_instances: int
|
|
101
|
+
player_instances: int
|
|
102
|
+
total_memory_mb: float
|
|
103
|
+
class_breakdown: dict[str, int] = field(default_factory=dict)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
@dataclass
|
|
107
|
+
class RemoteTrafficStat:
|
|
108
|
+
remote_path: str
|
|
109
|
+
remote_type: str
|
|
110
|
+
total_calls: int = 0
|
|
111
|
+
peak_rate_per_sec: float = 0.0
|
|
112
|
+
last_rate_per_sec: float = 0.0
|
|
113
|
+
has_cooldown_warning: bool = False
|
|
114
|
+
last_payload_preview: str = ""
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
@dataclass
|
|
118
|
+
class AuditSession:
|
|
119
|
+
mode: str # "client" or "server"
|
|
120
|
+
started_at: str = field(default_factory=lambda: datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
|
|
121
|
+
target_name: str = "Roblox Studio"
|
|
122
|
+
findings: list[Finding] = field(default_factory=list)
|
|
123
|
+
memory_snapshots: list[MemorySnapshot] = field(default_factory=list)
|
|
124
|
+
remote_traffic: dict[str, RemoteTrafficStat] = field(default_factory=dict)
|
|
125
|
+
|
|
126
|
+
def add_finding(self, finding: Finding) -> bool:
|
|
127
|
+
"""
|
|
128
|
+
Adds a finding if an identical (title, path) isn't already recorded
|
|
129
|
+
(unless it's a live rate-limit/memory spike event).
|
|
130
|
+
Returns True if added.
|
|
131
|
+
"""
|
|
132
|
+
for existing in self.findings:
|
|
133
|
+
if (
|
|
134
|
+
existing.title == finding.title
|
|
135
|
+
and existing.path == finding.path
|
|
136
|
+
and finding.category not in ("MemoryDiff", "RemoteTraffic")
|
|
137
|
+
):
|
|
138
|
+
return False
|
|
139
|
+
self.findings.append(finding)
|
|
140
|
+
return True
|
|
141
|
+
|
|
142
|
+
def counts_by_severity(self) -> dict[str, int]:
|
|
143
|
+
counts = {"CRITICAL": 0, "WARN": 0, "INFO": 0}
|
|
144
|
+
for f in self.findings:
|
|
145
|
+
counts[f.severity] = counts.get(f.severity, 0) + 1
|
|
146
|
+
return counts
|
rcdebug/terminal.py
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Rich ANSI terminal rendering, dashboard widgets, and macOS clipboard helpers.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
import shutil
|
|
8
|
+
import subprocess
|
|
9
|
+
import sys
|
|
10
|
+
from datetime import datetime
|
|
11
|
+
|
|
12
|
+
from .models import AuditSession, Finding, MemorySnapshot, SeverityFilter, format_filter_label, matches_filter
|
|
13
|
+
|
|
14
|
+
# ANSI Color & Style Codes
|
|
15
|
+
CYAN = "\033[96m"
|
|
16
|
+
GREEN = "\033[92m"
|
|
17
|
+
YELLOW = "\033[93m"
|
|
18
|
+
RED = "\033[91m"
|
|
19
|
+
MAGENTA = "\033[95m"
|
|
20
|
+
BLUE = "\033[94m"
|
|
21
|
+
WHITE = "\033[97m"
|
|
22
|
+
BOLD = "\033[1m"
|
|
23
|
+
DIM = "\033[2m"
|
|
24
|
+
RESET = "\033[0m"
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def severity_color(severity: str) -> str:
|
|
28
|
+
sev = severity.upper()
|
|
29
|
+
if sev == "CRITICAL":
|
|
30
|
+
return RED
|
|
31
|
+
if sev == "WARN":
|
|
32
|
+
return YELLOW
|
|
33
|
+
return CYAN
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def severity_badge(severity: str) -> str:
|
|
37
|
+
sev = severity.upper()
|
|
38
|
+
color = severity_color(sev)
|
|
39
|
+
return f"{BOLD}{color}[{sev}]{RESET}"
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def copy_to_clipboard(text: str) -> bool:
|
|
43
|
+
"""Copy text to the macOS clipboard via pbcopy."""
|
|
44
|
+
if not shutil.which("pbcopy"):
|
|
45
|
+
return False
|
|
46
|
+
try:
|
|
47
|
+
subprocess.run(
|
|
48
|
+
["pbcopy"],
|
|
49
|
+
input=text.encode("utf-8"),
|
|
50
|
+
check=True,
|
|
51
|
+
stdout=subprocess.DEVNULL,
|
|
52
|
+
stderr=subprocess.DEVNULL,
|
|
53
|
+
)
|
|
54
|
+
return True
|
|
55
|
+
except Exception:
|
|
56
|
+
return False
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def print_banner(mode_title: str, subtitle: str = "") -> None:
|
|
60
|
+
width = 74
|
|
61
|
+
border = "═" * width
|
|
62
|
+
print(f"\n{BOLD}{CYAN}╔{border}╗{RESET}")
|
|
63
|
+
title_line = f" rcdebug v1.0.0 — Revan Cool Debugger ({mode_title})"
|
|
64
|
+
pad = max(0, width - len(title_line))
|
|
65
|
+
print(f"{BOLD}{CYAN}║{WHITE}{title_line}{' ' * pad}{CYAN}║{RESET}")
|
|
66
|
+
if subtitle:
|
|
67
|
+
sub_line = f" {subtitle}"
|
|
68
|
+
sub_pad = max(0, width - len(sub_line))
|
|
69
|
+
print(f"{BOLD}{CYAN}║{DIM}{WHITE}{sub_line}{' ' * sub_pad}{RESET}{BOLD}{CYAN}║{RESET}")
|
|
70
|
+
print(f"{BOLD}{CYAN}╚{border}╝{RESET}")
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def print_finding(finding: Finding, filter_level: SeverityFilter = None) -> None:
|
|
74
|
+
if not matches_filter(finding.severity, filter_level):
|
|
75
|
+
return
|
|
76
|
+
|
|
77
|
+
badge = severity_badge(finding.severity)
|
|
78
|
+
cat_tag = f"{MAGENTA}[{finding.category}]{RESET} " if finding.category else ""
|
|
79
|
+
print(f"\n{badge} {cat_tag}{BOLD}{WHITE}{finding.title}{RESET} {DIM}({finding.timestamp}){RESET}")
|
|
80
|
+
print(f" {BOLD}Instance:{RESET} {CYAN}{finding.path}{RESET}")
|
|
81
|
+
print(f" {BOLD}Flaw:{RESET} {finding.flaw}")
|
|
82
|
+
print(f" {BOLD}Abuse:{RESET} {YELLOW}{finding.abuse}{RESET}")
|
|
83
|
+
print(f" {GREEN}{BOLD}Fix:{RESET} {finding.fix}")
|
|
84
|
+
if finding.code_example:
|
|
85
|
+
print(f" {DIM}Example Server Pattern:{RESET}")
|
|
86
|
+
for line in finding.code_example.strip().splitlines():
|
|
87
|
+
print(f" {DIM}{GREEN}{line}{RESET}")
|
|
88
|
+
print(f"{DIM}{'─' * 74}{RESET}")
|
|
89
|
+
sys.stdout.flush()
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def print_memory_diff(prev: MemorySnapshot | None, curr: MemorySnapshot) -> None:
|
|
93
|
+
if prev is None:
|
|
94
|
+
print(
|
|
95
|
+
f"\n{BOLD}{BLUE}[TELEMETRY]{RESET} {DIM}({curr.timestamp}){RESET} "
|
|
96
|
+
f"Baseline Snapshot — Workspace: {BOLD}{curr.workspace_instances}{RESET} inst | "
|
|
97
|
+
f"Players: {BOLD}{curr.player_instances}{RESET} inst | "
|
|
98
|
+
f"Memory: {BOLD}{curr.total_memory_mb:.1f} MB{RESET}"
|
|
99
|
+
)
|
|
100
|
+
return
|
|
101
|
+
|
|
102
|
+
ws_diff = curr.workspace_instances - prev.workspace_instances
|
|
103
|
+
pl_diff = curr.player_instances - prev.player_instances
|
|
104
|
+
mem_diff = curr.total_memory_mb - prev.total_memory_mb
|
|
105
|
+
|
|
106
|
+
ws_str = f"{ws_diff:+d}"
|
|
107
|
+
pl_str = f"{pl_diff:+d}"
|
|
108
|
+
mem_str = f"{mem_diff:+.2f} MB"
|
|
109
|
+
|
|
110
|
+
ws_col = RED if ws_diff > 150 else (YELLOW if ws_diff > 40 else GREEN)
|
|
111
|
+
mem_col = RED if mem_diff > 25.0 else (YELLOW if mem_diff > 8.0 else GREEN)
|
|
112
|
+
|
|
113
|
+
print(
|
|
114
|
+
f"\n{BOLD}{BLUE}[INSTANCE & MEMORY DIFF]{RESET} {DIM}({curr.timestamp}){RESET} "
|
|
115
|
+
f"Workspace: {BOLD}{curr.workspace_instances}{RESET} ({ws_col}{ws_str}{RESET}) | "
|
|
116
|
+
f"Players: {BOLD}{curr.player_instances}{RESET} ({pl_str}) | "
|
|
117
|
+
f"Memory: {BOLD}{curr.total_memory_mb:.1f} MB{RESET} ({mem_col}{mem_str}{RESET})"
|
|
118
|
+
)
|
|
119
|
+
sys.stdout.flush()
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def print_remote_traffic_update(remote_path: str, rate_per_sec: float, total_calls: int) -> None:
|
|
123
|
+
color = RED if rate_per_sec >= 30.0 else (YELLOW if rate_per_sec >= 12.0 else CYAN)
|
|
124
|
+
print(
|
|
125
|
+
f"{BOLD}{MAGENTA}[REMOTE PROFILER]{RESET} {CYAN}{remote_path}{RESET} -> "
|
|
126
|
+
f"{color}{BOLD}{rate_per_sec:.1f} calls/sec{RESET} (total: {total_calls})"
|
|
127
|
+
)
|
|
128
|
+
sys.stdout.flush()
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
def print_session_summary(session: AuditSession, filter_level: SeverityFilter = None) -> None:
|
|
132
|
+
counts = session.counts_by_severity()
|
|
133
|
+
total = len(session.findings)
|
|
134
|
+
print(f"\n{BOLD}{CYAN}═══════════════════════ AUDIT SESSION SUMMARY ═══════════════════════{RESET}")
|
|
135
|
+
print(f" {BOLD}Mode:{RESET} {session.mode.upper()}")
|
|
136
|
+
print(f" {BOLD}Target:{RESET} {session.target_name}")
|
|
137
|
+
print(f" {BOLD}Started At:{RESET} {session.started_at}")
|
|
138
|
+
if filter_level:
|
|
139
|
+
print(f" {BOLD}Active Filter:{RESET} {normalize_filter_label(filter_level)}")
|
|
140
|
+
print(
|
|
141
|
+
f" {BOLD}Findings:{RESET} {total} total — "
|
|
142
|
+
f"{RED}{BOLD}{counts.get('CRITICAL', 0)} CRITICAL{RESET}, "
|
|
143
|
+
f"{YELLOW}{BOLD}{counts.get('WARN', 0)} WARN{RESET}, "
|
|
144
|
+
f"{CYAN}{BOLD}{counts.get('INFO', 0)} INFO{RESET}"
|
|
145
|
+
)
|
|
146
|
+
if session.memory_snapshots:
|
|
147
|
+
first = session.memory_snapshots[0]
|
|
148
|
+
last = session.memory_snapshots[-1]
|
|
149
|
+
ws_delta = last.workspace_instances - first.workspace_instances
|
|
150
|
+
mem_delta = last.total_memory_mb - first.total_memory_mb
|
|
151
|
+
print(
|
|
152
|
+
f" {BOLD}Snapshots:{RESET} {len(session.memory_snapshots)} recorded "
|
|
153
|
+
f"(Δ Workspace: {ws_delta:+d} instances, Δ Memory: {mem_delta:+.2f} MB)"
|
|
154
|
+
)
|
|
155
|
+
if session.remote_traffic:
|
|
156
|
+
print(f" {BOLD}Remotes Tracked:{RESET} {len(session.remote_traffic)} endpoints profiled")
|
|
157
|
+
print(f"{BOLD}{CYAN}═════════════════════════════════════════════════════════════════════{RESET}\n")
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
def normalize_filter_label(filter_level: SeverityFilter) -> str:
|
|
161
|
+
return format_filter_label(filter_level)
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: rcdebug
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Revan Cool Debugger - macOS CLI developer and security-auditing tool for Roblox Studio (Runtime Bridge & MCP Inspector)
|
|
5
|
+
Author: Revan
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/roulettegun/rcdebug
|
|
8
|
+
Project-URL: Repository, https://github.com/roulettegun/rcdebug.git
|
|
9
|
+
Project-URL: Issues, https://github.com/roulettegun/rcdebug/issues
|
|
10
|
+
Project-URL: Releases, https://github.com/roulettegun/rcdebug/releases
|
|
11
|
+
Keywords: roblox,luau,security,audit,mcp,debugger,studio
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Environment :: MacOS X
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Operating System :: MacOS
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Topic :: Security
|
|
24
|
+
Classifier: Topic :: Software Development :: Debuggers
|
|
25
|
+
Requires-Python: >=3.10
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
Dynamic: license-file
|
|
29
|
+
|
|
30
|
+
# rcdebug
|
|
31
|
+
|
|
32
|
+
[](https://www.python.org/)
|
|
33
|
+
[](https://github.com/roulettegun/rcdebug)
|
|
34
|
+
[](rcdebug/data/flaws_120000.txt)
|
|
35
|
+
[](rcdebug/data/luau_debugger_pack_120.json)
|
|
36
|
+
[](pyproject.toml)
|
|
37
|
+
|
|
38
|
+
`rcdebug` (Revan Cool Debugger) is a macOS command-line debugger and security auditor for Roblox games. It finds exposed remotes, unanchored parts that leak network ownership, replicated player stats, memory spikes, and server script vulnerabilities.
|
|
39
|
+
|
|
40
|
+
It runs on Python's standard library with zero external packages.
|
|
41
|
+
|
|
42
|
+

|
|
43
|
+
|
|
44
|
+

|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Install
|
|
49
|
+
|
|
50
|
+
### Option 1: Install via `pip` directly from GitHub
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pip install git+https://github.com/roulettegun/rcdebug.git
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Or install the pre-built release wheel from GitHub Releases:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
pip install https://github.com/roulettegun/rcdebug/releases/download/v1.0.0/rcdebug-1.0.0-py3-none-any.whl
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Option 2: Clone & Link Locally
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
git clone https://github.com/roulettegun/rcdebug.git
|
|
66
|
+
cd rcdebug
|
|
67
|
+
pip install -e .
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Quick Start
|
|
73
|
+
|
|
74
|
+
### 1. Live Game / Client Audit (`--client`)
|
|
75
|
+
|
|
76
|
+
Run `rcdebug` in your terminal:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
rcdebug
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
What happens:
|
|
83
|
+
1. Starts a local listener on `127.0.0.1:8765` (if port `8765` is used by MacSploit or another process, it automatically switches to `8766`).
|
|
84
|
+
2. Copies the 100% client-sided Luau scanner to your macOS clipboard (`pbcopy`).
|
|
85
|
+
3. Tails `~/Library/Logs/Roblox/*_last.log` in real time so findings still stream to your terminal even when Roblox blocks `HttpService:PostAsync` on the client.
|
|
86
|
+
|
|
87
|
+
Paste (`Cmd+V`) the copied script into your executor, Roblox Developer Console, or Studio Command Bar.
|
|
88
|
+
|
|
89
|
+
### 2. Static Place & Studio MCP Audit (`--server`)
|
|
90
|
+
|
|
91
|
+
Scan local `.luau` / `.lua` scripts, `.rbxlx` / `.rbxmx` place files, or an open Roblox Studio session over MCP:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# Scan a local folder or .rbxlx place file
|
|
95
|
+
rcdebug --server --place ./src --export audit.md
|
|
96
|
+
|
|
97
|
+
# Connect to Roblox Studio MCP
|
|
98
|
+
rcdebug --server
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Commands & Flags
|
|
104
|
+
|
|
105
|
+
| Command | What it does |
|
|
106
|
+
| :--- | :--- |
|
|
107
|
+
| `rcdebug` or `rcdebug --client` | Start the live client bridge, copy the Luau scanner, and tail Roblox logs. |
|
|
108
|
+
| `rcdebug --server` | Audit an active Roblox Studio MCP session or a local `--place <path>`. |
|
|
109
|
+
| `rcdebug --catalog [query]` | Search the 120,000-flaw database (`RCD-000001` to `RCD-120000`). |
|
|
110
|
+
| `rcdebug --pack [query]` | Search the 120 Luau debugger probes (`LDP-001` to `LDP-120`). |
|
|
111
|
+
| `rcdebug --learn [path]` | Learn custom remote, attribute, and folder names from a place or recent logs. |
|
|
112
|
+
| `rcdebug --learn --github [query]` | Pull public Luau scripts from GitHub and train `~/.rcdebug/flaw_brain.json`. |
|
|
113
|
+
| `rcdebug --history` | View terminal command history and learned brain stats. |
|
|
114
|
+
| `rcdebug --watch` | Watch `command_history.json` and Roblox logs in the background. |
|
|
115
|
+
|
|
116
|
+
### Filtering & Exporting
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# Show only CRITICAL findings
|
|
120
|
+
rcdebug --client --critical
|
|
121
|
+
|
|
122
|
+
# Show CRITICAL and WARNING findings
|
|
123
|
+
rcdebug --client --critical --warning
|
|
124
|
+
|
|
125
|
+
# Search the 120,000-flaw catalog for DataStore flaws
|
|
126
|
+
rcdebug --catalog datastore --critical --limit 10
|
|
127
|
+
|
|
128
|
+
# Save a Markdown audit report when you stop the session
|
|
129
|
+
rcdebug --client --export report.md
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## What It Checks
|
|
135
|
+
|
|
136
|
+
- **Remotes (`ReplicatedStorage` & `Workspace`)**: Lists every client-visible `RemoteEvent`, `RemoteFunction`, and `UnreliableRemoteEvent`, ranked by risk (`Admin`, `Economy`, `DataStore`, `Combat`, `Inventory`), plus live `OnClientEvent` call rates (`calls/sec`).
|
|
137
|
+
- **Network Ownership**: Finds unanchored non-character `BasePart` instances in `Workspace` that nearby clients can move locally.
|
|
138
|
+
- **Player & Character State**: Flags `ValueBase` objects (`IntValue`, `NumberValue`, `BoolValue`, `StringValue`), player attributes, and `Tool` configs replicated to the client.
|
|
139
|
+
- **10s Memory & Instance Diffs**: Logs `Workspace` instance count, `LocalPlayer` instance count, and `Stats:GetTotalMemoryUsageMb()` every 10 seconds to spot leaks.
|
|
140
|
+
- **Static Server Checks (`--server`)**: Flags `loadstring()`, numeric `require(assetId)`, hardcoded Discord webhooks, `DataStore:SetAsync` without `UpdateAsync`, `ProcessReceipt` missing `PurchaseId` checks, unguarded `ProximityPrompt.Triggered` / `BasePart.Touched` handlers, and `OnServerEvent` listeners missing `typeof()` or cooldown guards.
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Project Structure
|
|
145
|
+
|
|
146
|
+
```text
|
|
147
|
+
rcdebug/
|
|
148
|
+
├── bin/rcdebug # CLI executable
|
|
149
|
+
├── assets/ # Screenshots
|
|
150
|
+
├── rcdebug/
|
|
151
|
+
│ ├── cli.py # CLI parser and command router
|
|
152
|
+
│ ├── client_bridge.py # Local HTTP/WS listener + macOS Roblox log tailer
|
|
153
|
+
│ ├── luau_payload.py # Client-sided Luau scanner & 10s telemetry script
|
|
154
|
+
│ ├── mcp_inspector.py # Roblox Studio MCP client & static .rbxlx/.luau scanner
|
|
155
|
+
│ ├── flaw_catalog.py # mmap-indexed 120,000-flaw lookup engine
|
|
156
|
+
│ ├── debugger_pack.py # 120 static Luau probes
|
|
157
|
+
│ ├── learner.py # Adaptive pattern learner & command history tracker
|
|
158
|
+
│ ├── github_harvester.py # GitHub Luau pattern harvester (--learn --github)
|
|
159
|
+
│ ├── exporter.py # Markdown report writer (--export)
|
|
160
|
+
│ └── data/
|
|
161
|
+
│ ├── flaws_120000.txt # 120,000 flaw signatures (RCD-000001..RCD-120000)
|
|
162
|
+
│ └── luau_debugger_pack_120.json # 120 Luau probes (LDP-001..LDP-120)
|
|
163
|
+
├── scripts/build_120k_corpus.py # Generator for flaws_120000.txt
|
|
164
|
+
└── tests/test_rcdebug.py # Unit test suite
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Running Tests
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
python3 -m unittest discover -s tests -v
|
|
171
|
+
```
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
rcdebug/__init__.py,sha256=NMcmx9vlOeW-tNs7Pfeo1ffwWz_Fz5OIgW8pqxXJvCk,152
|
|
2
|
+
rcdebug/cli.py,sha256=HI9t_BrRIdQHZZOviMKwb18_4H6rPHsljPFJQlhoZsU,18083
|
|
3
|
+
rcdebug/client_bridge.py,sha256=eG0Eq0HTN9k9XJEStbmPlYbwx36x8le-2bYEpIyOPOk,30601
|
|
4
|
+
rcdebug/debugger_pack.py,sha256=08OxzM_3eWN6_v4bWnvkZiOvVEefrsY9RhBah-4T8z4,3867
|
|
5
|
+
rcdebug/exporter.py,sha256=gQxwBA0jhE8tId6NnXk-NLYMirr25-2am_RFAnPuNWk,4880
|
|
6
|
+
rcdebug/flaw_catalog.py,sha256=ol0yzqWJ1KGllzKcYbU7Yg7IBFLCYwzlpf6_gnaAhvI,28306
|
|
7
|
+
rcdebug/github_harvester.py,sha256=8QM9uO_-3zX96LpcY4WNGKcZ0eXuXGhVGSp-J3hc2yc,6196
|
|
8
|
+
rcdebug/learner.py,sha256=ELpPAyqohiMM4QyaJeS34mTthp4-hOsdkZVz4FypfZs,30926
|
|
9
|
+
rcdebug/luau_payload.py,sha256=tIyjxebqRvxq1xWKa7QalJtHf5A_mplhftBARmhOyQg,22661
|
|
10
|
+
rcdebug/mcp_inspector.py,sha256=WEQxpiT6X-RM0l4Ami4pXkziRQ5okka53jdWKl09kZk,34065
|
|
11
|
+
rcdebug/models.py,sha256=sb9LItl55VtSj_XRTj2mutLxJTVCyAeDUArS-49LQwk,4444
|
|
12
|
+
rcdebug/terminal.py,sha256=KVvXbb2ZQSqqhDANvwQ_ifGyoTHJi7tIuAEfPVv6ylE,6322
|
|
13
|
+
rcdebug/data/flaws_120000.txt,sha256=yK_JP7tQRd1gemMhOyx268-jQa_X8-nAzcqWYT1gBgQ,62527975
|
|
14
|
+
rcdebug/data/luau_debugger_pack_120.json,sha256=s9_XEeNsV84ZGi2honNvTqMGxc7rH8KHyOQAN9lZy48,43784
|
|
15
|
+
rcdebug-1.0.0.dist-info/licenses/LICENSE,sha256=k70rWL4gmeZMmKKyJAk4nrKHJFdwS-32m2gsyKlAgFk,1062
|
|
16
|
+
rcdebug-1.0.0.dist-info/METADATA,sha256=5BY8OaVybWOqnCVYZZcorYBke2adJix1qMD8gVTFF4c,7589
|
|
17
|
+
rcdebug-1.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
18
|
+
rcdebug-1.0.0.dist-info/entry_points.txt,sha256=e6_Xo1b4g4jNKa6xlwiwIApOJq5cCxuSJH9NVHnrcPE,45
|
|
19
|
+
rcdebug-1.0.0.dist-info/top_level.txt,sha256=Cqtgw0rf2ZkPIm8nwUc9_LYufO9Q9GMgEw7ITpgT7Fw,8
|
|
20
|
+
rcdebug-1.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Revan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
rcdebug
|