Code Monkey home page Code Monkey logo

auto-public-net's Introduction

auto-public-net

auto_ip 自动获取IP发送邮件

感谢http://blog.0x0.codes/2015/08/01/ipsender-email-by-python/

环境需要python

代码是用3.7写的

请求获取公网IP的网站

'https://jsonip.com/'
'https://www.ip.cn/'
'https://www.ipip.net/'
'http://ip111.cn/'

邮箱配置

host = 'smtp.***.com'
port = 465
sender = '***@***.***'
receiver = ['***@***.***',
            '***@***.***', 
            '***@***.***']
pwd = '***'  # Password

默认执行时间

默认66秒执行一次,根据自己的需要修改

ali_auto_ip 自动获取IP更新阿里云域名解析

感谢https://www.vincents.cn/2017/03/27/aliyun-ddns/ 利用阿里云API,动态修改域名解析 需要安装阿里云的python SDK

环境

pip install aliyun-python-sdk-alidns

# 阿里云 Access Key ID
access_key_id = "***"
# 阿里云 Access Key Secret
access_key_secret = "***"
# 阿里云 一级域名
ali_domain = '***.***'
# 阿里云 主机记录
ali_domain_rr = '***'
# 返回内容格式
ali_format = 'json'
# 记录类型, DDNS填写A记录
ali_type = 'A'
# 解析记录有效生存时间TTL,单位:秒  阿里云解析免费版最少600  
ali_ttl = '600'    

auto-public-net's People

Contributors

geek-roc avatar

Watchers

 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.