
Research
/Security News
Malicious npm Packages Target WhatsApp Developers with Remote Kill Switch
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
github.com/alexhowarth/go-weatherlink
This package provides a Go library for the Davis WeatherLink v2 API.
go get github.com/alexhowarth/go-weatherlink
// configure
config := weatherlink.Config{
Key: "mykey",
Secret: "mysecret",
}
// build a client
wl := config.NewClient()
// all weather stations associated with your key
st, err := wl.AllStations()
if err != nil {
// handle error
}
// current conditions for a station
cu, err := wl.Current(123)
if err != nil {
// handle error
}
// historic for a station
start := time.Now().Add(-time.Hour * 2)
end := time.Now()
h, err := wl.Historic(123, start, end)
if err != nil {
// handle error
}
for _, v := range h.Sensors {
for _, d := range v.Data {
fmt.Printf("Time: %v Temp: %v\n", time.Unix(d.Ts, 0), d.TempOut)
}
}
This package contains the command line tool weatherlink-cli
. To install and use it:
$ go install weatherlink-cli
$ weatherlink-cli --help
To extract certain data from the output, you might use jq:
$ weatherlink-cli historic --key mykey --secret mysecret --station 2970 --start="2020-07-08T00:00:00Z" --end="2020-07-08T01:00:00Z"| jq -r '.sensors[].data[] | "timestamp: \(.ts) temp_out: \(.temp_out) bar: \(.bar)"'
timestamp: 1594167300 temp_out: 76.8 bar: 30.018
timestamp: 1594167600 temp_out: 76.8 bar: 30.014
The following are not currently implemented:
This is work in progress. Let me know if something breaks or if your sensor type is not supported.
Documentation for the API can be found at https://weatherlink.github.io/v2-api/
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
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.