[ANN] NamecoinControl - Manage namecoin services

Namecoin, NMControl
khal
Site Admin
Posts: 708
Joined: Mon May 09, 2011 5:09 pm
os: linux

Re: [ANN] NMControl - Manage namecoin services

Post by khal »

neofutur wrote:( no need for GUI, and no need for windows ;)
Haha :p

The DNS server is already here in last release, even if .bit support is still primitive.
NamecoinID: id/khal
GPG : 9CC5B92E965D69A9
NMC: N1KHAL5C1CRzy58NdJwp1tbLze3XrkFxx9
BTC: 1KHAL8bUjnkMRMg9yd2dNrYnJgZGH8Nj6T

Register Namecoin domains with BTC
My bitcoin Identity - Send messages to bitcoin users
Charity Ad - Make a good deed without paying a cent

biolizard89
Posts: 2001
Joined: Tue Jun 05, 2012 6:25 am
os: linux

Re: [ANN] NMControl - Manage namecoin services

Post by biolizard89 »

Is there any documentation for the nmcontrol commands? I'm trying to do a domain lookup from the bash prompt and I'm not having any luck.

Code: Select all

$ ./nmcontrol domain lookup 'dot-bit.bit'
ERROR: {u'id': 1, u'result': u'Exception : list indices must be integers, not str', u'error': True}
I'm fairly confident I'm just doing something stupid; suggestions would be greatly appreciated.

