From 2127dfb97b82ffbfc030e759e9cdeefe65255615 Mon Sep 17 00:00:00 2001 From: Gregory Boddin Date: Thu, 8 Oct 2020 17:42:32 +0200 Subject: [PATCH] Update from new fields, follow core --- SearchResult.go | 47 +++++++---------------------------------------- 1 file changed, 7 insertions(+), 40 deletions(-) diff --git a/SearchResult.go b/SearchResult.go index 3610aa2..4b26279 100644 --- a/SearchResult.go +++ b/SearchResult.go @@ -1,6 +1,7 @@ package LeakIXClient import ( + "gitlab.nobody.run/tbi/core" "time" ) @@ -14,45 +15,11 @@ type SearchResult struct { Data string `json:"data"` Headers map[string][]string `json:"headers"` Plugin string `json:"plugin"` - Network Network `json:"network"` - GeoLocation GeoLocation `json:"geoip"` - Credentials []*HostServiceCredentials `json:"credentials"` - Software Software `json:"software"` + Network core.Network `json:"network"` + GeoLocation core.GeoLocation `json:"geoip"` + Credentials []*core.HostServiceCredentials `json:"credentials"` + Software core.Software `json:"software"` Reverse string `json:"reverse"` Hostname string `json:"hostname"` -} - -type HostServiceCredentials struct { - NoAuth bool `json:"noauth"` - Username string `json:"username"` - Password string `json:"password"` - Key string `json:"key"` - Raw []byte `json:"raw"` -} - -type Network struct { - OrganisationName string `json:"organization_name"` - ASN int `json:"asn"` -} - -type GeoLocation struct { - ContinentName string `json:"continent_name"` - RegionISOCode string `json:"region_iso_code"` - CityName string `json:"city_name"` - CountryISOCode string `json:"country_iso_code"` - CountryName string `json:"country_name"` - RegionName string `json:"region_name"` - GeoPoint GeoPoint `json:"location"` -} - -type GeoPoint struct { - Latitude float64 `json:"lat"` - Longitude float64 `json:"lon"` -} - -type Software struct { - Name string `json:"name"` - Version string `json:"version"` - OperatingSystem string `json:"os"` - Modules []Software `json:"modules"` -} + Dataset core.DatasetLeak `json:"dataset"` +} \ No newline at end of file