Automated Debian package build
This commit is contained in:
parent
b093177248
commit
b2a8a2f90b
.gitignoretorch-agent.servicetorch-agent_0.0.1-1.debian.tar.xztorch-agent_0.0.1-1.dsctorch-agent_0.0.1-1_all.debtorch-agent_0.0.1-1_amd64.buildinfotorch-agent_0.0.1-1_amd64.changestorch-agent_0.0.1.orig.tar.xztorch.service
debian
README.DebianREADME.sourcechangelogcontrolcopyrightdebhelper-build-stampfilesmanpage.1.exmanpage.sgml.exmanpage.xml.expostinstpostrmpreinstprerm.exrulessalsa-ci.yml.ex
source
src
torch-agent-docs.docstorch-agent.cron.d.extorch-agent.debhelper.logtorch-agent.doc-base.EXtorch-agent.installtorch-agent.postrm.debhelpertorch-agent.substvarswatch.exexample
install-ubuntu2004.shmake-pkg.shtorch-agent-0.0.1/debian
.debhelper/generated/torch-agent
source
torch-agent.installtorch-agent
DEBIAN
etc/torch
lib/systemd/system
usr/share
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
.vagrant
|
||||
build
|
|
@ -22,7 +22,6 @@ override_dh_installsystemd:
|
|||
|
||||
override_dh_installinit:
|
||||
# --no-enable only on init-system-helpers (>= 1.51)
|
||||
#dh_installinit --no-start --no-enable
|
||||
dh_installinit --no-start --no-enable
|
||||
|
||||
# dh_make generated override targets
|
2
debian/source/include-binaries
vendored
Executable file
2
debian/source/include-binaries
vendored
Executable file
|
@ -0,0 +1,2 @@
|
|||
src/usr/share/torch-agent/torch-agent.py
|
||||
src/etc/torch/torch.conf
|
2
debian/torch-agent.install
vendored
Normal file
2
debian/torch-agent.install
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
src/usr/share/torch-agent /usr/share/
|
||||
src/etc/torch /etc/
|
Binary file not shown.
|
@ -1,28 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
apt update
|
||||
apt install -y tor python3-pip
|
||||
sudo -H pip3 install stem paho-mqtt PySocks
|
||||
|
||||
sed -i '/^#ControlPort 9051/s/^#//' /etc/tor/torrc
|
||||
sed -i '/^#CookieAuthentication 1/s/^#//' /etc/tor/torrc
|
||||
echo "CookieAuthFileGroupReadable 1" >> /etc/tor/torrc
|
||||
systemctl reload tor
|
||||
|
||||
useradd --system -g debian-tor torch
|
||||
|
||||
mkdir -p /etc/torch
|
||||
cp torch.conf /etc/torch/
|
||||
chown -R torch /etc/torch
|
||||
|
||||
mkdir -p /usr/local/lib/torch
|
||||
mv torch-agent.py /usr/local/lib/torch/
|
||||
chown root:root /usr/local/lib/torch/torch-agent.py
|
||||
chmod 644 /usr/local/lib/torch/torch-agent.py
|
||||
|
||||
mv torch.service /etc/systemd/system/
|
||||
chown root:root /etc/systemd/system/torch.service
|
||||
chmod 644 /etc/systemd/system/torch.service
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl enable torch
|
24
make-pkg.sh
Executable file
24
make-pkg.sh
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
TORCH_VERSION=0.0.1
|
||||
DEBIAN_PKG=torch-agent-$TORCH_VERSION
|
||||
PKG_ROOT=build/$DEBIAN_PKG
|
||||
|
||||
rf -rf $PKG_ROOT
|
||||
|
||||
mkdir -p $PKG_ROOT
|
||||
cp -r debian $PKG_ROOT
|
||||
|
||||
mkdir -p $PKG_ROOT/src/etc/torch
|
||||
cp torch.conf $PKG_ROOT/src/etc/torch/
|
||||
|
||||
mkdir -p $PKG_ROOT/src/usr/share/torch-agent
|
||||
cp torch-agent.py $PKG_ROOT/src/usr/share/torch-agent/
|
||||
|
||||
cp torch-agent.service $PKG_ROOT/debian/
|
||||
|
||||
cd $PKG_ROOT
|
||||
|
||||
export USER=`whoami`
|
||||
dh_make --createorig -e $DEBEMAIL -s -y
|
||||
dpkg-buildpackage -k$DEBEMAIL
|
|
@ -1,2 +0,0 @@
|
|||
./debian/src/usr/share/torch-agent
|
||||
./debian/src/etc/torch
|
|
@ -1,27 +0,0 @@
|
|||
# Automatically added by dh_installsystemd/12.10ubuntu1
|
||||
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
|
||||
if deb-systemd-helper debian-installed 'torch-agent.service'; then
|
||||
# This will only remove masks created by d-s-h on package removal.
|
||||
deb-systemd-helper unmask 'torch-agent.service' >/dev/null || true
|
||||
|
||||
if deb-systemd-helper --quiet was-enabled 'torch-agent.service'; then
|
||||
# Create new symlinks, if any.
|
||||
deb-systemd-helper enable 'torch-agent.service' >/dev/null || true
|
||||
fi
|
||||
fi
|
||||
|
||||
# Update the statefile to add new symlinks (if any), which need to be cleaned
|
||||
# up on purge. Also remove old symlinks.
|
||||
deb-systemd-helper update-state 'torch-agent.service' >/dev/null || true
|
||||
fi
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installsystemd/12.10ubuntu1
|
||||
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
|
||||
if [ -d /run/systemd/system ]; then
|
||||
systemctl --system daemon-reload >/dev/null || true
|
||||
if [ -n "$2" ]; then
|
||||
deb-systemd-invoke try-restart 'torch-agent.service' >/dev/null || true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
# End automatically added section
|
|
@ -1,5 +0,0 @@
|
|||
# Automatically added by dh_installsystemd/12.10ubuntu1
|
||||
if [ -d /run/systemd/system ] && [ "$1" = remove ]; then
|
||||
deb-systemd-invoke stop 'torch-agent.service' >/dev/null || true
|
||||
fi
|
||||
# End automatically added section
|
|
@ -1,2 +0,0 @@
|
|||
debian/src/usr/share/torch-agent/torch-agent.py
|
||||
debian/src/etc/torch/torch.conf
|
|
@ -1,2 +0,0 @@
|
|||
debian/src/usr/share/torch-agent /usr/share/
|
||||
debian/src/etc/torch /etc/
|
|
@ -1 +0,0 @@
|
|||
/etc/torch/torch.conf
|
|
@ -1,12 +0,0 @@
|
|||
Package: torch-agent
|
||||
Version: 0.0.1-1
|
||||
Architecture: all
|
||||
Maintainer: Benjamin Dweck <bjdweck@gmail.com>
|
||||
Installed-Size: 29
|
||||
Depends: ssh, tor, python3-pip
|
||||
Section: net
|
||||
Priority: optional
|
||||
Homepage: https://rudefox.io
|
||||
Description: TORch is a solution for creating an SSH-via-Tor
|
||||
backdoor on a remote device as a means of fallback remote
|
||||
management and initial headless device configuration.
|
|
@ -1,5 +0,0 @@
|
|||
1e2c6dfcdaab533fa279eef51cdaa500 lib/systemd/system/torch-agent.service
|
||||
de899b3b2dbb67f357d153425a8421cd usr/share/doc/torch-agent/README.Debian
|
||||
507827efdf54541d719f3a27e1a1db5f usr/share/doc/torch-agent/changelog.Debian.gz
|
||||
7d50b1cef77999609862e52053d3ed74 usr/share/doc/torch-agent/copyright
|
||||
94f2830be2c7420e0f1c4556fc08f1ec usr/share/torch-agent/torch-agent.py
|
|
@ -1,104 +0,0 @@
|
|||
#!/bin/sh
|
||||
# postinst script for torch-agent
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <postinst> `configure' <most-recently-configured-version>
|
||||
# * <old-postinst> `abort-upgrade' <new version>
|
||||
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
||||
# <new-version>
|
||||
# * <postinst> `abort-remove'
|
||||
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
||||
# <failed-install-package> <version> `removing'
|
||||
# <conflicting-package> <version>
|
||||
# for details, see https://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
USER="torch"
|
||||
GROUP="debian-tor"
|
||||
|
||||
TORRC="/etc/tor/torrc"
|
||||
|
||||
configure_tor_controller() {
|
||||
|
||||
TORRC_CHANGED=0
|
||||
|
||||
if ! grep -q "^ControlPort [0-9]\+" $TORRC; then
|
||||
sed -i '/^#ControlPort 9051/s/^#//' $TORRC
|
||||
TORRC_CHANGED=1
|
||||
fi
|
||||
|
||||
if ! grep -q "^CookieAuthentication 1" $TORRC; then
|
||||
sed -i '/^#CookieAuthentication 1/s/^#//' $TORRC
|
||||
TORRC_CHANGED=1
|
||||
fi
|
||||
|
||||
if ! grep -q "^CookieAuthFileGroupReadable 1" $TORRC; then
|
||||
echo "CookieAuthFileGroupReadable 1" >> $TORRC
|
||||
TORRC_CHANGED=1
|
||||
fi
|
||||
|
||||
if [ $TORRC_CHANGED -eq 1 ]; then
|
||||
systemctl reload tor
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
|
||||
if ! getent passwd $USER >/dev/null ; then
|
||||
useradd -r -g $GROUP $USER
|
||||
fi
|
||||
|
||||
chown $USER /etc/torch
|
||||
chown $USER /etc/torch/torch.conf
|
||||
chown $USER /usr/share/torch-agent/torch-agent.py
|
||||
|
||||
configure_tor_controller
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
# Automatically added by dh_installsystemd/12.10ubuntu1
|
||||
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
|
||||
if deb-systemd-helper debian-installed 'torch-agent.service'; then
|
||||
# This will only remove masks created by d-s-h on package removal.
|
||||
deb-systemd-helper unmask 'torch-agent.service' >/dev/null || true
|
||||
|
||||
if deb-systemd-helper --quiet was-enabled 'torch-agent.service'; then
|
||||
# Create new symlinks, if any.
|
||||
deb-systemd-helper enable 'torch-agent.service' >/dev/null || true
|
||||
fi
|
||||
fi
|
||||
|
||||
# Update the statefile to add new symlinks (if any), which need to be cleaned
|
||||
# up on purge. Also remove old symlinks.
|
||||
deb-systemd-helper update-state 'torch-agent.service' >/dev/null || true
|
||||
fi
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installsystemd/12.10ubuntu1
|
||||
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
|
||||
if [ -d /run/systemd/system ]; then
|
||||
systemctl --system daemon-reload >/dev/null || true
|
||||
if [ -n "$2" ]; then
|
||||
deb-systemd-invoke try-restart 'torch-agent.service' >/dev/null || true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
# End automatically added section
|
||||
|
||||
|
||||
exit 0
|
|
@ -1,68 +0,0 @@
|
|||
#!/bin/sh
|
||||
# postrm script for torch-agent
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <postrm> `remove'
|
||||
# * <postrm> `purge'
|
||||
# * <old-postrm> `upgrade' <new-version>
|
||||
# * <new-postrm> `failed-upgrade' <old-version>
|
||||
# * <new-postrm> `abort-install'
|
||||
# * <new-postrm> `abort-install' <old-version>
|
||||
# * <new-postrm> `abort-upgrade' <old-version>
|
||||
# * <disappearer's-postrm> `disappear' <overwriter>
|
||||
# <overwriter-version>
|
||||
# for details, see https://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
USER="torch"
|
||||
|
||||
case "$1" in
|
||||
purge|abort-install)
|
||||
rm -rf /etc/torch
|
||||
rm -f /usr/share/torch-agent/torch-agent.py
|
||||
if [ -x "$(command -v deluser)" ]; then
|
||||
deluser --quiet --system $USER > /dev/null || true
|
||||
else
|
||||
echo >&2 "not removing $USER system account because deluser command was not found"
|
||||
fi
|
||||
;;
|
||||
remove)
|
||||
;;
|
||||
upgrade|failed-upgrade|abort-upgrade|disappear)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postrm called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
# Automatically added by dh_installsystemd/12.10ubuntu1
|
||||
if [ -d /run/systemd/system ]; then
|
||||
systemctl --system daemon-reload >/dev/null || true
|
||||
fi
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installsystemd/12.10ubuntu1
|
||||
if [ "$1" = "remove" ]; then
|
||||
if [ -x "/usr/bin/deb-systemd-helper" ]; then
|
||||
deb-systemd-helper mask 'torch-agent.service' >/dev/null || true
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$1" = "purge" ]; then
|
||||
if [ -x "/usr/bin/deb-systemd-helper" ]; then
|
||||
deb-systemd-helper purge 'torch-agent.service' >/dev/null || true
|
||||
deb-systemd-helper unmask 'torch-agent.service' >/dev/null || true
|
||||
fi
|
||||
fi
|
||||
# End automatically added section
|
||||
|
||||
|
||||
exit 0
|
|
@ -1,39 +0,0 @@
|
|||
#!/bin/sh
|
||||
# preinst script for torch-agent
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <new-preinst> `install'
|
||||
# * <new-preinst> `install' <old-version>
|
||||
# * <new-preinst> `upgrade' <old-version>
|
||||
# * <old-preinst> `abort-upgrade' <new-version>
|
||||
# for details, see https://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
case "$1" in
|
||||
install|upgrade)
|
||||
|
||||
sudo -H pip3 install stem paho-mqtt PySocks
|
||||
|
||||
mkdir -p /etc/torch
|
||||
mkdir -p /usr/share/torch-agent
|
||||
;;
|
||||
|
||||
abort-upgrade)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "preinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
|
||||
|
||||
exit 0
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
# Automatically added by dh_installsystemd/12.10ubuntu1
|
||||
if [ -d /run/systemd/system ] && [ "$1" = remove ]; then
|
||||
deb-systemd-invoke stop 'torch-agent.service' >/dev/null || true
|
||||
fi
|
||||
# End automatically added section
|
|
@ -1,19 +0,0 @@
|
|||
[tor]
|
||||
ProxyPort = 9050
|
||||
ControllerPort = 9051
|
||||
|
||||
[ssh]
|
||||
Port = 22
|
||||
|
||||
[mqtt]
|
||||
BrokerHost = mqtt.example.com # OR example1i3uyrbfoi3fi.onion
|
||||
BrokerPort = 1883
|
||||
ClientID = my-client
|
||||
Topic = example/topic
|
||||
|
||||
### Options for Using TLS
|
||||
|
||||
#RequireCertificate = true
|
||||
#CaFile = ca.crt
|
||||
#CertFile = client.crt
|
||||
#KeyFile = client.key
|
|
@ -1,13 +0,0 @@
|
|||
[Unit]
|
||||
Description=TORch Agent: MQTT Publisher for Tor Hidden SSH Service URL
|
||||
After=tor.service ssh.service
|
||||
Requires=tor.service ssh.service
|
||||
|
||||
[Service]
|
||||
Environment=PYTHONUNBUFFERED=1
|
||||
ExecStart=/usr/bin/python3 /usr/share/torch-agent/torch-agent.py
|
||||
User=torch
|
||||
Group=debian-tor
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target ssh.service tor.service
|
|
@ -1,6 +0,0 @@
|
|||
torch-agent for Debian
|
||||
---------------------
|
||||
|
||||
<possible notes regarding this package - if none, delete this file>
|
||||
|
||||
-- Benjamin Dweck <bjdweck@gmail.com> Tue, 06 Oct 2020 15:53:02 +0200
|
Binary file not shown.
|
@ -1,23 +0,0 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: torch-agent
|
||||
Upstream-Contact: bjdweck@gmail.com
|
||||
Source: https://rudefox.io
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2020 Benjamin Dweck <bjdweck@gmail.com>
|
||||
License: GPL-2+
|
||||
This package is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
.
|
||||
This package is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||
.
|
||||
On Debian systems, the complete text of the GNU General
|
||||
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
|
|
@ -1,98 +0,0 @@
|
|||
from stem.control import Controller
|
||||
import stem.connection
|
||||
import paho.mqtt.client as mqtt
|
||||
import ssl
|
||||
import socks
|
||||
import socket
|
||||
import json
|
||||
import configparser
|
||||
import argparse
|
||||
from datetime import datetime
|
||||
from os import environ
|
||||
|
||||
parser = argparse.ArgumentParser(description='Broadcast SSH hidden service hostname via MQTT')
|
||||
|
||||
parser.add_argument('--config-dir', nargs='?', dest='configPath', default='/etc/torch',
|
||||
help='configuration directory (default: /etc/torch)')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
configPath = args.configPath
|
||||
|
||||
if "TORCH_CONFIG_DIR" in environ:
|
||||
configPath = environ.get("TORCH_CONFIG_DIR")
|
||||
|
||||
if not configPath.endswith("/"):
|
||||
configPath = configPath + "/"
|
||||
|
||||
print("Using torch configuration path: " + configPath)
|
||||
|
||||
config = configparser.ConfigParser()
|
||||
config.read(configPath + "torch.conf")
|
||||
|
||||
torProxyPort = config['tor'].getint('ProxyPort', fallback = 9050)
|
||||
torControllerPort = config['tor'].getint('ControllerPort', fallback = 9051)
|
||||
|
||||
sshPort = config['ssh'].getint('Port', fallback = 22)
|
||||
|
||||
mqttConfig = config['mqtt']
|
||||
mqttBrokerHost = mqttConfig.get('BrokerHost', fallback = "localhost")
|
||||
mqttBrokerPort = mqttConfig.getint('BrokerPort', fallback = 1883)
|
||||
clientID = mqttConfig.get('ClientID', fallback = socket.gethostname())
|
||||
mqttTopic = mqttConfig.get('Topic', fallback = "torch/%s/onion_url" % (clientID))
|
||||
|
||||
mqttRequireCertificate = mqttConfig.getboolean(
|
||||
'RequireCertificate',
|
||||
fallback = False)
|
||||
|
||||
mqttCaFile = configPath + mqttConfig.get('CaFile')
|
||||
mqttCertFile = configPath + mqttConfig.get('CertFile')
|
||||
mqttKeyFile = configPath + mqttConfig.get('KeyFile')
|
||||
|
||||
with Controller.from_port(port = torControllerPort) as controller:
|
||||
|
||||
protocolInfo = stem.connection.get_protocolinfo(controller)
|
||||
|
||||
stem.connection.authenticate_safecookie(
|
||||
controller,
|
||||
protocolInfo.cookie_path)
|
||||
|
||||
print("Connected to Tor on port %s" % (torControllerPort))
|
||||
|
||||
service = controller.create_ephemeral_hidden_service(
|
||||
sshPort,
|
||||
detached = True)
|
||||
|
||||
onionAddress = "%s.onion" % (service.service_id)
|
||||
|
||||
print("Created Tor Hidden Service for local port %s at %s" % (sshPort, onionAddress))
|
||||
|
||||
payload = {
|
||||
'clientId': clientID,
|
||||
'timestamp': datetime.now().strftime("%d-%b-%Y (%H:%M:%S.%f)"),
|
||||
'onionAddress': onionAddress,
|
||||
'sshPort': sshPort
|
||||
}
|
||||
|
||||
client = mqtt.Client()
|
||||
protocol = "mqtt"
|
||||
|
||||
if mqttRequireCertificate:
|
||||
client.tls_set(
|
||||
ca_certs = mqttCaFile,
|
||||
certfile = mqttCertFile,
|
||||
keyfile = mqttKeyFile,
|
||||
cert_reqs=ssl.CERT_REQUIRED)
|
||||
protocol = "mqtts"
|
||||
|
||||
if mqttBrokerHost.endswith(".onion"):
|
||||
client.proxy_set(proxy_type=socks.SOCKS5, proxy_addr="localhost", proxy_port=torProxyPort)
|
||||
client.tls_insecure_set(True)
|
||||
|
||||
client.connect(mqttBrokerHost, mqttBrokerPort, 60)
|
||||
client.publish(mqttTopic, json.dumps(payload))
|
||||
print("Connected to MQTT Broker at %s://%s:%s/%s" % (protocol, mqttBrokerHost, mqttBrokerPort, mqttTopic))
|
||||
print("Published payload: " + json.dumps(payload))
|
||||
|
||||
client.disconnect()
|
||||
print("Disconnected from MQTT Broker")
|
0
torch-agent-0.0.1/debian/torch-agent.service → torch-agent.service
Normal file → Executable file
0
torch-agent-0.0.1/debian/torch-agent.service → torch-agent.service
Normal file → Executable file
Binary file not shown.
|
@ -1,35 +0,0 @@
|
|||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA512
|
||||
|
||||
Format: 3.0 (quilt)
|
||||
Source: torch-agent
|
||||
Binary: torch-agent
|
||||
Architecture: all
|
||||
Version: 0.0.1-1
|
||||
Maintainer: Benjamin Dweck <bjdweck@gmail.com>
|
||||
Homepage: https://rudefox.io
|
||||
Standards-Version: 4.4.1
|
||||
Build-Depends: debhelper-compat (= 12)
|
||||
Package-List:
|
||||
torch-agent deb net optional arch=all
|
||||
Checksums-Sha1:
|
||||
75a6ce9e0ad9f4ed0d2d31348c9db1238bd4f39d 9788 torch-agent_0.0.1.orig.tar.xz
|
||||
4b3e734647e0e62bbb17c1ed5dbbd853462613f9 9636 torch-agent_0.0.1-1.debian.tar.xz
|
||||
Checksums-Sha256:
|
||||
30c630f9fdbaea2337a3e8701e753ef45a094b9403e77f9a42b2bd2ca63e8dc5 9788 torch-agent_0.0.1.orig.tar.xz
|
||||
0ffd62a08673dfc3d0a7544eb62398b8fd3bd0aa71bfd19c1a8dd816c430ec1b 9636 torch-agent_0.0.1-1.debian.tar.xz
|
||||
Files:
|
||||
267a824b2a18ef73dcda05da7e99a4b5 9788 torch-agent_0.0.1.orig.tar.xz
|
||||
ee6afe9f8ff5b6cade07a66f9075c505 9636 torch-agent_0.0.1-1.debian.tar.xz
|
||||
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQFGBAEBCgAwFiEEFNiF9i0uBB0TW5u+27VgOYC/OIMFAl988dMSHGJqZHdlY2tA
|
||||
Z21haWwuY29tAAoJENu1YDmAvziDfVkIAIKkS0PLQsDNUu3cJ+3UY1PboECjQdSb
|
||||
0SpNuS61gRFJED9yoRg9XO5DMnpfp1qhVoZF0/wJSfel4Mbvyf8KPTpDYja9ZAkH
|
||||
sjFwfqmvB2Po2VAE64ym/j7HCOGSMle6+f+NrcpDiEi592UzHR6iFi6iy8YwjhDa
|
||||
xFmUJp4tPu62IUqOtASOMuQHGsY2c0j18Ev5Su0Z303MmfEp+bc/Y99lISU8cwHs
|
||||
xPxOhsPCVj55E1wEi6hFeCy7sxh28W796fqOuCWKLYjIbIk2VRZC7clZ/dLn3hHk
|
||||
RoXsSsBM5eFTK7uGKAOXCe1+AHZgsdnOU8XxnbvDMMbHYaaz7rnTNrw=
|
||||
=pqDg
|
||||
-----END PGP SIGNATURE-----
|
Binary file not shown.
|
@ -1,195 +0,0 @@
|
|||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA512
|
||||
|
||||
Format: 1.0
|
||||
Source: torch-agent
|
||||
Binary: torch-agent
|
||||
Architecture: all source
|
||||
Version: 0.0.1-1
|
||||
Checksums-Md5:
|
||||
0abbdb3e83d948e0076ba9298c5f5502 1397 torch-agent_0.0.1-1.dsc
|
||||
526fa2edc26efa17ce067b6b8b7780b5 5200 torch-agent_0.0.1-1_all.deb
|
||||
Checksums-Sha1:
|
||||
e88b32f193b3a57dd8717d02c643b6096b11e468 1397 torch-agent_0.0.1-1.dsc
|
||||
816e7a65d14e02df230346565496a2bfb4ace2ad 5200 torch-agent_0.0.1-1_all.deb
|
||||
Checksums-Sha256:
|
||||
9b9a4486d39a88c09e1bd648560cd0c70cbba0e40bed9305e540e551db31d55e 1397 torch-agent_0.0.1-1.dsc
|
||||
1560cd30b4944162d0ea4f2e4c5402527d06587c98a907820c36ec455633aede 5200 torch-agent_0.0.1-1_all.deb
|
||||
Build-Origin: Ubuntu
|
||||
Build-Architecture: amd64
|
||||
Build-Date: Wed, 07 Oct 2020 00:38:11 +0200
|
||||
Build-Tainted-By:
|
||||
merged-usr-via-symlinks
|
||||
usr-local-has-libraries
|
||||
usr-local-has-programs
|
||||
Installed-Build-Depends:
|
||||
autoconf (= 2.69-11.1),
|
||||
automake (= 1:1.16.1-4ubuntu6),
|
||||
autopoint (= 0.19.8.1-10build1),
|
||||
autotools-dev (= 20180224.1),
|
||||
base-files (= 11ubuntu5.1),
|
||||
base-passwd (= 3.5.47),
|
||||
bash (= 5.0-6ubuntu1.1),
|
||||
binutils (= 2.34-6ubuntu1),
|
||||
binutils-common (= 2.34-6ubuntu1),
|
||||
binutils-x86-64-linux-gnu (= 2.34-6ubuntu1),
|
||||
bsdmainutils (= 11.1.2ubuntu3),
|
||||
bsdutils (= 1:2.34-0.1ubuntu9),
|
||||
build-essential (= 12.8ubuntu1),
|
||||
bzip2 (= 1.0.8-2),
|
||||
coreutils (= 8.30-3ubuntu2),
|
||||
cpp (= 4:9.3.0-1ubuntu2),
|
||||
cpp-9 (= 9.3.0-10ubuntu2),
|
||||
dash (= 0.5.10.2-6),
|
||||
debconf (= 1.5.73),
|
||||
debhelper (= 12.10ubuntu1),
|
||||
debianutils (= 4.9.1),
|
||||
dh-autoreconf (= 19),
|
||||
dh-strip-nondeterminism (= 1.7.0-1),
|
||||
diffutils (= 1:3.7-3),
|
||||
dpkg (= 1.19.7ubuntu3),
|
||||
dpkg-dev (= 1.19.7ubuntu3),
|
||||
dwz (= 0.13-5),
|
||||
file (= 1:5.38-4),
|
||||
findutils (= 4.7.0-1ubuntu1),
|
||||
g++ (= 4:9.3.0-1ubuntu2),
|
||||
g++-9 (= 9.3.0-10ubuntu2),
|
||||
gawk (= 1:5.0.1+dfsg-1),
|
||||
gcc (= 4:9.3.0-1ubuntu2),
|
||||
gcc-10-base (= 10-20200411-0ubuntu1),
|
||||
gcc-9 (= 9.3.0-10ubuntu2),
|
||||
gcc-9-base (= 9.3.0-10ubuntu2),
|
||||
gettext (= 0.19.8.1-10build1),
|
||||
gettext-base (= 0.19.8.1-10build1),
|
||||
grep (= 3.4-1),
|
||||
groff-base (= 1.22.4-4build1),
|
||||
gzip (= 1.10-0ubuntu4),
|
||||
hostname (= 3.23),
|
||||
init-system-helpers (= 1.57),
|
||||
install-info (= 6.7.0.dfsg.2-5),
|
||||
intltool-debian (= 0.35.0+20060710.5),
|
||||
libacl1 (= 2.2.53-6),
|
||||
libarchive-zip-perl (= 1.67-2),
|
||||
libasan5 (= 9.3.0-10ubuntu2),
|
||||
libatomic1 (= 10-20200411-0ubuntu1),
|
||||
libattr1 (= 1:2.4.48-5),
|
||||
libaudit-common (= 1:2.8.5-2ubuntu6),
|
||||
libaudit1 (= 1:2.8.5-2ubuntu6),
|
||||
libbinutils (= 2.34-6ubuntu1),
|
||||
libblkid1 (= 2.34-0.1ubuntu9),
|
||||
libbsd0 (= 0.10.0-1),
|
||||
libbz2-1.0 (= 1.0.8-2),
|
||||
libc-bin (= 2.31-0ubuntu9),
|
||||
libc-dev-bin (= 2.31-0ubuntu9),
|
||||
libc6 (= 2.31-0ubuntu9),
|
||||
libc6-dev (= 2.31-0ubuntu9),
|
||||
libcap-ng0 (= 0.7.9-2.1build1),
|
||||
libcc1-0 (= 10-20200411-0ubuntu1),
|
||||
libcroco3 (= 0.6.13-1),
|
||||
libcrypt-dev (= 1:4.4.10-10ubuntu4),
|
||||
libcrypt1 (= 1:4.4.10-10ubuntu4),
|
||||
libctf-nobfd0 (= 2.34-6ubuntu1),
|
||||
libctf0 (= 2.34-6ubuntu1),
|
||||
libdb5.3 (= 5.3.28+dfsg1-0.6ubuntu2),
|
||||
libdebconfclient0 (= 0.251ubuntu1),
|
||||
libdebhelper-perl (= 12.10ubuntu1),
|
||||
libdpkg-perl (= 1.19.7ubuntu3),
|
||||
libelf1 (= 0.176-1.1build1),
|
||||
libffi7 (= 3.3-4),
|
||||
libfile-stripnondeterminism-perl (= 1.7.0-1),
|
||||
libgcc-9-dev (= 9.3.0-10ubuntu2),
|
||||
libgcc-s1 (= 10-20200411-0ubuntu1),
|
||||
libgcrypt20 (= 1.8.5-5ubuntu1),
|
||||
libgdbm-compat4 (= 1.18.1-5),
|
||||
libgdbm6 (= 1.18.1-5),
|
||||
libglib2.0-0 (= 2.64.3-1~ubuntu20.04.1),
|
||||
libgmp10 (= 2:6.2.0+dfsg-4),
|
||||
libgomp1 (= 10-20200411-0ubuntu1),
|
||||
libgpg-error0 (= 1.37-1),
|
||||
libicu66 (= 66.1-2ubuntu2),
|
||||
libisl22 (= 0.22.1-1),
|
||||
libitm1 (= 10-20200411-0ubuntu1),
|
||||
liblsan0 (= 10-20200411-0ubuntu1),
|
||||
liblz4-1 (= 1.9.2-2),
|
||||
liblzma5 (= 5.2.4-1ubuntu1),
|
||||
libmagic-mgc (= 1:5.38-4),
|
||||
libmagic1 (= 1:5.38-4),
|
||||
libmount1 (= 2.34-0.1ubuntu9),
|
||||
libmpc3 (= 1.1.0-1),
|
||||
libmpfr6 (= 4.0.2-1),
|
||||
libpam-modules (= 1.3.1-5ubuntu4),
|
||||
libpam-modules-bin (= 1.3.1-5ubuntu4),
|
||||
libpam-runtime (= 1.3.1-5ubuntu4),
|
||||
libpam0g (= 1.3.1-5ubuntu4),
|
||||
libpcre2-8-0 (= 10.34-7),
|
||||
libpcre3 (= 2:8.39-12build1),
|
||||
libperl5.30 (= 5.30.0-9build1),
|
||||
libpipeline1 (= 1.5.2-2build1),
|
||||
libquadmath0 (= 10-20200411-0ubuntu1),
|
||||
libreadline8 (= 8.0-4),
|
||||
libseccomp2 (= 2.4.3-1ubuntu3.20.04.3),
|
||||
libselinux1 (= 3.0-1build2),
|
||||
libsigsegv2 (= 2.12-2),
|
||||
libsmartcols1 (= 2.34-0.1ubuntu9),
|
||||
libstdc++-9-dev (= 9.3.0-10ubuntu2),
|
||||
libstdc++6 (= 10-20200411-0ubuntu1),
|
||||
libsub-override-perl (= 0.09-2),
|
||||
libsystemd0 (= 245.4-4ubuntu3.2),
|
||||
libtinfo6 (= 6.2-0ubuntu2),
|
||||
libtool (= 2.4.6-14),
|
||||
libtsan0 (= 10-20200411-0ubuntu1),
|
||||
libubsan1 (= 10-20200411-0ubuntu1),
|
||||
libuchardet0 (= 0.0.6-3build1),
|
||||
libudev1 (= 245.4-4ubuntu3.2),
|
||||
libunistring2 (= 0.9.10-2),
|
||||
libuuid1 (= 2.34-0.1ubuntu9),
|
||||
libxml2 (= 2.9.10+dfsg-5),
|
||||
libzstd1 (= 1.4.4+dfsg-3),
|
||||
linux-libc-dev (= 5.4.0-47.51),
|
||||
login (= 1:4.8.1-1ubuntu5.20.04),
|
||||
lsb-base (= 11.1.0ubuntu2),
|
||||
m4 (= 1.4.18-4),
|
||||
make (= 4.2.1-1.2),
|
||||
man-db (= 2.9.1-1),
|
||||
mawk (= 1.3.4.20200120-2),
|
||||
ncurses-base (= 6.2-0ubuntu2),
|
||||
ncurses-bin (= 6.2-0ubuntu2),
|
||||
patch (= 2.7.6-6),
|
||||
perl (= 5.30.0-9build1),
|
||||
perl-base (= 5.30.0-9build1),
|
||||
perl-modules-5.30 (= 5.30.0-9build1),
|
||||
po-debconf (= 1.0.21),
|
||||
readline-common (= 8.0-4),
|
||||
sed (= 4.7-1),
|
||||
sensible-utils (= 0.0.12+nmu1),
|
||||
sysvinit-utils (= 2.96-2.1ubuntu1),
|
||||
tar (= 1.30+dfsg-7),
|
||||
tzdata (= 2020a-0ubuntu0.20.04),
|
||||
util-linux (= 2.34-0.1ubuntu9),
|
||||
xz-utils (= 5.2.4-1ubuntu1),
|
||||
zlib1g (= 1:1.2.11.dfsg-2ubuntu1)
|
||||
Environment:
|
||||
DEB_BUILD_OPTIONS="parallel=4"
|
||||
LANG="en_US.UTF-8"
|
||||
LC_ADDRESS="en_US.UTF-8"
|
||||
LC_IDENTIFICATION="en_US.UTF-8"
|
||||
LC_MEASUREMENT="en_US.UTF-8"
|
||||
LC_MONETARY="en_US.UTF-8"
|
||||
LC_NAME="en_US.UTF-8"
|
||||
LC_NUMERIC="en_US.UTF-8"
|
||||
LC_PAPER="en_US.UTF-8"
|
||||
LC_TELEPHONE="en_US.UTF-8"
|
||||
LC_TIME="en_US.UTF-8"
|
||||
SOURCE_DATE_EPOCH="1601992382"
|
||||
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQFGBAEBCgAwFiEEFNiF9i0uBB0TW5u+27VgOYC/OIMFAl988dQSHGJqZHdlY2tA
|
||||
Z21haWwuY29tAAoJENu1YDmAvziDbhIH/RLtAHLasxrim/3qkhGJAUApkzoIhxEZ
|
||||
feWBwQ5nncKnt9vNRaQVOuQ4GWVRcpNtEQGWc+6/XE9U28XcOMZ/DMlvt8laFOCp
|
||||
w4mmTpzFUnskXaNHqNEP3en85Opb7eeQCOJjuvEvUmo8lk5jtASXcxT7pNcDlb3X
|
||||
NAXUyO22s81SHB1TnnwXOfIKLV5duo0pSJxZ+QwKoQtfYIuyHNvilvr8DaoKiltp
|
||||
a2EjwyBWPfdJHHnKcv2Zyye65eQOr3VE8dP6k5OQWcuC2bHh84YgwyN6cmgWaELt
|
||||
XlCu5sA5TPzNbO0gyVOtMBnyZ3B9tQ80Yzu/UWIiVTfTUzyMF8nugNI=
|
||||
=l2RV
|
||||
-----END PGP SIGNATURE-----
|
|
@ -1,49 +0,0 @@
|
|||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA512
|
||||
|
||||
Format: 1.8
|
||||
Date: Tue, 06 Oct 2020 15:53:02 +0200
|
||||
Source: torch-agent
|
||||
Binary: torch-agent
|
||||
Architecture: source all
|
||||
Version: 0.0.1-1
|
||||
Distribution: unstable
|
||||
Urgency: medium
|
||||
Maintainer: Benjamin Dweck <bjdweck@gmail.com>
|
||||
Changed-By: Benjamin Dweck <bjdweck@gmail.com>
|
||||
Description:
|
||||
torch-agent - TORch is a solution for creating an SSH-via-Tor
|
||||
Changes:
|
||||
torch-agent (0.0.1-1) unstable; urgency=medium
|
||||
.
|
||||
* Initial release
|
||||
Checksums-Sha1:
|
||||
e88b32f193b3a57dd8717d02c643b6096b11e468 1397 torch-agent_0.0.1-1.dsc
|
||||
75a6ce9e0ad9f4ed0d2d31348c9db1238bd4f39d 9788 torch-agent_0.0.1.orig.tar.xz
|
||||
4b3e734647e0e62bbb17c1ed5dbbd853462613f9 9636 torch-agent_0.0.1-1.debian.tar.xz
|
||||
816e7a65d14e02df230346565496a2bfb4ace2ad 5200 torch-agent_0.0.1-1_all.deb
|
||||
d6de1f688aefa348cbcb38513c0418731a32be6c 6115 torch-agent_0.0.1-1_amd64.buildinfo
|
||||
Checksums-Sha256:
|
||||
9b9a4486d39a88c09e1bd648560cd0c70cbba0e40bed9305e540e551db31d55e 1397 torch-agent_0.0.1-1.dsc
|
||||
30c630f9fdbaea2337a3e8701e753ef45a094b9403e77f9a42b2bd2ca63e8dc5 9788 torch-agent_0.0.1.orig.tar.xz
|
||||
0ffd62a08673dfc3d0a7544eb62398b8fd3bd0aa71bfd19c1a8dd816c430ec1b 9636 torch-agent_0.0.1-1.debian.tar.xz
|
||||
1560cd30b4944162d0ea4f2e4c5402527d06587c98a907820c36ec455633aede 5200 torch-agent_0.0.1-1_all.deb
|
||||
98ac5666f20bfc2c3a7f803db6ac769df8be8f7f9a65742651c988e7104e5c34 6115 torch-agent_0.0.1-1_amd64.buildinfo
|
||||
Files:
|
||||
0abbdb3e83d948e0076ba9298c5f5502 1397 net optional torch-agent_0.0.1-1.dsc
|
||||
267a824b2a18ef73dcda05da7e99a4b5 9788 net optional torch-agent_0.0.1.orig.tar.xz
|
||||
ee6afe9f8ff5b6cade07a66f9075c505 9636 net optional torch-agent_0.0.1-1.debian.tar.xz
|
||||
526fa2edc26efa17ce067b6b8b7780b5 5200 net optional torch-agent_0.0.1-1_all.deb
|
||||
22b4edf1ac9a92dd878357a8ea5ba939 6115 net optional torch-agent_0.0.1-1_amd64.buildinfo
|
||||
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQFGBAEBCgAwFiEEFNiF9i0uBB0TW5u+27VgOYC/OIMFAl988dQSHGJqZHdlY2tA
|
||||
Z21haWwuY29tAAoJENu1YDmAvziDZJEH/0jFrjHV/crXnpwtzLt81CBJPTs84Uhp
|
||||
crgNc1Dh6cul4a78mIlNMr/aTTAHUqV0PuOAuNsrsNZA0LBPH9Fa/sFuQAQVp8UC
|
||||
TFffl9gt+s8UnR+JyYVW29PU/bLyrFeZPYYOrH/4xJ1houxgtAFgUh3B40cbX/26
|
||||
CKyR4xMOFdtccSsZVJkPewrTHKDF1hibh4isK53/mHeCUnrlzosoZn873ZallEFD
|
||||
tgbnmfMfx+ILlraz5L5UqghMZp+v8UqGuFV8D2EOC0XyRcpCpqlkioflUmL1AHML
|
||||
KBqLg28oKmF56wyGfZgygzTUt/5tWTehjNwn36Ro+ZKbDMy1topS6aw=
|
||||
=ufxl
|
||||
-----END PGP SIGNATURE-----
|
Binary file not shown.
|
@ -1,13 +0,0 @@
|
|||
[Unit]
|
||||
Description=Torch: MQTT Publisher for Tor Hidden SSH Service URL
|
||||
After=tor.service ssh.service
|
||||
Requires=tor.service ssh.service
|
||||
|
||||
[Service]
|
||||
Environment=PYTHONUNBUFFERED=1
|
||||
ExecStart=/usr/bin/python3 /usr/local/lib/torch/torch-agent.py
|
||||
User=torch
|
||||
Group=debian-tor
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target ssh.service tor.service
|
Loading…
Reference in New Issue
Block a user