New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

stb-devtools

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stb-devtools

STB Devtools is a suite of tools built on top of websockets to a backend from a JS environment

latest
npmnpm
Version
0.0.9
Version published
Weekly downloads
505
5.43%
Maintainers
1
Weekly downloads
 
Created
Source

STB Devtools

Tools written in plain Javascript to setup some tools to help work on devices without Webdriver support.

Due to usage of WeakSet for circular JSON detection the browser support is defined fully here: https://caniuse.com/?search=Weakset

Native Browser Support:

  • Chrome 36
  • Firefox 34
  • Safari 9

Setup

Put a <script> tag into your application's HTML that loads client/index.js. This will put the following APIs into the global scope.

Socket Connection (required)

  • createSocket('ws://localhost:3031') Creates a websocket connection to the remote server provided, other features work over this network connection.
  • closeSocket() Closes the websocket connection on the client.

Remote Logger

API:

  • injectConsole() Replaces the console API with sending logs to the socket server.
  • restoreConsole() Restores the console API back to it's original methods.

Remote Control

API:

  • remoteControlOn() Starts broadcasting keyboard events from this browser to all other connected clients, who will dispatch the events as synthetic keyboard events locally automatically.

Temporary File

Client usage

From the client send a command like the below

stbSocket.send(JSON.stringify({command: 'temp-file', data: data }));

Socket Payload:

{
  command: 'temp-file',
  data: 'stringetc'
}

Will be saved to a temporary file using the module tempy.

FAQs

Package last updated on 05 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts