shogo/internal/shodan/myip.go
perp c47bec5f76 💥 Remade all commands
Remade all commands for the pool.
2023-08-03 23:48:39 +01:00

22 lines
402 B
Go

package shodan
import (
"context"
"fmt"
"git.tcp.direct/perp/shogo/internal/utils"
)
// Return your IP address
func (s *Shodan) MyIp() {
// Fetch IP address
results, err := utils.Client.GetMyIP(context.Background())
if err != nil {
s.Results <- fmt.Sprintf("%s: %s", utils.Red("Error"), err.Error())
return
}
// Send line
s.Results <- fmt.Sprintf("%s", utils.Blue(results.String()))
}