验证和分类IPv4地址
IPregexo的Python项目详细描述
IPregex公司
验证和分类IPv4地址
先决条件:
- Linux操作系统
- Python>;=3.5“预装”
python3 --version
- Python pip3“如果没有安装,请随意浏览基于您的操作系统的安装指南”
安装:
- 下载并安装IPregexo python包
pip3 install IPregexo
注意PyPi包的名称区分大小写
- 在每个要使用IPrexego的python脚本上导入IPrexego
from IPregexo import IPregexo
示例:
- 在
- 检查有效的IP格式并打印message。在
- 在
- 检查有效的IP格式并返回Boolean结果。在
命令:
Command | Description |
---|---|
^{ | Vaildate IP format and print Message |
^{ | Vaildate IP format and return Boolean |
^{ | Vaildate if Private IP and print Message |
^{ | Vaildate if Private IP and return Boolean |
^{ | Vaildate if Private IP Class A and print Message |
^{ | Vaildate if Private IP Class A and return Boolean |
^{ | Vaildate if Private IP Class B and print Message |
^{ | Vaildate if Private IP Class B and return Boolean |
^{ | Vaildate if Private IP Class C and print Message |
^{ | Vaildate if Private IP Class C and return Boolean |
作者
- Omar Adil-网络工程师-Linkedin
许可证
这个项目是在麻省理工学院许可下授权的-有关详细信息,请参阅LICENSE文件
- 项目
标签: