Package burp.mcp.util
Class ProjectFiles
java.lang.Object
burp.mcp.util.ProjectFiles
Locates the
.burp file of the current project.
The Montoya API exposes only the project name and id, never the file
path. Burp does record its recent project files in its user-level Java
preferences (burp.suite.recentProjectFilesN paired with
burp.suite.recentProjectNamesN, index 0 = most recent), so the
current project's file can be matched by name.
Everything here is best-effort: a missing key, unreadable preferences backend, relative path, or temporary project yields an empty result and the caller falls back to a temporary socket path.
-
Method Summary
Modifier and TypeMethodDescriptionRead-only lookup backed by Burp's user-level Java preferences.static booleanisUsableSocketPath(Path socketPath) Socket paths must stay under the OSsockaddr_unceiling (~108 bytes on Linux); leave headroom for the trailing NUL.Find the project file forprojectName: the most recent entry whose file basename or recorded project name matches, ignoring a trailing.burpand case.static PathsocketPathFor(Path projectFile) Socket path next to a project file:<dir>/<basename>.sock.
-
Method Details
-
burpPrefLookup
Read-only lookup backed by Burp's user-level Java preferences. -
locate
Find the project file forprojectName: the most recent entry whose file basename or recorded project name matches, ignoring a trailing.burpand case. -
socketPathFor
Socket path next to a project file:<dir>/<basename>.sock. -
isUsableSocketPath
Socket paths must stay under the OSsockaddr_unceiling (~108 bytes on Linux); leave headroom for the trailing NUL.
-