tMakefile fixes; rename dirauth.py to damauth.py - tordam - A library for peer discovery inside the Tor network
 (HTM) git clone https://git.parazyd.org/tordam
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 7fc35c1c28c73e9416e2460bdebd79dc3a315ad3
 (DIR) parent 286c4b5b75ddf272aa0ba0875b51129bad31340d
 (HTM) Author: parazyd <parazyd@dyne.org>
       Date:   Sat,  9 Dec 2017 18:25:50 +0100
       
       Makefile fixes; rename dirauth.py to damauth.py
       
       Diffstat:
         M python/Makefile                     |       8 +++-----
         A python/damauth.py                   |      16 ++++++++++++++++
         D python/dirauth.py                   |      16 ----------------
       
       3 files changed, 19 insertions(+), 21 deletions(-)
       ---
 (DIR) diff --git a/python/Makefile b/python/Makefile
       t@@ -4,7 +4,7 @@ PREFIX ?= /usr/local
        
        BIN =\
                damhs.py \
       -        dirauth.py
       +        damauth.py
        
        all:
                @echo 'Run "make install" to install the scripts to $(DESTDIR)$(PREFIX)/bin'
       t@@ -13,12 +13,10 @@ install:
                @echo 'Installing scripts to $(DESTDIR)$(PREFIX)/bin'
                mkdir -p $(DESTDIR)$(PREFIX)/bin
                cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin
       -        cd $(DESTDIR)$(PREFIX)/bin
       -        chmod 755 $(BIN)
       +        for f in $(BIN); do chmod 755 "$(DESTDIR)$(PREFIX)/bin/$$f"; done
        
        uninstall:
                @echo 'Uninstalling scripts from $(DESTDIR)$(PREFIX)/bin'
       -        cd $(DESTDIR)$(PREFIX)/bin
       -        rm -f $(BIN)
       +        for f in $(BIN); do rm -f "$(DESTDIR)$(PREFIX)/bin/$$f"; done
        
        .PHONY: all install uninstall
 (DIR) diff --git a/python/damauth.py b/python/damauth.py
       t@@ -0,0 +1,16 @@
       +#!/usr/bin/env python3
       +# See LICENSE file for copyright and license details.
       +"""
       +Retrieves and prints a hidden service's public key to stdout.
       +
       +Usage: damauth.py <foo.onion>
       +"""
       +
       +from sys import argv, stdout
       +from stem.control import Controller
       +
       +
       +with Controller.from_port() as ctl:
       +    ctl.authenticate(password='topkek')
       +    stdout.write(ctl.get_hidden_service_descriptor(argv[1]).permanent_key)
       +    stdout.flush()
 (DIR) diff --git a/python/dirauth.py b/python/dirauth.py
       t@@ -1,16 +0,0 @@
       -#!/usr/bin/env python3
       -# See LICENSE file for copyright and license details.
       -"""
       -Retrieves and prints a hidden service's public key to stdout.
       -
       -Usage: dirauth.py <foo.onion>
       -"""
       -
       -from sys import argv, stdout
       -from stem.control import Controller
       -
       -
       -with Controller.from_port() as ctl:
       -    ctl.authenticate(password='topkek')
       -    stdout.write(ctl.get_hidden_service_descriptor(argv[1]).permanent_key)
       -    stdout.flush()