用于操纵fear.org DDN的命令行工具

pyafraid的Python项目详细描述


PyFerr是一个命令行工具,用于更新ferr.org DDNS服务的IP地址。

安装

pyford可以使用标准的python setup.py install命令安装:

$ [sudo] python setup.py install

用法

安装后,只需运行:

$ pyafraid update|query <username> -p <password> -n <hostname>

或者,如果您想使用sha-1散列而不是 用户名/密码组合键:

$ pyafraid update|query -s <sha_hash> -n <hostname>

有关更详细的用法说明,请使用--help/-h选项:

$ pyafraid -h
Usage: pyafraid.py update|query [-h] [-u <username>] [-p <password>] [-n
<hostname>]


Options:
 -h, --help            show this help message and exit
 -u USERNAME, --username=USERNAME
                       The freedns.afraid.org username
 -p PASSWORD, --password=PASSWORD
                       The associated password
 -n HOSTNAME, --hostname=HOSTNAME
                       The name of the host to update or query
 -s SHA_HASH, --sha-hash=SHA_HASH
                       The SHA-1 hash from the API interface
                       URL. Don't use this with the -u and -p options.

例如,要更新freedns.ferd.org以指向当前IP地址, 使用update参数:

$ pyafraid update -u myuser -p mypass -n mythbox.example.org
  Attempting to update mythbox.example.org...
  response from server:
  ERROR: Address 1.1.1.1 has not changed.

要查询freedns.ferd.org以获取有关帐户的信息,可以使用query参数:

$ pyafraid query -u myuser -p mypass

 url:    http://freedns.afraid.org/dynamic/update.php?<some_hash>
 ip:     1.1.1.1
 desc:   example.org

 url:    http://freedns.afraid.org/dynamic/update.php?<some_other_hash>
 ip:     2.2.2.2
 desc:   deathstar.example.org

请注意,指定-n/--hostname将限制对给定主机的输出。

使用要求

PyForder只在Python2.6上进行了积极的测试,但是应该在Python2.2+上进行一些小的更改。 欢迎使用修补程序:)

开发要求

要执行单元测试(使用“make test”),需要以下模块:
  • 单元测试2
  • 探索
  • 模拟

所有这些模块都可以用easy_install

安装
$ [sudo] easy_install mock unittest2 discover

报告错误

任何错误都可以在github(https://github.com/campbellr/pyafraid/issues/new)上报告 或者发邮件给campbellr@gmail.com

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Springboot数据JPA findByDate()   java是否可以有多个顶级树节点?   javahibernatehql。子查询中的多个   使用Twilio验证java Keyclope电话号码   java重写对象的toString()表示返回意外的符号   java Android最多每15分钟调用一个方法,否则使用保存的数据   在java swing中突出显示jeditorpane中的一些单词   java将时间戳转换为UTC时区   由于main中存在ArrayIndexOutOfBoundsException,导致java编译错误   java如何通过requestscope获取对象内部对象的值?   java访问安卓代码内的网站并检索生成的图像   java这种日期格式的模式是什么?   java解析包含超链接的xml字符串