
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Dynamic Data Exchange (DDE) 动态数据交换模块
此模块基于node-dde, 将原有 edge 依赖更新至edge-js 12.3.1,并使用 typescript 重构。
npm install ts-dde --save
异步监听 advise 获取 service-topic-item 三级命名结构数据。
import { DdeClient } from 'ts-dde';
const client = new DdeClient({
services: {
myapp: {
mytopic1: ['myitem1', 'myitem2'],
},
},
});
client.on('advise', (data) => {
console.log('Service: ' + data.service + ', Topic: ' + data.topic + ', Item: ' + data.item + ', Text: ' + data.text);
});
client.connect();
client.startAdvise();
import { DdeClient } from 'ts-dde';
const client = new DdeClient({
services: {
myapp: {
mytopic1: ['myitem1', 'myitem2'],
mytopic2: ['myitem1', 'まいあいてむ2'],
},
},
});
client.on('advise', (data) => {
console.log('Service: ' + data.service + ', Topic: ' + data.topic + ', Item: ' + data.item + ', Text: ' + data.text);
});
client.connect();
client.startAdvise();
异步推送 advise 数据至客户端:
import { DdeServer } from 'ts-dde';
const server = new DdeServer('myapp');
server.on('disconnect', function(service, topic) {
console.log('OnDisconnect: ' + 'Service: ' + service + ', Topic: ' + topic);
});
server.on('advise', function(topic, item, format) {
console.log('OnAdvise: ' + 'Topic: ' + topic + ', Item: ' + item + ', Format: ' + format);
});
let i = 0;
server.onAdvise = function() {
return 'advise-' + i++;
};
setInterval(function() {
server.advise('*', '*');
}, 1000);
server.register();
| 方法名 | 说明 | 使用例 |
|---|---|---|
| connect | 连接服务器 | client.connect() |
| disconnect | 断开与服务器的连接 | client.disconnect() |
| pause | 暂停服务 | client.pause() |
| resume | 恢复服务 | client.resume() |
| execute | 通过指定的 DDE 通道,向应用程序发送一条或一组命令 | client.execute(command, timeout) |
| poke | 向应用程序发送数据 | client.poke(item, data, timeout) |
| request | 向接收应用程序查询信息,并以字符串方式返回该信息 | client.request(item, format, timeout) |
| startAdvise | 循环获取数据 | client.startAdvise(item, format, hot, timeout) |
| stopAdvise | 停止接收数据 | client.stopAdvise(item, timeout) |
| beginExecute | 开始发送命令 | client.beginExecute(command, oncomplete) |
| beginPoke | 开始发送数据 | client.beginPoke(item, data, format, oncomplete) |
| beginRequest | 开始请求数据 | client.beginRequest(item, format, oncomplete) |
| beginStartAdvise | 开始监听数据 | client.beginStartAdvise(item, format, hot, oncomplete) |
| beginStopAdvise | 开始停止监听 | client.beginStopAdvise(item, oncomplete) |
| dispose | 释放资源 | client.dispose() |
| service | 获取服务名 | client.service() |
| topic | 获取主题 | client.topic() |
| isConnected | 是否已连接 | client.isConnected() |
| isPaused | 是否已暂停 | client.isPaused() |
| 方法名 | 说明 | 使用例 |
|---|---|---|
| register | 注册服务 | server.register() |
| unregister | 注销服务 | server.unregister() |
| advise | 建立数据传输接口 | server.advise(topic, item) |
| disconnect | 断开连接 | server.disconnect() |
| pause | 暂停服务 | server.pause() |
| resume | 恢复服务 | server.resume() |
| dispose | 释放资源 | server.dispose() |
| service | 获取服务名 | server.service() |
| isRegistered | 是否已注册 | server.isRegistered() |
FAQs
Dynamic Data Exchange (DDE) 通信组件
We found that ts-dde 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.