An open API service indexing awesome lists of open source software.

https://github.com/flipeador/node-win32-setwindowband

Example using NodeJS with Frida to call SetWindowBand from `explorer.exe`.
https://github.com/flipeador/node-win32-setwindowband

frida javascript nodejs setwindowband win32 window-bands windows zbid

Last synced: 12 months ago
JSON representation

Example using NodeJS with Frida to call SetWindowBand from `explorer.exe`.

Awesome Lists containing this project

README

          

# Node.js Win32 SetWindowBand

Use [Node.js][node] with [Frida][frida] to call `User32\SetWindowBand` from `explorer.exe`.

See .

## Instructions

Install [pnpm][pnpm], then run the following command in the [Terminal][wt] to install [Node.js][node]:

```sh
# Install the latest version of NodeJS.
pnpm env use latest --global
```

[Clone][clone] this repository to your local computer, open the root directory with [Visual Studio Code][vs].

Run the following command in the [VS Code Terminal][vt] to install all required dependencies:

```sh
# Install all dependencies for the project.
# It will take a while until Frida is compiled.
pnpm install
```

Expand if errors occur during installation of Frida.

> First try 1️⃣, if it still does not work try 2️⃣.
>
> 1️⃣ Update Frida to the latest version.
>
> ```sh
> # Update all dependencies to their latest versions.
> pnpm update --latest
> ```
>
> 2️⃣ Install an older version of [Node.js][node].
>
> ```sh
> # List remotely available Node.js versions.
> pnpm env list --remote
>
> # For example, install v22 if the latest version is v23.
> pnpm env use 22.14.0 --global
>
> # This should trigger the execution again.
> pnpm update frida
> ```

Run the following command in the [VS Code Terminal][vt] to start the script:

```sh
# Run "./src/index.js".
# HWND: A handle to the window.
# BAND: One of the ZBID values.
node . HWND BAND
```

Expand to view a table of ZBID values (window bands).

> | Value | Name |
> | :---: | --- |
> | 0 | ZBID_DEFAULT |
> | 1 | ZBID_DESKTOP |
> | 2 | ZBID_UIACCESS |
> | 3 | ZBID_IMMERSIVE_IHM |
> | 4 | ZBID_IMMERSIVE_NOTIFICATION |
> | 5 | ZBID_IMMERSIVE_APPCHROME |
> | 6 | ZBID_IMMERSIVE_MOGO |
> | 7 | ZBID_IMMERSIVE_EDGY |
> | 8 | ZBID_IMMERSIVE_INACTIVEMOBODY |
> | 9 | ZBID_IMMERSIVE_INACTIVEDOCK |
> 10 | ZBID_IMMERSIVE_ACTIVEMOBODY ||
> | 11 | ZBID_IMMERSIVE_ACTIVEDOCK |
> | 12 | ZBID_IMMERSIVE_BACKGROUND |
> | 13 | ZBID_IMMERSIVE_SEARCH |
> | 14 | ZBID_GENUINE_WINDOWS |
> | 15 | ZBID_IMMERSIVE_RESTRICTED |
> | 16 | ZBID_SYSTEM_TOOLS |
> | 17 | ZBID_LOCK |
> | 18 | ZBID_ABOVELOCK_UX |

[node]: https://nodejs.org
[pnpm]: https://pnpm.io/installation
[frida]: https://frida.re

[vs]: https://code.visualstudio.com
[wt]: https://docs.microsoft.com/windows/terminal
[vt]: https://code.visualstudio.com/docs/terminal/basics

[clone]: https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository