Add telnet command

This commit is contained in:
jld3103 2021-08-17 20:47:14 +02:00
parent f3e555f13b
commit 4df7e93655
3 changed files with 18 additions and 2 deletions

View file

@ -2,10 +2,10 @@ FROM archlinux:base-devel
RUN pacman -Syu --noconfirm \
python python-pip \
devtools rsync \
arch-install-scripts rsync \
aarch64-linux-gnu-gcc aarch64-linux-gnu-binutils aarch64-linux-gnu-glibc aarch64-linux-gnu-linux-api-headers \
git \
android-tools
android-tools openssh inetutils
RUN sed -i "s/EUID == 0/EUID == -1/g" $(which makepkg)

View file

@ -5,6 +5,7 @@ from boot import cmd_boot
from flash import cmd_flash
from ssh import cmd_ssh
from forwarding import cmd_forwarding
from telnet import cmd_telnet
import click
@ -20,3 +21,4 @@ cli.add_command(cmd_boot)
cli.add_command(cmd_flash)
cli.add_command(cmd_ssh)
cli.add_command(cmd_forwarding)
cli.add_command(cmd_telnet)

14
telnet.py Normal file
View file

@ -0,0 +1,14 @@
import subprocess
import click
from logger import setup_logging, verbose_option
@click.command(name='telnet')
@verbose_option
def cmd_telnet(verbose):
setup_logging(verbose)
subprocess.run([
'telnet',
'172.16.42.1',
])