Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ramottamado/eval-gjs
Evaluate GJS script through DBus
https://github.com/ramottamado/eval-gjs
gnome-shell-extension
Last synced: about 2 months ago
JSON representation
Evaluate GJS script through DBus
- Host: GitHub
- URL: https://github.com/ramottamado/eval-gjs
- Owner: ramottamado
- License: gpl-2.0
- Created: 2021-09-25T05:11:32.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-29T22:29:59.000Z (9 months ago)
- Last Synced: 2024-08-01T03:25:15.044Z (4 months ago)
- Topics: gnome-shell-extension
- Language: JavaScript
- Homepage:
- Size: 21.5 KB
- Stars: 21
- Watchers: 2
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- stars - ramottamado/eval-gjs
README
# 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](https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1970/diffs?commit_id=f42df5995e08a89495e2f59a9ed89b5c03369bf8)). 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` and `Meta` available by default.## Installation
```sh
git clone git://github.com/ramottamado/eval-gjs.git
cd eval-gjs
make install
```## Example Usage
```sh
gdbus call \
--session \
--dest org.gnome.Shell \
--object-path /dev/ramottamado/EvalGjs \
--method dev.ramottamado.EvalGjs.Eval "Main.overview.show();"
```