How to integrate whois in my web application

Posted by File-Big@reddit | learnprogramming | View on Reddit | 2 comments

I want to create a web application similar to HackerTarget's Autonomous System Lookup. The thing is that I don't want to use any external API's for the lookup, instead I want to use whois and I don't know how to integrate that, any help would be greatly appreciated.

I have created a Python script using Flask, installed whois. I want a really minimalist application with a search bar where I can insert several IP Addresses and get their ASN.