Skip to content

whisdev/ip-machine-type

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ip-machine-type

Check machine type from an IP address.

Input: IP address
Output: IP: machine type

Machine types

Type Description
local windows Private IP + Windows
local linux Private IP + Linux
local macos Private IP + macOS
windows vps Public IP + Windows
linux vps Public IP + Linux
macos vps Public IP + macOS

Install

cd ip-machine-type
pip install -e .

For best OS detection, install nmap:

  • Linux: apt install nmap or yum install nmap
  • macOS: brew install nmap
  • Windows: nmap.org/download

OS detection may require root/sudo for nmap -O scans.

Check your public IP

chmod +x check-ip.sh   # first time only
./check-ip.sh
# 203.0.113.42

Works on macOS, Linux, and Windows (Git Bash, WSL, Cygwin). Uses curl or wget.

Windows: Double-click check-ip.bat — runs natively like an .exe, no Bash needed.

Usage

ip-machine-type 192.168.1.1
# 192.168.1.1: local linux

ip-machine-type 8.8.8.8
# 8.8.8.8: linux vps

Python API

from ip_machine_type import classify_ip

machine_type = classify_ip("192.168.1.1")
print(machine_type)  # "local linux"

About

Check machine type from an IP address and machine online ip

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors