Fixed multible issues with models:

- SearchHostResults missing "matches data attribute
 - Location areacode not being nullable
 - Banner having duplicate "ip" datamembers
 - Banner IP field being too small for the data
This commit is contained in:
Ron Sijm
2016-06-12 01:26:08 +02:00
parent 8a2425abd1
commit 177b86d997
3 changed files with 4 additions and 3 deletions

View File

@@ -70,12 +70,12 @@ namespace Shodan.Net.Models
/// The IP address of the host as an integer
/// </summary>
[DataMember(Name = "ip")]
public int? Ip { get; set; }
public long? Ip { get; set; }
/// <summary>
/// The IPv6 address of the host as a string. If this is present then the "ip" and "ip_str" fields wont be.
/// </summary>
[DataMember(Name = "ip")]
[DataMember(Name = "ipv6")]
public string Ipv6 { get; set; }
/// <summary>

View File

@@ -64,7 +64,7 @@ namespace Shodan.Net.Models
/// The area code for the device's location. Only available for the US.
/// </summary>
[DataMember(Name = "area_code")]
public int AreaCode { get; set; }
public int? AreaCode { get; set; }
/// <summary>
/// The designated market area code for the area where the device is located. Only available for the US.

View File

@@ -12,6 +12,7 @@ namespace Shodan.Net.Models
[DataContract]
public class SearchHostResults
{
[DataMember(Name = "matches")]
public List<Banner> Matches { get; set; }
[DataMember(Name = "facets")]