
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@tntd/dms-react
Advanced tools
TNT 倾情推出极简DMS,复杂系统只需要一个组件搞定,而且暴露出来的api也非常简单,必须要的参数只有action,action返回的是一个Promise对象;
基本信息
npm i @tntd/dms-react --save
import React from 'react';
import Dms, { mockJsonBySql } from "@tntd/dms-react";
import 'antd/dist/antd.css'; // dms 依赖 antd,正常使用不用引入
const Home = props => (
<div>
<h4>自定义Home</h4>
<pre style={{ backgroundColor: '#fff', padding: '20px' }}>
{JSON.stringify(props, null, 4)}
</pre>
</div>
);
const App = () => (
<Dms
isDevelopmentEnv={true}
title="TNT DMS"
action={(sql, { sqls } = {}) => {
console.log('excute sql:', sql, sqls);
return new Promise(resolve => {
resolve(
mockJsonBySql(sql)
);
});
}}
renderHome={Home}
/>
);
export default App;
url: /dms/execute
method: post
params: str
传入的参数使用AES
进行加密
import CryptoJS from "crypto-js";
// Encrypt加密
const ciphertext = CryptoJS.AES.encrypt(value, "OrF7l2hF81yhVEtxfYKUYxsPsxfM4fZm");
完整示例
import DMS from '@tntd/dms-react';
import CryptoJS from 'crypto-js';
import { message } from 'antd';
import service from './service'; // 改成你自己使用的service
export default () => (
<DMS
title="司南DMS"
action={(sql, { sqls } = {}) => {
sqls = sqls || [sql];
return service.executeSql({
values: sqls.filter(sql => sql && sql.trim()).map(
sql => CryptoJS.AES.encrypt(encodeURIComponent(sql), 'OrF7l2hF81yhVEtxfYKUYxsPsxfM4fZm').toString()
)
}).catch(err => message.error(err.message || err.toString()));
}}
renderHome={<div>自定义 home</div>}
/>
);
FAQs
一个小而美的dms管理系统
We found that @tntd/dms-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 10 open source maintainers 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 uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.