(I'm on Windows 7 if it matters.)
Jeremy Rand, Lead Namecoin Application Engineer
NameID: id/jeremy
DyName: Dynamic DNS update client for .bit domains.

Donations: BTC 1EcUWRa9H6ZuWPkF3BDj6k4k1vCgv41ab8 ; NMC NFqbaS7ReiQ9MBmsowwcDSmp4iDznjmEh5


khal
Site Admin
Posts: 708
Joined: Mon May 09, 2011 5:09 pm
os: linux

Re: [ANN] NMControl - Manage namecoin services

Post by khal »

Indeed biolizard89, dns server & domain plugin is not finished yet.


Some updates for NMControl :

- added a http service
- added a http plugin to make a future GUI, available at 127.0.0.2/ (a simple page for now)
* allow any number of sub plugins : first one is GuiHttpConfig, a simple page at 127.0.0.2/config to be able configure NMControl from a web browser.

Sources :
https://github.com/khalahan/nmcontrol/commits/master
NamecoinID: id/khal
GPG : 9CC5B92E965D69A9
NMC: N1KHAL5C1CRzy58NdJwp1tbLze3XrkFxx9
BTC: 1KHAL8bUjnkMRMg9yd2dNrYnJgZGH8Nj6T

Register Namecoin domains with BTC
My bitcoin Identity - Send messages to bitcoin users
Charity Ad - Make a good deed without paying a cent

phelix
Posts: 1634
Joined: Thu Aug 18, 2011 6:59 am

Re: [ANN] NMControl - Manage namecoin services

Post by phelix »

One important thing: the main file nmcontrol should be called nmcontrol.py !

only then can you run it on windows (how the heck do you recognize executables on unix ?)


I had trouble importing the .dat file because of an encoding error. Unfortunately there was no error message. I will try and create a commit for that.


Also some non important stuff:


"nmcontrol restart" stops but does not restart. At least in non-daemon mode.

"""
* Available commands for plugin main :
help
reload
restart
start
status
stop

C:\namecoin\nmcontrol-0.8>nmcontrol.py main reload
ERROR: {u'id': 1, u'result': u'Method "reload" not supported by plugin "main"',
u'error': True}
"""


C:\namecoin\nmcontrol-0.8>nmcontrol.py domain lookup d/dot-bit
ERROR: {u'id': 1, u'result': u'Exception : list indices must be integers, not st
r', u'error': True}

?


C:\namecoin\nmcontrol-0.8>nmcontrol.py domain dnslookup d/dot-bit
ERROR: {u'id': 1, u'result': u'Exception : dnslookup() takes exactly 4 arguments
(2 given)', u'error': True}

?


C:\namecoin\nmcontrol-0.8>nmcontrol.py data
ERROR:


C:\_Felix\namecoin\nmcontrol-0.8>nmcontrol.py data getValue d/dot-bit
False

I think namecoind was down and there was nothing in the database yet... some errormessage would be nice.
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

khal
Site Admin
Posts: 708
Joined: Mon May 09, 2011 5:09 pm
os: linux

Re: [ANN] NMControl - Manage namecoin services

Post by khal »

phelix wrote:One important thing: the main file nmcontrol should be called nmcontrol.py !

only then can you run it on windows (how the heck do you recognize executables on unix ?)
By giving the file the execution permission & the OS can also read the file a bit to guess it's type :

Code: Select all

file nmcontrol 
nmcontrol: Python script, ASCII text executable
the execution persmission allow to do : ./nmcontrol
the first line in the file launch it with python and avoid doing "python nmcontrol"
On windows, you can't do c:\\python.exe nmcontrol ? (without .py)

Thanks for reporting all the bugs. We be fixed soon, or not :p
The domain plugin is not ready for use and need a major refactoring (same for the DNS service).
NamecoinID: id/khal
GPG : 9CC5B92E965D69A9
NMC: N1KHAL5C1CRzy58NdJwp1tbLze3XrkFxx9
BTC: 1KHAL8bUjnkMRMg9yd2dNrYnJgZGH8Nj6T

Register Namecoin domains with BTC
My bitcoin Identity - Send messages to bitcoin users
Charity Ad - Make a good deed without paying a cent

phelix
Posts: 1634
Joined: Thu Aug 18, 2011 6:59 am

Re: [ANN] NMControl - Manage namecoin services

Post by phelix »

khal wrote:
phelix wrote:One important thing: the main file nmcontrol should be called nmcontrol.py !

only then can you run it on windows (how the heck do you recognize executables on unix ?)
By giving the file the execution permission & the OS can also read the file a bit to guess it's type :

Code: Select all

file nmcontrol 
nmcontrol: Python script, ASCII text executable
the execution persmission allow to do : ./nmcontrol
the first line in the file launch it with python and avoid doing "python nmcontrol"
I know about the shebang. But how can a human see it? I think there are some shells that show different colors for executable files. On my vServer consoles there are no colors...
On windows, you can't do c:\\python.exe nmcontrol ? (without .py)
Actually I tried it and it works. Nobody would expect that, though. OK, probably we need an installer for windows.
Thanks for reporting all the bugs. We be fixed soon, or not :p
The domain plugin is not ready for use and need a major refactoring (same for the DNS service).
No worries. DNS is not working? I am quite sure it worked for me :)
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

khal
Site Admin
Posts: 708
Joined: Mon May 09, 2011 5:09 pm
os: linux

Re: [ANN] NMControl - Manage namecoin services

Post by khal »

phelix wrote: I know about the shebang. But how can a human see it? I think there are some shells that show different colors for executable files. On my vServer consoles there are no colors...
Actually I tried it and it works. Nobody would expect that, though. OK, probably we need an installer for windows.
deiban automatically (or I've uncommented the alias) add a --color to the /bin/ls command.
.py will be added, and yes, we need an installer for windows (or a bundle that one can unzip at least)

phelix wrote: No worries. DNS is not working? I am quite sure it worked for me :)
If I'm right (its a bit old :p) : the dns code & namecoin json analysis are mixed (wrong place/architecture), and json analysis only support spec v1.


I had written a quick tor plugin (as a proof of concept, not published to git) that does the following :
In browser : http://any-domain.tor => dns resolution by nmcontrol => 127.0.0.2 => http server of nmcontrol : read the name "tor/domain" => reply an http redirect to : xxxxx.onion

The domain name change from .tor to .onion in the browser, you don't have to remember .onion addresses, but you are still redirected to an unreadable address.
Not sure it's the good way to do it ? Maybe as a first step ?
(It could also allow a tor search engine once tor domains are registered in namecoin).
NamecoinID: id/khal
GPG : 9CC5B92E965D69A9
NMC: N1KHAL5C1CRzy58NdJwp1tbLze3XrkFxx9
BTC: 1KHAL8bUjnkMRMg9yd2dNrYnJgZGH8Nj6T

Register Namecoin domains with BTC
My bitcoin Identity - Send messages to bitcoin users
Charity Ad - Make a good deed without paying a cent

phelix
Posts: 1634
Joined: Thu Aug 18, 2011 6:59 am

Re: [ANN] NMControl - Manage namecoin services

Post by phelix »

khal wrote:
phelix wrote: I know about the shebang. But how can a human see it? I think there are some shells that show different colors for executable files. On my vServer consoles there are no colors...
Actually I tried it and it works. Nobody would expect that, though. OK, probably we need an installer for windows.
deiban automatically (or I've uncommented the alias) add a --color to the /bin/ls command.
.py will be added, and yes, we need an installer for windows (or a bundle that one can unzip at least)
I can create a frozen python .exe so it is not necessary to install python. Also innosetup installer should be no problem (besides time :))
phelix wrote: No worries. DNS is not working? I am quite sure it worked for me :)
If I'm right (its a bit old :p) : the dns code & namecoin json analysis are mixed (wrong place/architecture), and json analysis only support spec v1.


I had written a quick tor plugin (as a proof of concept, not published to git) that does the following :
In browser : http://any-domain.tor => dns resolution by nmcontrol => 127.0.0.2 => http server of nmcontrol : read the name "tor/domain" => reply an http redirect to : xxxxx.onion

The domain name change from .tor to .onion in the browser, you don't have to remember .onion addresses, but you are still redirected to an unreadable address.
Not sure it's the good way to do it ? Maybe as a first step ?
(It could also allow a tor search engine once tor domains are registered in namecoin).
Sounds good.
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

khal
Site Admin
Posts: 708
Joined: Mon May 09, 2011 5:09 pm
os: linux

Re: [ANN] NMControl - Manage namecoin services

Post by khal »

Just a small update with the new dns plugin.

Will be usable like this :
./nmcontrol.py dns help

Code: Select all

* Available commands for plugin dns :
getFingerprint
getFreenet
getI2p
getIp4
getIp6
getOnion

./nmcontrol.py dns getIp4 www.ns.bit #(debug result for now)

Code: Select all

{u'name': u'd/ns', u'nameKey': u'ip', u'flatDomains': [u'www', u'*', u''], u'nameData': {u'map': {u'': u'10.0.0.0'}}, u'host': u'ns', u'subdomain': u'www'}

What has been done :
- the new dns plugins supports several handlers (for ".bit", ".tor", ".else", etc) and does resolve nothing by itself
- ".bit" handler (pluginNamespaceDomain.py) has been created to manage .bit domains
- domainToName mapping (ns.bit => d/ns)
- get data for the name from the data plugin
- preparation of parameters for the next step

The next step is the difficult one : analyze namecoin records to return the right values :p
NamecoinID: id/khal
GPG : 9CC5B92E965D69A9
NMC: N1KHAL5C1CRzy58NdJwp1tbLze3XrkFxx9
BTC: 1KHAL8bUjnkMRMg9yd2dNrYnJgZGH8Nj6T

Register Namecoin domains with BTC
My bitcoin Identity - Send messages to bitcoin users
Charity Ad - Make a good deed without paying a cent

Post Reply