
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Antena is yet an other JavaScript communication library.
Antena normalizes the server-client model for node and browsers.
In Antena, the server is called receptor and its clients are called emitters.
Both receptors and emitters can perform push notifications but only emitters can perform synchronous pull requests.
For node emitters, synchronous pull requests are implemented using https://www.npmjs.com/package/posix-socket
which is much faster than using the synchronous methods of child_process
and fs
.
receptor.onpush = (session, message) => {
receptor.push(session, message+"World");
};
receptor.onpull = (session, message, callback) => {
callback(message+"World!!!");
};
emitter.push("Hello");
emitter.onpush = (message) => {
console.log(message); // prints HelloWorld
};
console.log(emitter.pull("Hello")); // prints HelloWorld!!!
const server = require("net").createServer();
server.on("connection", receptor.ConnectionListener());
const server = require("http").createServer();
const onrequest = receptor.RequestMiddleware();
server.on("request", (request, response) => {
if (!onrequest(request, response)) {
// handle request
}
});
const onupgrade = receptor.UpgradeMiddleware();
server.on("upgrade", (request, socket, head) => {
if (!onupgrade(request, socket, head) {
// handle upgrade
}
});
const server = require("http").createServer();
const onrequest = receptor.RequestMiddleware();
server.on("request", (request, response) => {
onrequest(request, response, () => {
// handle request
});
});
const onupgrade = receptor.UpgradeMiddleware();
server.on("upgrade", (request, socket, head) => {
onupgrade(request, socket, head, () => {
// handle upgrade
});
});
Create a new receptor.
receptor :: antena.Receptor
Push a message to a emitter identified by its session.
receptor :: antena.Receptor
session :: string
message :: string
Handler for emitter.push(message)
.
receptor :: antena.Receptor
session :: string
message :: string
Handler for emitter.pull(message)
.
receptor :: antena.Receptor
session :: string
query :: string
callback(result)
result :: String
Create a listener for the connection
event of a net.Server
.
receptor :: antena.Receptor
onconnection(socket)
socket :: net.Socket
Create a middleware for the request
event of a http(s).Server
.
receptor :: antena.Receptor
splitter :: string
, default: "__antena__"
A string used to single out the traffic from an emitter.handled = onrequest(request, response, [next])
request :: (http|https).IncomingMessage
response :: (http|https).ServerResponse
next()
:
If defined, this function will be called if the request was not handled by Antena.handled :: boolean
Indicate whether the request was handled by antena.Create middleware for the upgrade
event of a http(s).Server
.
receptor :: antena.Receptor
splitter :: string
, default: "__antena__"
A string used to single out the traffic from an emitter.handled = onupgrage(request, socket, head, [next])
request :: http.IncomingMessage
socket :: (net|tls).Socket
head :: Buffer
next()
:
If defined, this function will be called if the upgrade request was not handled by Antena.handled :: boolean
Indicate whether the request was handled by antena.address :: object | string | number | antena.Receptor
:
Antena will choose between the three mode below:
window
is defined
string
, splitter; eg "__antena__"
is an alias for {splitter:"__antena__"}
object
, options:
secure :: boolean
, default: location.protocol === "https:
hostname :: string
, default: location.hostname
port :: number
, default: location.port
splitter :: string
: default: "__antena__"
window
is not defined and address
is not an object
number
, port number; eg 8080
: is an alias for "[::1]:8080"
string
"8080"
: alias for "[::1]:8080"
/tmp/antena.sock
127.0.0.1:8080
[::1]:8080
window
is not defined and address
is an object, address must be an antena.Receptor
session :: string
Push a message to the emitter's receptor.
emitter :: antena.Emitter
message :: string
Listen for pushes from the emitter's receptor.
emitter :: antena.Emitter
message :: string
Pull a result from the emitter's receptor.
emitter :: antena.Emitter
query :: string
result :: string
FAQs
Simple messaging protocol for node's net socket
We found that antena demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.