Skip to content

Commit 943eeb5

Browse files
authored
Ships Telnetd (#213)
1 parent 69b858f commit 943eeb5

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

services/bin/telnetd

69.8 KB
Binary file not shown.

services/service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,7 @@ function runService(): void {
610610
'd914b3b444433bf49ff83c3c0ae0b729cf7544c074e72c23ec24e5f86aaaf4ac',
611611
'6215795aed50c11bb7be716cf66326f3657a129143b5edc1b635dab8b8d2fc9f',
612612
'e04a3d61098c6f74d466da6fb457a52fb61a9cc86869059ae32b13bf43cd9d10',
613+
'c8b5093eca9a78ef70b2742f60ab7b1a04e7c9331359f234bd40a0065238815b',
613614
];
614615

615616
// RootMyTV v2

services/startup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ if [[ -e /var/luna/preferences/webosbrew_failsafe ]]; then
3030
# server and nag user to actually fix this. (since further reboots could
3131
# lead to devmode removal, etc...)
3232

33-
telnetd -l /bin/sh
33+
"${SERVICE_DIR}/bin/telnetd" -l /bin/sh
3434
sleep 1
3535

3636
luna-send -a webosbrew -f -n 1 luna://com.webos.notification/createToast '{"sourceId":"webosbrew","message": "<b>Failsafe mode!</b><br/>A crash has occured during startup. Fix any causes and reboot."}'
@@ -71,7 +71,7 @@ else
7171

7272
# Start root telnet server
7373
if [[ ! -e /var/luna/preferences/webosbrew_telnet_disabled ]]; then
74-
telnetd -l /bin/sh 200>&-
74+
"${SERVICE_DIR}/bin/telnetd" -l /bin/sh 200>&-
7575
fi
7676

7777
# Start sshd

tools/build-binaries.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,37 @@ build_sftp() {
6363
cp -v -t "${TARGET_DIR}" -- sftp-server
6464
}
6565

66+
build_telnetd() {
67+
cd "${BUILD_ROOT}/busybox-src"
68+
make allnoconfig
69+
while read -r line; do
70+
sed -i -e "s/.*${line%=*}.*/${line}/g" .config
71+
done <<EOF
72+
CONFIG_SHOW_USAGE=y
73+
CONFIG_FEATURE_VERBOSE_USAGE=y
74+
CONFIG_FEATURE_COMPRESS_USAGE=y
75+
CONFIG_FEATURE_DEVPTS=y
76+
CONFIG_LFS=y
77+
CONFIG_TELNETD=y
78+
CONFIG_FEATURE_TELNETD_STANDALONE=y
79+
CONFIG_FEATURE_TELNETD_PORT_DEFAULT=23
80+
EOF
81+
make ${MAKEOPTS} busybox
82+
cp -v busybox "${TARGET_DIR}/telnetd"
83+
}
84+
6685
[ -d "${TARGET_DIR}" ] || mkdir -p -- "${TARGET_DIR}"
6786

6887
install_ndk 'https://github.com/openlgtv/buildroot-nc4/releases/download/webos-2974f83/arm-webos-linux-gnueabi_sdk-buildroot.tar.gz' 'd7d7454390d366446c15797e1523e63a03e77cdb6391b8858a0e27d243ace34d' &
6988
download 'dropbear' 'https://github.com/mkj/dropbear/archive/refs/tags/DROPBEAR_2022.83.tar.gz' 'e02c5c36eb53bfcd3f417c6e40703a50ec790a1a772269ea156a2ccef14998d2' &
7089
download 'rsync' 'https://github.com/WayneD/rsync/archive/refs/tags/v3.2.7.tar.gz' '4f2a350baa93dc666078b84bc300767a77789ca12f0dec3cb4b3024971f8ef47' &
7190
download 'openssh' 'https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.1p1.tar.gz' '19f85009c7e3e23787f0236fbb1578392ab4d4bf9f8ec5fe6bc1cd7e8bfdd288' &
91+
download 'busybox' 'https://busybox.net/downloads/busybox-1.36.1.tar.bz2' 'b8cc24c9574d809e7279c3be349795c5d5ceb6fdf19ca709f80cde50e47de314' &
7292
wait
7393

7494
. "${NDK_PATH}/environment-setup"
7595

7696
build_dropbear
7797
build_rsync
7898
build_sftp
99+
build_telnetd

0 commit comments

Comments
 (0)