summaryrefslogtreecommitdiffstats
path: root/cmd/osint.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/osint.go')
-rw-r--r--cmd/osint.go24
1 files changed, 4 insertions, 20 deletions
diff --git a/cmd/osint.go b/cmd/osint.go
index 33b5416..9f2cfef 100644
--- a/cmd/osint.go
+++ b/cmd/osint.go
@@ -228,11 +228,7 @@ func runOsintFilesSearch(cmd *cobra.Command, args []string) error {
}
func runOsintBucketsSearch(cmd *cobra.Command, args []string) error {
- apiKey, _ := cmd.Flags().GetString("api-key")
- if apiKey == "" {
- return fmt.Errorf("API key required for buckets endpoint")
- }
- cfg := config.New().WithAPIKey(apiKey)
+ cfg := config.New()
c, err := client.New(cfg)
if err != nil {
@@ -252,11 +248,7 @@ func runOsintBucketsSearch(cmd *cobra.Command, args []string) error {
}
func runOsintBucketFilesSearch(cmd *cobra.Command, args []string) error {
- apiKey, _ := cmd.Flags().GetString("api-key")
- if apiKey == "" {
- return fmt.Errorf("API key required for bucket files endpoint")
- }
- cfg := config.New().WithAPIKey(apiKey)
+ cfg := config.New()
c, err := client.New(cfg)
if err != nil {
@@ -279,11 +271,7 @@ func runOsintBucketFilesSearch(cmd *cobra.Command, args []string) error {
}
func runOsintShortlinksSearch(cmd *cobra.Command, args []string) error {
- apiKey, _ := cmd.Flags().GetString("api-key")
- if apiKey == "" {
- return fmt.Errorf("API key required for shortlinks endpoint")
- }
- cfg := config.New().WithAPIKey(apiKey)
+ cfg := config.New()
c, err := client.New(cfg)
if err != nil {
@@ -308,11 +296,7 @@ func runOsintShortlinksSearch(cmd *cobra.Command, args []string) error {
}
func runOsintGeoSearch(cmd *cobra.Command, args []string) error {
- apiKey, _ := cmd.Flags().GetString("api-key")
- if apiKey == "" {
- return fmt.Errorf("API key required for geo endpoint (costs 1 credit)")
- }
- cfg := config.New().WithAPIKey(apiKey)
+ cfg := config.New()
c, err := client.New(cfg)
if err != nil {