Giter VIP home page Giter VIP logo

checkip's People

Contributors

angrychimp avatar dependabot[bot] avatar jreisinger avatar pete911 avatar yvesago 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  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  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  avatar

Watchers

 avatar  avatar  avatar  avatar

checkip's Issues

Unnecessary downloads of the same data

$ checkip $(dig +short checkip.amazonaws.com)
checkip: wrong IP address: checkip.check-ip.aws.a2z.com.
checkip: wrong IP address: checkip.eu-west-1.prod.check-ip.aws.a2z.com.
checkip: downloading https://iptoasn.com/data/ip2asn-combined.tsv.gz
checkip: downloading https://iplists.firehol.org/files/firehol_level1.netset
checkip: downloading https://download.db-ip.com/free/dbip-city-lite-2022-10.mmdb.gz
checkip: downloading https://download.db-ip.com/free/dbip-city-lite-2022-10.mmdb.gz
checkip: downloading https://download.db-ip.com/free/dbip-city-lite-2022-10.mmdb.gz
checkip: downloading http://cinsscore.com/list/ci-badguys.txt
checkip: downloading https://iplists.firehol.org/files/firehol_level1.netset
checkip: downloading https://raw.githubusercontent.com/stamparm/ipsum/master/ipsum.txt
checkip: downloading https://raw.githubusercontent.com/stamparm/ipsum/master/ipsum.txt
checkip: downloading https://iptoasn.com/data/ip2asn-combined.tsv.gz
checkip: downloading https://iplists.firehol.org/files/firehol_level1.netset
checkip: downloading https://raw.githubusercontent.com/stamparm/ipsum/master/ipsum.txt
checkip: downloading https://iptoasn.com/data/ip2asn-combined.tsv.gz
checkip: downloading http://cinsscore.com/list/ci-badguys.txt
checkip: downloading https://download.db-ip.com/free/dbip-city-lite-2022-10.mmdb.gz
checkip: downloading http://cinsscore.com/list/ci-badguys.txt
checkip: downloading http://cinsscore.com/list/ci-badguys.txt
checkip: downloading https://raw.githubusercontent.com/stamparm/ipsum/master/ipsum.txt
checkip: downloading https://iplists.firehol.org/files/firehol_level1.netset
checkip: downloading https://iptoasn.com/data/ip2asn-combined.tsv.gz
checkip: downloading http://cinsscore.com/list/ci-badguys.txt
checkip: downloading https://download.db-ip.com/free/dbip-city-lite-2022-10.mmdb.gz
checkip: downloading https://iptoasn.com/data/ip2asn-combined.tsv.gz
checkip: downloading https://raw.githubusercontent.com/stamparm/ipsum/master/ipsum.txt
checkip: downloading https://iplists.firehol.org/files/firehol_level1.netset

[Feature request] Using IPinfo.io for IP information (IP Geolocation + ASN)

I would like to recommend ipinfo.io for the IP data.

  • Provides highly accurate IP geolocation backed by our probe network infrastructure.
  • Free tier access token supports 50,000 requests per month.
  • IPinfo supports HTTPS/SSL encryption on all endpoints.
  • Tokenless access grants 1,000 requests per day.
  • Includes ASN and hostname information. Supports bulk enrichment through a single API endpoint. We also have a comprehensive integration library.

Usage example:

curl https://ipinfo.io/8.8.8.8
{
    "ip": "8.8.8.8",
    "hostname": "dns.google",
    "anycast": true,
    "city": "Mountain View",
    "region": "California",
    "country": "US",
    "loc": "37.4056,-122.0775",
    "org": "AS15169 Google LLC",
    "postal": "94043",
    "timezone": "America/Los_Angeles"
}

Documentation: https://ipinfo.io/developers

Free IP databases: https://ipinfo.io/products/free-ip-database

nitefood/asn is mentioned in #41. The project is switching to IPinfo for their IP data as well: nitefood/asn#67 (comment)


Consider including IPinfo in the project for accurate data and generous free access. Please let me know what you think. Thank you very much.

Consider rewrite or new project

  • remove checks that need registration
  • provide info also on FQDN
  • cli should be usable in shell pipelines (input from files and STDIN + performance)
  • JSON + text output

Review SAN values

What are those unreadable strings?

$ checkip -j 1.1.1.1 | jq -r '.checks[12].info.data.attributes.last_https_certificate.extensions'
{
  "subject_alternative_name": [
    "cloudflare-dns.com",
    "*.cloudflare-dns.com",
    "one.one.one.one",
    "\u0001\u0001\u0001\u0001",
    "\u0001\u0001",
    "\\xa2\\x9f$\\x01",
    "\\xa2\\x9f.\\x01",
    "&\u0006GG\u0011\u0011",
    "&\u0006GG\u0010\u0001",
    "GGd",
    "GGd"
  ]
}

Implement caching

When running make run too many times I get:

checkip: calling https://www.virustotal.com/api/v3/ip_addresses/218.92.0.158: 429 Too Many Requests

Cache responses for some time to prevent this.

Doesn't work properly on Windows

The windows build doesn't function properly.

It tries using unix paths:

checkip.exe: IPSum: searching 1.1.1.1 in /var/tmp/ipsum.txt: open /var/tmp/ipsum.txt: The system cannot find the path specified.

checkip.exe: DBip: can't load DB file /var/tmp/dbip-city-lite.mmdb: open /var/tmp/dbip-city-lite.mmdb: The system cannot find the path specified.

checkip.exe: IPtoASN: searching 1.1.1.1 in /var/tmp/ip2asn-combined.tsv: open /var/tmp/ip2asn-combined.tsv: The system cannot find the path specified.

checkip.exe: CinsScore: searching 1.1.1.1 in /var/tmp/cins.txt: open /var/tmp/cins.txt: The system cannot find the path specified.

checkip.exe: MaxMind: open /var/tmp/GeoLite2-City.mmdb: The system cannot find the path specified.

Access denied in windows 11

i want to update version in my pc.

i download it with wget(windows) then extract it in previously directory.

PS C:\Portables\Tools> .\checkip.exe
Program 'checkip.exe' failed to run: Access is deniedAt line:1 char:1
+ .\checkip.exe
+ ~~~~~~~~~~~~~.
At line:1 char:1
+ .\checkip.exe
+ ~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [], ApplicationFailedException
    + FullyQualifiedErrorId : NativeCommandFailed

i search a clue about wich file are denies but no luck.

i have .checkip.yaml in same directory also i copied it in to my user path. c:\users\yunus.checkip.yaml

do you have any idea how can i run it. ?

Certificate error connecting to ThreadCrowd

$ checkip 1.1.1.1
checkip: ThreadCrowd: Get "https://www.threatcrowd.org/searchApi/v2/ip/report?ip=1.1.1.1": x509: “*.otxb.io” certificate name does not match input
<...SNIP...>

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.