
Research
Malicious fezbox npm Package Steals Browser Passwords from Cookies via Innovative QR Code Steganographic Technique
A malicious package uses a QR code as steganography in an innovative technique.
@hughfenghen/ts-rpc
Advanced tools
{
// 客户端配置
"client": {
// 远程服务地址前缀
"baseUrl": "127.0.0.1:3000"
},
// 服务端配置
"server": {
// RPCService 所在文件
"scanDir": ["server/*.ts"],
// 扫描信息输入地址
"metaOutDir": "./"
}
}
// 运行 server 服务之前执行`ts-rpc`命令
// scripts: yarn ts-rpc server -c ts-rpc.json && yarn dev
import { bindKoa, RPCService, RPCMethod } from '@hughfenghen/ts-rpc/server'
bindKoa(User) // 或者 bindExpress
@RPCService()
class User {
@RPCMethod()
getInfoById(id: string): { name: string, age: number, avatar: string } {
// 从上游获取数据
return {
name: '22',
age: 18,
avatar: '<image url>'
}
}
}
// TODO: ctx 信息怎么获取,错误处理 ?
// 运行 client 服务之前执行`ts-rpc`命令
// scripts: yarn ts-rpc client -c ts-rpc.json && yarn dev
import { createRetmoteService } from '@hughfenghen/ts-rpc/client'
const rs = createRetmoteService({
baseUrl: "127.0.0.1:3000",
// 可选,用于拦截处理请求
agent: (req: Request): Response => {
// fetch('/user/getInfoById/')
}
})
const userInfo = await rs.User.getInfoById('<user id>')
console.log(userInfo) // { name: '22', age: 18, avatar: '<imgage url>' }
git clone git@github.com:hughfenghen/ts-rpc.git
cd demo && yarn
yarn server
新开 shell 窗口,yarn client
FAQs
基于TS的RPC库
The npm package @hughfenghen/ts-rpc receives a total of 2 weekly downloads. As such, @hughfenghen/ts-rpc popularity was classified as not popular.
We found that @hughfenghen/ts-rpc 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
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.
Application Security
/Research
/Security News
Socket detected multiple compromised CrowdStrike npm packages, continuing the "Shai-Hulud" supply chain attack that has now impacted nearly 500 packages.