The base branch ramottamado/eval-gjs:main has new changes
2025-01-01 19:44:02 +01:00
2022-11-07 08:52:37 +07:00
2021-09-25 12:11:01 +07:00
2025-01-01 19:44:02 +01:00

POTENTIAL SECURITY BREACH

This extension enables arbitrary code execution via Eval() dbus method. This means when you enable this extension, malicious apps, extensions or scripts can call the said dbus method and run malicious GJS codes on your machine.

The extension at https://extensions.gnome.org/extension/5952/eval-gjs/ was not uploaded nor maintained by me. Please refrain from installing this extension at all.

Legacy Version (GNOME 41-44)

For the legacy version, check out the legacy branch first before installing.

Eval GJS GNOME Shell Extension

As of GNOME 41, the dbus method Eval() is now restricted with MetaContext:unsafe-mode property (see this commit). This extension provides unrestricted Eval() dbus method for running arbitrary code in the compositor.

Features

  • Run arbitrary GJS code like you would with GNOME Eval() dbus method.
  • Main, Gio, GLib,Meta and Shell available by default.

Installation

git clone git@github.com:0xFEEDC0DE64/eval-gjs.git
cd eval-gjs
make install

Example Usage

gdbus call \
  --session \
  --dest org.gnome.Shell \
  --object-path /dev/ramottamado/EvalGjs \
  --method dev.ramottamado.EvalGjs.Eval "Main.overview.show();"
Description
Evaluate GJS script through DBus
Readme GPL-2.0 61 KiB
Languages
JavaScript 92.6%
Makefile 7.4%