
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.
github.com/rdegges/go-ipify
The official client library for ipify: A Simple IP Address API.
ipify is the best IP address lookup service on the internet. It's fast, simple, scalable, open source, and well-funded (by me!).
In short: if you need a way to pragmatically get your public IP address, ipify is the best possible choice!
This library will retrieve your public IP address from ipify's API service, and return it as a string. It can't get any simpler than that.
This library also has some other nice features you might care about:
To install ipify
, simply run:
$ go get github.com/rdegges/go-ipify
This will install the latest version of the library automatically.
Using this library is very simple. Here's a simple example:
package main
import (
"fmt"
"github.com/rdegges/go-ipify"
)
func main() {
ip, err := ipify.GetIp()
if err != nil {
fmt.Println("Couldn't get my IP address:", err)
} else {
fmt.Println("My IP address is:", ip)
}
}
Now, in regards to error handling, there are several ways this can fail:
The library will output an informative error message in the event anything fails.
One thing to keep in mind: regardless of how you decide to handle errors, the ipify library will retry any failed requests 3 times before ever failing -- so if you do need to handle errors, just remember that retry logic has already been attempted.
This project is only possible due to the amazing contributors who work on it!
If you'd like to improve this library, please send me a pull request! I'm happy to review and merge pull requests.
The standard contribution workflow should look something like this:
Also, if you're making changes, please write tests for your changes -- this project has a full test suite you can easily modify / test.
To run the test suite, you can use the go test
command after forking this
repository.
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
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.