Skip to content

Commit

Permalink
add iCloud Private Relay.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonhadfield committed May 4, 2024
1 parent d665607 commit aa016de
Show file tree
Hide file tree
Showing 13 changed files with 389 additions and 13 deletions.
2 changes: 2 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ func initConfig(cmd *cobra.Command) error {
sess.Providers.DigitalOcean.URL = v.GetString("providers.digitalocean.url")
sess.Providers.GCP.Enabled = v.GetBool("providers.gcp.enabled")
sess.Providers.GCP.URL = v.GetString("providers.gcp.url")
sess.Providers.ICloudPR.Enabled = v.GetBool("providers.icloudpr.enabled")
sess.Providers.ICloudPR.URL = v.GetString("providers.icloudpr.url")
sess.Providers.IPURL.Enabled = v.GetBool("providers.ipurl.enabled")
sess.Providers.IPURL.URLs = v.GetStringSlice("providers.ipurl.urls")
sess.Providers.Linode.Enabled = v.GetBool("providers.linode.enabled")
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/fatih/color v1.16.0
github.com/hashicorp/go-retryablehttp v0.7.5
github.com/jedib0t/go-pretty/v6 v6.5.8
github.com/jonhadfield/ip-fetcher v0.0.0-20240502200418-266a499cb230
github.com/jonhadfield/ip-fetcher v0.0.0-20240503180217-558f6741c36f
github.com/miekg/dns v1.1.59
github.com/mitchellh/go-homedir v1.1.0
github.com/spf13/cobra v1.8.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/jedib0t/go-pretty/v6 v6.5.8 h1:8BCzJdSvUbaDuRba4YVh+SKMGcAAKdkcF3SVFbrHAtQ=
github.com/jedib0t/go-pretty/v6 v6.5.8/go.mod h1:zbn98qrYlh95FIhwwsbIip0LYpwSG8SUOScs+v9/t0E=
github.com/jonhadfield/ip-fetcher v0.0.0-20240502200418-266a499cb230 h1:jWf1Hhed32wTkXG4F5CVCMQWsjcHyh24D9v/rPXmN6g=
github.com/jonhadfield/ip-fetcher v0.0.0-20240502200418-266a499cb230/go.mod h1:xckxqrzpzUyfNGSRKc+Ugp47f5iwogDYQB4iUUxfXHg=
github.com/jonhadfield/ip-fetcher v0.0.0-20240503180217-558f6741c36f h1:HxE19TTjhpHylMfgeoply4qrztj/seduEAO+Q/pQcJA=
github.com/jonhadfield/ip-fetcher v0.0.0-20240503180217-558f6741c36f/go.mod h1:xckxqrzpzUyfNGSRKc+Ugp47f5iwogDYQB4iUUxfXHg=
github.com/jszwec/csvutil v1.10.0 h1:upMDUxhQKqZ5ZDCs/wy+8Kib8rZR8I8lOR34yJkdqhI=
github.com/jszwec/csvutil v1.10.0/go.mod h1:/E4ONrmGkwmWsk9ae9jpXnv9QT8pLHEPcCirMFhxG9I=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
Expand Down
2 changes: 2 additions & 0 deletions process/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package process

import (
"fmt"
"github.com/jonhadfield/ipscout/providers/icloudpr"
"log/slog"
"os"
"path/filepath"
Expand Down Expand Up @@ -51,6 +52,7 @@ func getProviderClients(sess session.Session) (map[string]providers.ProviderClie
{Name: digitalocean.ProviderName, Enabled: sess.Providers.DigitalOcean.Enabled, APIKey: "", NewClient: digitalocean.NewProviderClient},
{Name: gcp.ProviderName, Enabled: sess.Providers.GCP.Enabled, APIKey: "", NewClient: gcp.NewProviderClient},
{Name: ipurl.ProviderName, Enabled: sess.Providers.IPURL.Enabled, APIKey: "", NewClient: ipurl.NewProviderClient},
{Name: icloudpr.ProviderName, Enabled: sess.Providers.ICloudPR.Enabled, APIKey: "", NewClient: icloudpr.NewProviderClient},
{Name: linode.ProviderName, Enabled: sess.Providers.Linode.Enabled, APIKey: "", NewClient: linode.NewProviderClient},
{Name: shodan.ProviderName, Enabled: sess.Providers.Shodan.Enabled, APIKey: sess.Providers.Shodan.APIKey, NewClient: shodan.NewProviderClient},
{Name: ptr.ProviderName, Enabled: sess.Providers.PTR.Enabled, APIKey: "", NewClient: ptr.NewProviderClient},
Expand Down
4 changes: 2 additions & 2 deletions providers/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,10 @@ func (c *ProviderClient) CreateTable(data []byte) (*table.Writer, error) {
{Number: 2, AutoMerge: false, WidthMax: MaxColumnWidth, WidthMin: 50},
})
tw.SetAutoIndex(false)
tw.SetTitle("AWS IP | Host: %s", c.Host.String())
tw.SetTitle("AWS | Host: %s", c.Host.String())

if c.UseTestData {
tw.SetTitle("AWS IP | Host: 18.164.100.99")
tw.SetTitle("AWS | Host: 18.164.100.99")
}

return &tw, nil
Expand Down
4 changes: 2 additions & 2 deletions providers/digitalocean/digitalocean.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,10 @@ func (c *ProviderClient) CreateTable(data []byte) (*table.Writer, error) {
{Number: 2, AutoMerge: false, WidthMax: MaxColumnWidth, WidthMin: 50},
})
tw.SetAutoIndex(false)
tw.SetTitle("DigitalOcean IP | Host: %s", c.Host.String())
tw.SetTitle("DIGITAL OCEAN | Host: %s", c.Host.String())

if c.UseTestData {
tw.SetTitle("DigitalOcean IP | Host: %s", "165.232.46.239")
tw.SetTitle("DIGITAL OCEAN | Host: %s", "165.232.46.239")
}

return &tw, nil
Expand Down
4 changes: 2 additions & 2 deletions providers/gcp/gcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,10 @@ func (c *ProviderClient) CreateTable(data []byte) (*table.Writer, error) {
{Number: 2, AutoMerge: false, WidthMax: MaxColumnWidth, WidthMin: 50},
})
tw.SetAutoIndex(false)
tw.SetTitle("GCP IP | Host: %s", c.Host.String())
tw.SetTitle("GCP | Host: %s", c.Host.String())

if c.UseTestData {
tw.SetTitle("GCP IP | Host: %s", "34.128.62.2")
tw.SetTitle("GCP | Host: %s", "34.128.62.2")
}

return &tw, nil
Expand Down
Loading

0 comments on commit aa016de

Please sign in to comment.