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

di-interceptor

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

di-interceptor

Intercepts outgoing requests.

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source
interceptor logo

Interceptor

Intercepts outgoing requests. (WebSocket & HTTP Requests)

Wiki

NOTE: This plugin does not intercept the main Discord websocket on startup.


Intercepting WebSocket creations

const interceptor = this.manager.get('Interceptor');
interceptor.on('websocket-intercepted', iee => {
  if(iee.ws.url.includes("dealer.spotify.com")) this.spotifyWS = iee;
  iee.on('data', this.spotifyData);
});

Intercepting HTTP requests

const interceptor = this.manager.get('Interceptor');
interceptor.on('request-open', (url, method, iee) => {
  if(url.includes("spotify.com")) iee.on('data', this.handleSpotifyRequest);
});

Keywords

di-plugin

FAQs

Package last updated on 17 May 2018

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