Goal: get php2shell-warn.user.js running in the user's browser. The script is a userscript, so a userscript manager must exist first. Confirm the user wants it installed before touching their browser or profile.
Script source: https://raw.githubusercontent.com/wromansky/php2shell-warn/main/php2shell-warn.user.js
Firefox Android and Safari iOS (Userscripts app) can run the script. Chrome and Brave mobile cannot run extensions: give the user docs/bookmarklet.txt and the steps in install-mobile.md. Never tell the user Chrome or Brave mobile will warn automatically.
- Identify the browser: Chromium family (Chrome, Edge, Brave, Opera, Vivaldi, Arc, Chromium) or Firefox family (Firefox, LibreWolf, Waterfox, Zen, Floorp).
- Check for an installed manager (Violentmonkey, Tampermonkey). If missing, the user must install it from the browser's extension store. Do not sideload extensions without asking.
- Chromium Manifest V3 gate: the manager's Allow User Scripts toggle (Chrome 138+; older: Developer mode) at
<scheme>://extensionsmust be on. Extensions cannot enable this themselves. It is a user action. If you cannot drive the browser, give the user the exact steps frominstall-humans.md.
- Navigate to the script URL. The manager's install page opens.
- Click Install / Confirm installation.
- Open the manager dashboard and confirm
PHP2Shell warningis enabled.
Give the user the script URL and the browser-specific steps from install-humans.md. Do not claim it is installed.
- Chromium:
ExtensionInstallForcelistpolicy for the manager. Scripts still need to be added inside the manager. - Firefox:
policies.jsonExtensionSettingsto force-install the manager from addons.mozilla.org. Same caveat.
- In the dashboard, edit the script and set
const isVulnerable = () => true;. - Load a page whose response includes
X-Powered-By: PHP/<version>. Check withcurl -sI <url> | grep -i -E 'x-powered-by|^server'. - Expect a red banner. Then revert the edit.
- Load a page with no PHP header. Expect no UI and no console errors.
- Do not widen
@matchor@grant. The script needs onlyGM_getValueandGM_setValue. - Do not add network calls to third parties. The only request is a same-URL
HEAD. - Do not mark the install complete until the dashboard shows the script enabled.