mneruDNS-Ctl is a bash script or Golang program, you can use it for control your domain zone, that resolves on mne.ru NS servers. You be able to add\remove\list with A,CNAME and other types, from your console

1
2
3
4
___ _ _ ___ ___ _ _
_ __ _ _ ___ _ _ _ _ | \ | \| |/ __| ___ / __|| |_ | |
| ' \ | ' \ / -_)| '_|| || || |) || .` |\__ \|___|| (__ | _|| |
|_|_|_||_||_|\___||_| \_,_||___/ |_|\_||___/ \___| \__||_|

github

Current version:

0.0.2

Tech

There is two version of this app, one written on bash, other written on Golang.

About Golang version

Configuring

change mne.ru login and password to your credentials

1
2
3
4
5
6
$ vim mnerudnsctl.go
...
#mne.ru credentials you need to change this!
username string = "myemail@mydomain.ru"
password string = "myS3cr#tP4$w0rd!"
...

compile

1
2
3
4
$ go version
go version go1.6 windows/amd64
$ go get .
$ go build mnerudnsctl.go

use

1
$ mnerudnsctl help

Examples

list:

1
2
$ mnerudnsctl list
example.com Expires: 2016-09-12

add:

1
2
$ mnerudnsctl add example.com testrr A 127.0.0.3
success

get:

1
2
3
4
5
6
$ mnerudnsctl get example.com
Content: ns1.mne.ru. noc.mne.ru 0000000000 11111 2222 3333333 44444 Type: SOA
Content: ns2.mne.ru Type: NS
Content: ns1.mne.ru Type: NS
Content: 192.168.1.101 Type: A
testrr Content: 127.0.0.3 Type: A

rm

1
2
$ mnerudnsctl rm example.com testrr
success

About Bash version

mneruDNS-Ctl uses a number of open source projects to work properly:

  • curl - curl is an open source command line tool and library for transferring data with URL syntax
  • jq - jq is a lightweight and flexible command-line JSON processor.

Configuring

change mne.ru login and password to your credentials

1
2
3
4
5
6
$ vim mnerudnsctl.sh
...
#mne.ru credentials you need to change this!
email='myemail@mydomain.ru'
passwd='myS3cr#tP4$w0rd!'
...

Usage

Keep in mind if you choose to use Golang version, then you need command mnerudnsctl (mnerudnsctl.exe) instead of mnerudnsctl.sh.
During use curl creates a temporary file (by default cookies.txt, you able to change name and file location by editing #init section in ./mnerudnsctl.sh) in the same directory as the ./mnerudnsctl.sh, make sure that the user who runs ./mnerudnsctl.sh can create files in the current directory.

1
2
3
4
$ ./mnerudnsctl.sh list
mydomain1.ru
example.com
mydomain3.ru

1
2
$ ./mnerudnsctl.sh add example.com test5 A 192.16.0.1
ok
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$ ./mnerudnsctl.sh get example.com
[
{
"id": "2323xxx",
"type": "NS",
"name": "",
"content": "ns1.mne.ru",
"prio": "0",
"domain_id": "23xxxx",
"ttl": "7200"
},
{
"id": "2313xxx",
"type": "A",
"name": "",
"content": "89.108.88.25",
"prio": "0",
"domain_id": "23xxxx",
"ttl": "7200"
}
]
1
2
$ ./mnerudnsctl.sh rm example.com test5
ok

License

The MIT License (MIT)