This repository has been archived by the owner on Feb 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
100 lines (62 loc) · 2.7 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
============================================
pyafraid, command-line afraid.org DDNS tool
============================================
pyafraid is a command-line tool for updating IP addresses for the afraid.org DDNS service.
Installation
============
``pyafraid`` can be installed using the standard ``easy_install`` command::
$ [sudo] easy_install pyafraid
Alternatively, you can install from a local version using ``setup.py install``::
$ [sudo] python setup.py install
Usage
=====
Once installed, simply run::
$ pyafraid update|query <username> -p <password> -n <hostname>
Or, if you'd like to use the SHA-1 hash instead of the
username/password combo::
$ pyafraid update|query -s <sha_hash> -n <hostname>
For a more detailed usage description, use the ``--help/-h`` option::
$ 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.
For example, to update freedns.afraid.org to point to the current IP address,
use the ``update`` argument::
$ 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.
To query freedns.afraid.org for information about an account, you can use the ``query`` argument::
$ 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
Note that specifying ``-n/--hostname`` will restrict the output to the given host.
Usage Requirements
==================
pyafraid has only been actively tested on python 2.6, but should work with minor changes on python 2.2+.
Patches are welcomed :)
Development Requirements
=========================
In order to execute unit tests (using ``python setup.py test``) the following modules are required:
* unittest2
* mock
All of these modules can be installed with ``easy_install``::
$ [sudo] easy_install mock unittest2
Reporting Bugs
==============
Any bugs can be reported on github (https://github.com/campbellr/pyafraid/issues/new)
or emailed to campbellr@gmail.com.