Skip to content

This tool performs TLS connections to specified IP addresses, retrieves host information, and optionally gathers detailed IP information using the ipapi.co API.

Notifications You must be signed in to change notification settings

pikpikcu/ip2host

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ip2host IP Host and Geo-Information Checker

This tool performs TLS connections to specified IP addresses, retrieves host information, and optionally gathers detailed IP information using the ipapi.co API.

ip2host

Features

  • Retrieve host information from IP addresses with specified ports.
  • Optionally gather geo-information and detailed IP data using ipapi.co API.
  • Output results in plain text or JSON format.
  • Customize connection timeout and retry attempts.
  • Debug mode for extended output including command results and geo-information.

Installation

You can install this tool directly using Go:

git clone https://github.com/pikpikcu/ip2host
cd ip2host
go build -o ip2host main.go
sudo mv ip2host /usr/local/bin/

Usage

ip2host -h
Usage of ip2host:
  -debug
        Enable debug output
  -json
        Output in JSON format
  -o string
        Output file
  -retry int
        Number of retries to perform for failures (default 3)
  -timeout int
        TLS connection timeout in seconds (default 5)

Examples

Basic usage with default settings:

cat ips.txt | ip2host

Output results in JSON format:

cat ips.txt | ip2host -json

Enable debug mode for extended output:

cat ips.txt | ip2host -debug

Input Format

The input should be a list of IP addresses, one per line. You can also specify a custom port for each IP address using the format IP:Port. If no port is specified, the default port 443 is used.

Example

cat ips.txt

127.0.0.1
192.168.1.1:8443

About

This tool performs TLS connections to specified IP addresses, retrieves host information, and optionally gathers detailed IP information using the ipapi.co API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages