Skip to content

Latest commit

 

History

History
65 lines (53 loc) · 1.35 KB

README.md

File metadata and controls

65 lines (53 loc) · 1.35 KB

🕵️ dwhois

A simple whois client in Dart 🐦

Usage

Query whois

It picks automatically a whois server based on IANA WHOIS Service and queries agaisnt it.

Future<void> main() async {
  final response = await whois('google.com');
  print(response);
}

Query whois against a specific server

Future<void> main() async {
  final response = await queryWhoisServer(
    domain: 'google.com',
    whoisServer: 'whois.verisign-grs.com',
  );
  print(response);
}

Find a whois server by domain

Future<void> main() async {
  final server = await findWhoisServer(domain: 'google.com');
  print(server); // whois.verisign-grs.com
}

Example

The code:

import 'package:dwhois/dwhois.dart';

Future<void> main() async {
  final response = await whois('google.com');
  print(response);
}

The output:

Domain Name: GOOGLE.COM
Registry Domain ID: 2138514_DOMAIN_COM-VRSN
Registrar WHOIS Server: whois.markmonitor.com
Registrar URL: http://www.markmonitor.com
Updated Date: 2019-09-09T15:39:04Z
Creation Date: 1997-09-15T04:00:00Z
Registry Expiry Date: 2028-09-14T04:00:00Z
Registrar: MarkMonitor Inc.
Registrar IANA ID: 292
Registrar Abuse Contact Email: [email protected]
Registrar Abuse Contact Phone: +1.2083895740
...