Skip to content

Commit

Permalink
formatting and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
caffix committed Sep 22, 2019
1 parent fb34a05 commit e66c44a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion config/support.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
)

const (
outputDirectoryName = "amass"
outputDirectoryName = "amass"
)

// AcquireConfig populates the Config struct provided by the config argument.
Expand Down
2 changes: 1 addition & 1 deletion intel/intel.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ package intel
import (
"bufio"
"errors"
"fmt"
"net"
"strconv"
"strings"
"sync"
"time"
"fmt"

"github.com/OWASP/Amass/config"
eb "github.com/OWASP/Amass/eventbus"
Expand Down
2 changes: 1 addition & 1 deletion net/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
package http

import (
"encoding/json"
"context"
"crypto/tls"
"crypto/x509"
"encoding/json"
"errors"
"fmt"
"io"
Expand Down
24 changes: 12 additions & 12 deletions services/sources/ipapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,23 +82,23 @@ func (i *IPAPI) executeAddrQuery(addr string) {
}
// Extract the IP address information from the REST API results
var info struct {
City string `json:"city"`
Region string `json:"region"`
RegionCode string `json:"region_code"`
Country string `json:"country"`
CountryName string `json:"country_name"`
PostalCode string `json:"postal"`
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
Timezone string `json:"timezone"`
ASN string `json:"asn"`
Description string `json:"org"`
City string `json:"city"`
Region string `json:"region"`
RegionCode string `json:"region_code"`
Country string `json:"country"`
CountryName string `json:"country_name"`
PostalCode string `json:"postal"`
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
Timezone string `json:"timezone"`
ASN string `json:"asn"`
Description string `json:"org"`
}
if err := json.Unmarshal([]byte(page), &info); err != nil {
return
}
}

func (i *IPAPI) restAddrURL(addr string) string {
return fmt.Sprintf("https://ipapi.co/%d/json", addr)
return fmt.Sprintf("https://ipapi.co/%s/json", addr)
}

0 comments on commit e66c44a

Please sign in to comment.