Add telnet command
This commit is contained in:
parent
f3e555f13b
commit
4df7e93655
3 changed files with 18 additions and 2 deletions
|
@ -2,10 +2,10 @@ FROM archlinux:base-devel
|
||||||
|
|
||||||
RUN pacman -Syu --noconfirm \
|
RUN pacman -Syu --noconfirm \
|
||||||
python python-pip \
|
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 \
|
aarch64-linux-gnu-gcc aarch64-linux-gnu-binutils aarch64-linux-gnu-glibc aarch64-linux-gnu-linux-api-headers \
|
||||||
git \
|
git \
|
||||||
android-tools
|
android-tools openssh inetutils
|
||||||
|
|
||||||
RUN sed -i "s/EUID == 0/EUID == -1/g" $(which makepkg)
|
RUN sed -i "s/EUID == 0/EUID == -1/g" $(which makepkg)
|
||||||
|
|
||||||
|
|
2
main.py
2
main.py
|
@ -5,6 +5,7 @@ from boot import cmd_boot
|
||||||
from flash import cmd_flash
|
from flash import cmd_flash
|
||||||
from ssh import cmd_ssh
|
from ssh import cmd_ssh
|
||||||
from forwarding import cmd_forwarding
|
from forwarding import cmd_forwarding
|
||||||
|
from telnet import cmd_telnet
|
||||||
import click
|
import click
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,3 +21,4 @@ cli.add_command(cmd_boot)
|
||||||
cli.add_command(cmd_flash)
|
cli.add_command(cmd_flash)
|
||||||
cli.add_command(cmd_ssh)
|
cli.add_command(cmd_ssh)
|
||||||
cli.add_command(cmd_forwarding)
|
cli.add_command(cmd_forwarding)
|
||||||
|
cli.add_command(cmd_telnet)
|
||||||
|
|
14
telnet.py
Normal file
14
telnet.py
Normal 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',
|
||||||
|
])
|
Loading…
Add table
Add a link
Reference in a new issue