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/humans-group/go-yandex-maps-api
Golang SDK for Yandex Maps API
To use package import:
"fmt"
"log"
"github.com/humans-grpoup/go-yandex-maps-api/services/suggest"
"github.com/humans-grpoup/go-yandex-maps-api/services/httpclient"
)
Make sure that you have an API key before utilizing the package
apiSuggest = "<API_KEY>"//Need to be substituted by your own API key
...
)
Then you can make a request to Yandex Suggest API as follows:
import (
"fmt"
"log"
"github.com/humans-grpoup/go-yandex-maps-api/services/suggest"
"github.com/humans-grpoup/go-yandex-maps-api/services/httpclient"
)
const (
apiSuggest = "<API_KEY>"//Need to be substituted by your own API key
lat = 69.02
lng = 42.01
lang = "eng"
limit = 5
)
func main() {
// Example: Suggest
address := "New York"
suggestAPI := suggest.NewSuggest(apiSuggest)
// Build a URL for the API request
// Add a response language
suggestAPI.AddLanguage(lang)
// Add a search point coordinate
suggestAPI.AddSearchPoint(lat, lng)
// Add a limit on response results
suggestAPI.AddLimit(limit)
//
suggestion, err := client.Suggest(suggestAPI, address)
if err != nil {
log.Fatalf("Suggest error: %v", err)
}
fmt.Printf("Suggest for text is %v\n", suggestion)
}
Sturcure retrieved by Yandex Suggest is:
SuggestReqID string `json:"suggest_reqid"`
Results []SuggestResult `json:"results"`
}
SuggestResult struct {
Title Title `json:"title"`
Subtitle Subtitle `json:"subtitle,omitempty"`
Tags []string `json:"tags"`
Distance Distance `json:"distance"`
}
Title struct {
Text string `json:"text"`
HL []HLRange `json:"hl,omitempty"`
}
HLRange struct {
Begin int `json:"begin"`
End int `json:"end"`
}
Subtitle struct {
Text string `json:"text"`
}
Distance struct {
Value float64 `json:"value"`
Text string `json:"text"`
}
MIT
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.