Giter VIP home page Giter VIP logo

ip2asn's Introduction

IP2ASN 脚本

这个脚本用于将IP地址映射到其相应的自治系统号(ASN)。它使用了MaxMind的GeoLite2 ASN数据库。

使用方法

1. 下载脚本

使用以下命令下载脚本:

wget -N https://ghproxy.com/https://raw.githubusercontent.com/cmliu/IP2ASN/main/IP2ASN.sh && chmod +x IP2ASN.sh

2. 运行脚本

使用以下命令运行脚本,你可以选择提供一个包含IP地址的文本文件:

./IP2ASN.sh [file_ip.txt]

如果未提供文件名,默认使用 ip.txt。

3. 查看结果

脚本将生成一个CSV文件,其中包含每个IP地址及其对应的ASN。文件名类似于 ip.csv。

依赖

确保安装了 mmdb-bin,如果没有,脚本将尝试自动安装。

sudo apt update
sudo apt install mmdb-bin -y

注意事项

如果你在**大陆,请确保使用了适当的代理地址以加速下载。

鸣谢

感谢 P3TERX 提供的GeoLite2 ASN数据库。

许可

此脚本遵循 MIT License。

ip2asn's People

Contributors

cmliu avatar

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.