Giter Site home page Giter Site logo

arinwhois.net's People

Contributors

maxhorstmann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

arinwhois.net's Issues

Reassigned Blocks Returns Null Response

I've found a bug with reassigned blocks that causes the return object to be null.

string foundIpAddress = "40.107.14.45";
ArinClient arinClient = new ArinClient();
Response ipResponse = arinClient.QueryIpAsync(IPAddress.Parse(foundIpAddress)).Result;

The ipResponse object will be null when it is accessed and I believe that this is because the return from ARIN is not in the serialised type that the ARIN Client is expecting. In other words, it obtains data but not in the JSON form that it's expecting.

Below is the content from ARIN, so it's generating a response:

{"net":{"@xmlns":{"ns3":"http:\/\/www.arin.net\/whoisrws\/netref\/v2","ns2":"http:\/\/www.arin.net\/whoisrws\/rdns\/v1","$":"http:\/\/www.arin.net\/whoisrws\/core\/v1"},"@copyrightNotice":"Copyright 1997-2019, American Registry for Internet Numbers, Ltd.","@inaccuracyReportUrl":"https:\/\/www.arin.net\/resources\/registry\/whois\/inaccuracy_reporting\/","@termsOfUse":"https:\/\/www.arin.net\/resources\/registry\/whois\/tou\/","registrationDate":{"$":"2015-02-23T14:30:24-05:00"},"rdapRef":{"$":"https:\/\/rdap.arin.net\/registry\/ip\/40.74.0.0"},"ref":{"$":"https:\/\/whois.arin.net\/rest\/net\/NET-40-74-0-0-1"},"endAddress":{"$":"40.125.127.255"},"handle":{"$":"NET-40-74-0-0-1"},"name":{"$":"MSFT"},"netBlocks":{"netBlock":[{"cidrLength":{"$":"15"},"endAddress":{"$":"40.75.255.255"},"description":{"$":"Direct Assignment"},"type":{"$":"DS"},"startAddress":{"$":"40.74.0.0"}},{"cidrLength":{"$":"17"},"endAddress":{"$":"40.125.127.255"},"description":{"$":"Direct Assignment"},"type":{"$":"DS"},"startAddress":{"$":"40.125.0.0"}},{"cidrLength":{"$":"14"},"endAddress":{"$":"40.79.255.255"},"description":{"$":"Direct Assignment"},"type":{"$":"DS"},"startAddress":{"$":"40.76.0.0"}},{"cidrLength":{"$":"13"},"endAddress":{"$":"40.119.255.255"},"description":{"$":"Direct Assignment"},"type":{"$":"DS"},"startAddress":{"$":"40.112.0.0"}},{"cidrLength":{"$":"16"},"endAddress":{"$":"40.124.255.255"},"description":{"$":"Direct Assignment"},"type":{"$":"DS"},"startAddress":{"$":"40.124.0.0"}},{"cidrLength":{"$":"14"},"endAddress":{"$":"40.123.255.255"},"description":{"$":"Direct Assignment"},"type":{"$":"DS"},"startAddress":{"$":"40.120.0.0"}},{"cidrLength":{"$":"12"},"endAddress":{"$":"40.111.255.255"},"description":{"$":"Direct Assignment"},"type":{"$":"DS"},"startAddress":{"$":"40.96.0.0"}},{"cidrLength":{"$":"12"},"endAddress":{"$":"40.95.255.255"},"description":{"$":"Direct Assignment"},"type":{"$":"DS"},"startAddress":{"$":"40.80.0.0"}}]},"resources":{"@copyrightNotice":"Copyright 1997-2019, American Registry for Internet Numbers, Ltd.","@inaccuracyReportUrl":"https:\/\/www.arin.net\/resources\/registry\/whois\/inaccuracy_reporting\/","@termsOfUse":"https:\/\/www.arin.net\/resources\/registry\/whois\/tou\/","limitExceeded":{"@limit":"256","$":"false"}},"orgRef":{"@handle":"MSFT","@name":"Microsoft Corporation","$":"https:\/\/whois.arin.net\/rest\/org\/MSFT"},"parentNetRef":{"@handle":"NET-40-0-0-0-0","@name":"NET40","$":"https:\/\/whois.arin.net\/rest\/net\/NET-40-0-0-0-0"},"startAddress":{"$":"40.74.0.0"},"updateDate":{"$":"2015-05-27T13:38:53-04:00"},"version":{"$":"4"}}}

So far, this seems specific to all reassigned blocks.

Resolving 4.4.4.4 to Organization using the handle does not resolve

The following code does not provide the same output as whois.arin.net (when IP = 4.4.4.4) and throws an exception:

ArinWhois.Client.ArinClient myArinClient = new ArinWhois.Client.ArinClient();
var myWhoIsResults = myArinClient.QueryIpAsync(IP).Result;

var myWhoIsOrgResults = myArinClient.QueryResourceAsync(myWhoIsResults.Network.OrgRef.Handle, ArinWhois.Client.ArinClient.ResourceType.Organization).Result;

mywhoisorgname = myWhoIsOrgResults.Organization.Name.Value;
mywhoisorgcity = myWhoIsOrgResults.Organization.City.Value;
mywhoisorgpostalcode = myWhoIsOrgResults.Organization.PostalCode.Value;
mywhoispocrawlink = myWhoIsOrgResults.PointOfContact.Ref.Value;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.