Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pagewong/Get-ip-address
python脚本自动获取本机ip,并发送到邮箱。适应linux系统和树莓派(raspberry pi)
https://github.com/pagewong/Get-ip-address
Last synced: 3 months ago
JSON representation
python脚本自动获取本机ip,并发送到邮箱。适应linux系统和树莓派(raspberry pi)
- Host: GitHub
- URL: https://github.com/pagewong/Get-ip-address
- Owner: pagewong
- Created: 2016-11-15T17:12:35.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2016-11-17T02:19:28.000Z (almost 8 years ago)
- Last Synced: 2024-05-31T09:35:49.057Z (5 months ago)
- Language: Python
- Size: 5.86 KB
- Stars: 18
- Watchers: 1
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-hacking-lists - pagewong/Get-ip-address - python脚本自动获取本机ip,并发送到邮箱。适应linux系统和树莓派(raspberry pi) (Python)
README
# Get-ip-address via email
python脚本自动获取本机ip,并发送到邮箱。适应linux系统和树莓派(raspberry pi)## 功能组成:
- get_ip_address.py ,主程序,包含以下三个内容:
+ get_ip_address():获取所有接口的ip;
+ ip_save_file():把获取到的ip存入文件(后续想在raspberry pi上通过蓝牙获取ip);
+ ip_send_mail():把获取的IP发送到指定邮箱。
- config.py,邮件账户配置文件## 使用说明
- 先在config里面设置好收发的邮箱地址和账号信息,以及SMTP服务器地址和端口。
- 运行环境<=python 2.7## 运行
python get_ip_address.py