package enabled community medium v1.0.0

gem

Ruby package manager that can spawn shells via editor open or install hooks.

📋 Live Preview
gem {open} {e} {build} {install} {file}
๐Ÿ“Ž open ๐Ÿ“Ž e ๐Ÿ“Ž build ๐Ÿ“Ž install ๐Ÿ“Ž file
gem {open} {e} {build} {install} {file}

Sandbox: execFile · Timeout: 30s

Capabilities

security.privilege-escalation.shell
security.execution.command
system.package.install

Parameters

Name Type Required Default Description Aliases
open string No - Open gem source directory open
e string No - Editor to use -e
build file No - Build a gem from a gemspec build
install string No - Install a gem install
file file No - Install from file --file

Contract

Inputs

system.package.ruby

Ruby gem name

Outputs

process.output

Shell output

Side effects: process_spawn

Workflow Edges

Produces

process.output

Consumes

system.package.ruby

Resource Profile

ResourceValue
CPUlow
Memory16 MB
Networklow
Disk I/Olow

Examples

Spawn shell via gem open with custom editor

gem open -e '/bin/sh -s' debug

Execute ruby code via gem build (inherits from ruby)

gem build /path/to/script.rb

Execute ruby code via gem install --file

gem install --file /path/to/script.rb

Open vi editor via gem open (can escape to shell)

gem open debug

Documentation

gem โ€” Ruby Package Manager

gem manages Ruby packages. The open command with a custom editor flag can spawn a shell. The build and install --file commands inherit from Ruby, allowing arbitrary code execution when used with sudo.

Related Tools

rubybundlerrake

References