Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
github.com/centny/gwf/routing
#Doc
building handler api document in routing.SessionMux
###1.first add document description to handler
for func
//adding before routing handler func, //like func Abc(hs *routing.HTTPSession) routing.HResult var _ = Desc{ Title: "List Some", ArgsR: map[string]interface{}{ "type": "the type", }, ArgsO: map[string]interface{}{ "limit": "the list limit", }, Option: map[string]map[string]interface{}{ "type": map[string]interface{}{ "A": "A type", "B": "B type", }, }, ResV: []map[string]interface{}{ map[string]interface{}{ "Type": "A", "Name": "AAA", }, }, }.Api(Abc)
* for handler
```
//implementation Docable in handler,
//like: func (e *Exm) Doc() *Desc
_ = func() *Desc { // func (e *Exm) Doc() *Desc {
return &Desc{
Title: "List Some",
ArgsR: map[string]interface{}{
"type": "the type",
},
ArgsO: map[string]interface{}{
"limit": "the list limit",
},
Option: map[string]map[string]interface{}{
"type": map[string]interface{}{
"A": "A type",
"B": "B type",
},
},
ResV: []map[string]interface{}{
map[string]interface{}{
"Type": "A",
"Name": "AAA",
},
},
}
}
###2.adding document viewer to routing.SessionMux
view hander
mux := routing.NewSessionMux2("") // //adding document viewer handler to Mux. //http://localhost/abc for doc mux.H("/abc.", NewDocViewer()) // //adding document viewer handler(include special handler) to Mux. //http://localhost/abd for doc mux.H("/abd.", NewDocViewerInc(".abccc01.")) // //adding document viewer handler(exclude some handler) to Mux. //http://localhost/abe for doc mux.H("/abe.*", NewDocViewerExc(".abccc01."))
FAQs
Unknown package
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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.