
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
koa-weixin-jssdk
Advanced tools
koa weixin jssdk middleware
import koa from 'koa';
import koaBody from 'koa-body';
import weixinJSSDK from '../src';
const port = process.env.PORT || 3000;
const app = koa();
app.use(koaBody());
app.use(weixinJSSDK({
appId: '<YOUR_APP_ID>', // [required] weixin-jssdk app id
secret: '<YOUR_SECRET>', // weixin-jssdk secret
pathName: '/jssdk', // [optional] eg: http://imyourfather.com/jssdk
onError: (err, ctx) => {
console.error(err);
ctx.body = 'error';
},
}));
app.listen(port);
$ git clone <this_git_repo>
$ npm i
$ npm start
Maybe you already have a Third-party weixin service and have a access token, you could use custom fetchTicket
function instead of secret
.
The fetchTicket
function must return { ticket, expires_in }
as a Promise instance.
app.use(weixinJSSDK({
appId: '<YOUR_APP_ID>', // [required]
fetchTicket() {
return fetch(/* you_third_party_weixin_fetch_ticket_url */);
// Must return a promise;
// The responsed json must include `ticket` and `expires_in` fields.
}
// other configs...
}));
Using npm:
$ npm install koa-weixin-jssdk --save
MIT
FAQs
Koa weixin jssdk middleware
The npm package koa-weixin-jssdk receives a total of 7 weekly downloads. As such, koa-weixin-jssdk popularity was classified as not popular.
We found that koa-weixin-jssdk 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
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.