Skip to content

Commit

Permalink
Fixed multible issues with models:
Browse files Browse the repository at this point in the history
 - SearchHostResults missing "matches data attribute
 - Location areacode not being nullable
 - Banner having duplicate "ip" datamembers
 - Banner IP field being too small for the data
  • Loading branch information
RonSijm committed Jun 11, 2016
1 parent 8a2425a commit 177b86d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Shodan.Net/Models/Banner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ public class Banner
/// 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>
Expand Down
2 changes: 1 addition & 1 deletion src/Shodan.Net/Models/Location.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public Location()
/// 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.
Expand Down
1 change: 1 addition & 0 deletions src/Shodan.Net/Models/SearchHostResults.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace Shodan.Net.Models
[DataContract]
public class SearchHostResults
{
[DataMember(Name = "matches")]
public List<Banner> Matches { get; set; }

[DataMember(Name = "facets")]
Expand Down

0 comments on commit 177b86d

Please sign in to comment.