Page 19 of 26
Re: Fixing SamyGO telnet/SSH/SCP/bash on C series
Posted: Mon May 11, 2015 6:23 pm
by miazza
sectroyer wrote:I don't udernstand a thing but I can tell you that if you format disk with your Win 8.1 you should be able to install Linux

HAHAHAH I also have a linux partition on this but it's only for me ... my wife would be totally lost.
I mean that when I mount samba on windows 8.1 at the IP address of my 40F8000 I can mount the following shares:
- Samsung TV mtd_rwcommon
- Samsung TV root
- Samsung TV USB
This is not the case on 46ES8000 and 22F5400 where only Samsung TV USB is available.
Re: Fixing SamyGO telnet/SSH/SCP/bash on C series
Posted: Mon May 11, 2015 7:10 pm
by miazza
sectroyer wrote:miazza wrote:
So for F8000 I have to follow this except this. Right ?
Code: Select all
[ -e $MOD_DIR/kernel/drivers/pty/mount.ko ] && insmod $MOD_DIR/kernel/drivers/pty/mount.ko || echo "mount.ko not found."
Yeah I think so. You should find the line with SRS_module.ko and AFTER that put next 3 lines
miazza wrote:
And this will allow me to have a real telnet that provides me echo ?
Well not sure if it will fix it but you will definitely need it to make "echo work"
miazza wrote:
Right now with Win 8.1 if I map the TV in the network I can see USB,Root and RWCommon. Tjis is quite dangerous if somebody from family is deleting files....
On ES800 I can only see USB.
I don't udernstand a thing but I can tell you that if you format disk with your Win 8.1 you should be able to install Linux

This is my 01_01_catch_crap.init.
Cannot locate where to modify.
Code: Select all
#!/bin/sh
#
# ? Copyright 1996-2014, SamyGO
#
#
. /dtv/SGO.env
case $1 in
start)
echo "+++++++++++Release notes++++++++++" > $LOGFILE
cat $SYSROOT/etc/version >> $LOGFILE 2>&1
echo " " >> $LOGFILE 2>&1
echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE
echo "cat /.version" >> $LOGFILE
echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE
cat /.version >> $LOGFILE 2>&1
echo " " >> $LOGFILE 2>&1
echo "++++++++++SGO.env+++++++++++++++++" >> $LOGFILE
cat /dtv/SGO.env >> $LOGFILE
echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE
#skip module version check
if [ `samyGOkover $MOD_DIR/kernel/drivers/pty/anyver.ko | grep -c $KMOD_VER` -eq 1 ] ; then
echo "anyver.ko is already vermagic=$KMOD_VER" >> $LOGFILE
else
samyGOkover $MOD_DIR/kernel/drivers/pty/anyver.ko $KMOD_VER >> $LOGFILE 2>&1
echo "anyver.ko set to vermagic=$KMOD_VER" >> $LOGFILE
sync; sleep 2
fi
insmod $MOD_DIR/kernel/drivers/pty/anyver.ko || dmesg | tail >> $LOGFILE 2>&1
echo " " >> $LOGFILE
echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE
echo "lsmod after insmod anyver.ko:" >> $LOGFILE
echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE
lsmod >> $LOGFILE 2>&1
#Unload ARS_module if not unloaded before.
# cd / && /sbin/rmmod ARS_module >> $LOGFILE 2>&1
# enable loopback network interface, required on some b-series (b550,b6000?)
ifconfig lo 127.0.0.1
# unhide 'unsupported' filesystems from usb mount (don't work?)
# sed -i "s,\(FileSystem : \)ext.,\1vfat,g" /dtv/usb/log # not needed for F series.
# set time, required for ssl communication but tv 'll show strange values, so disable per default
# busybox date is disabled on F series
# $SYSROOT/bin/busybox date -s "2013-12-28 15:50:00"
# c-series mips
# todo write test...
#mount -t tmpfs none /mtd_ram #on E/F series this disables integrated camera!
# prepare for full module replacement
# lsmod | sed 's#.* .*[0-9] .*[0-9] \(.*\)#\1#' | sed 's#,# #g'
#catch samba credintials file:
if [ -e /dtv/usb/sd*/smb_userdata ]; then
cp -fa /dtv/usb/sd*/smb_userdata /mtd_rwarea/smb_userdata
echo "smb_userdata copied to /mtd_rwarea" >> $LOGFILE
else
echo " " >> $LOGFILE 2>&1
echo "--------------------------------------" >> $LOGFILE
echo "No new smb_userdata on USB found" >> $LOGFILE
echo "--------------------------------------" >> $LOGFILE
fi
;;
stop)
;;
status)
;;
*)
echo "Usage: $0 {start|stop|status}" 1>&2
exit 0
;;
esac
Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series
Posted: Mon May 11, 2015 10:49 pm
by sectroyer
Any results ?

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series
Posted: Tue May 12, 2015 6:28 am
by miazza
sectroyer wrote:
Any results ?

Code: Select all
VDLinux#> grep SRS_module /mnt/etc/* -r
/mnt/etc/init.d/01_02_telnet.init: insmod $MOD_DIR/kernel/drivers/pty/SRS_module.ko >> $LOGFILE 2>&1
/mnt/etc/init.d/01_02_telnet.init: echo "lsmod after insmod SRS_module.ko:" >> $LOGFILE 2>&1
VDLinux#>
Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series
Posted: Tue May 12, 2015 5:06 pm
by sectroyer
okay then everything regarding E series and ./etc/init.d/01_01_catch_crap.init you should put in /mnt/etc/init.d/01_02_telnet.init AFTER SRS_module stuff

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series
Posted: Tue May 12, 2015 9:12 pm
by miazza
I am lost about where to put all other mod.
My 01_02_telnet.init is here... ...could you kindly assist me in the mod ?
Code: Select all
#!/mnt/bin/busybox sh
#
# ? Copyright 1996-2013, SamyGO
#
#
. /dtv/SGO.env
stop_bootloop()
{
# emergency skript exit to prevent boot loop
for USB in ${1:- \
/dtv/usb/sd* } ; do
echo "checking $USB"
sleep 1
if [ -e $USB/STOP_TELNET ]; then
"STOP_TELNET found. Script exit..."
exit 1
fi
done
}
case $1 in
start)
stop_bootloop # in testing phase. Just for protection.
#antishell, mount, console unlock, authuld exception, printk restrictions:
insmod $MOD_DIR/kernel/drivers/pty/SRS_module.ko >> $LOGFILE 2>&1
sync; sleep 1
echo " " >> $LOGFILE 2>&1
echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
echo "lsmod after insmod SRS_module.ko:" >> $LOGFILE 2>&1
echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
lsmod >> $LOGFILE 2>&1
echo " " >> $LOGFILE 2>&1
#modules with dynamic addressing by bugficks:
insmod $MOD_DIR/kernel/drivers/pty/ptys.ko >> $LOGFILE 2>&1 # alternative to pty.ko and devpts.ko from bugficks. Automatic mount of /dev/pts
sync; sleep 2
# true telnet
$SYSROOT/bin/busybox2 telnetd -p 23 -l $SYSROOT/bin/ash & >> $LOGFILE 2>&1
sync
#### E/F series: bind option is prohibited, you have to load proper mount.ko to use mount --bind.
#mount our profile over original /etc/profile if mount.ko is loaded and mount issue fixed:
$SYSROOT/bin/busybox mount -o bind /mtd_rwarea/profile /etc/profile || echo "can not mount profile!" && dmesg | tail >> $LOGFILE 2>&1
# mount our passwd file over original one (/bin/sh changed to /mnt/bin/sh )
if [ ! -e /mtd_rwarea/passwd ]; then
echo "root:saJvQKUdIxRW2:0:0:SamyGO secured Root:$NEW_HOME:$SYSROOT/bin/ash" > /mtd_rwarea/passwd
fi
$SYSROOT/bin/busybox mount -o bind /mtd_rwarea/passwd /etc/passwd || echo "can not mount passwd" && dmesg | tail >> $LOGFILE 2>&1
echo " " >> $LOGFILE 2>&1
echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
echo "checking mount --bind:" >> $LOGFILE 2>&1
echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
$SYSROOT/bin/busybox mount | grep "etc" >> $LOGFILE 2>&1
echo " " >> $LOGFILE 2>&1
echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
echo "dmesg -c:" >> $LOGFILE 2>&1
echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
dmesg -c >> $LOGFILE 2>&1
echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
;;
stop)
;;
status)
;;
*)
echo "Usage: $0 {start|stop|status}" 1>&2
exit 0
;;
esac
Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series
Posted: Tue May 12, 2015 9:29 pm
by sectroyer
AFTER this:
also please
fix this line :
Code: Select all
$SYSROOT/bin/busybox2 telnetd -p 23 -l $SYSROOT/bin/ash & >> $LOGFILE 2>&1
with:
Code: Select all
$SYSROOT/bin/busybox2 telnetd -p 23 -l /mnt/bin/sh & >> $LOGFILE 2>&1
Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series
Posted: Tue May 12, 2015 10:01 pm
by miazza
Code: Select all
#!/mnt/bin/busybox sh
#
# ? Copyright 1996-2013, SamyGO
#
#
. /dtv/SGO.env
stop_bootloop()
{
# emergency skript exit to prevent boot loop
for USB in ${1:- \
/dtv/usb/sd* } ; do
echo "checking $USB"
sleep 1
if [ -e $USB/STOP_TELNET ]; then
"STOP_TELNET found. Script exit..."
exit 1
fi
done
}
case $1 in
start)
stop_bootloop # in testing phase. Just for protection.
#antishell, mount, console unlock, authuld exception, printk restrictions:
insmod $MOD_DIR/kernel/drivers/pty/SRS_module.ko >> $LOGFILE 2>&1
sync; sleep 1
echo " " >> $LOGFILE 2>&1
echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
echo "lsmod after insmod SRS_module.ko:" >> $LOGFILE 2>&1
echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
lsmod >> $LOGFILE 2>&1
echo " " >> $LOGFILE 2>&1
#modules with dynamic addressing by bugficks:
insmod $MOD_DIR/kernel/drivers/pty/ptys.ko >> $LOGFILE 2>&1 # alternative to pty.ko and devpts.ko from bugficks. Automatic mount of /dev/pts
/bin/mount -o bind /mtd_rwarea/passwd /etc/passwd
/bin/mount -o bind /mtd_rwarea/profile /etc/profile
/bin/mount -o bind /mnt/bin/sh /bin/sh
sync; sleep 2
# true telnet
$SYSROOT/bin/busybox2 telnetd -p 23 -l /mnt/bin/sh & >> $LOGFILE 2>&1
sync
#### E/F series: bind option is prohibited, you have to load proper mount.ko to use mount --bind.
#mount our profile over original /etc/profile if mount.ko is loaded and mount issue fixed:
$SYSROOT/bin/busybox mount -o bind /mtd_rwarea/profile /etc/profile || echo "can not mount profile!" && dmesg | tail >> $LOGFILE 2>&1
# mount our passwd file over original one (/bin/sh changed to /mnt/bin/sh )
if [ ! -e /mtd_rwarea/passwd ]; then
echo "root:saJvQKUdIxRW2:0:0:SamyGO secured Root:$NEW_HOME:$SYSROOT/bin/ash" > /mtd_rwarea/passwd
fi
$SYSROOT/bin/busybox mount -o bind /mtd_rwarea/passwd /etc/passwd || echo "can not mount passwd" && dmesg | tail >> $LOGFILE 2>&1
echo " " >> $LOGFILE 2>&1
echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
echo "checking mount --bind:" >> $LOGFILE 2>&1
echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
$SYSROOT/bin/busybox mount | grep "etc" >> $LOGFILE 2>&1
echo " " >> $LOGFILE 2>&1
echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
echo "dmesg -c:" >> $LOGFILE 2>&1
echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
dmesg -c >> $LOGFILE 2>&1
echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
;;
stop)
;;
status)
;;
*)
echo "Usage: $0 {start|stop|status}" 1>&2
exit 0
;;
esac
Like this ans safely I can overwrite over ftp ?
Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series
Posted: Wed May 13, 2015 8:24 am
by sectroyer
Yeah I think so

Anyway ftp will still work. Only telnet might stop working. Just remember to "chmod +x" this init script

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series
Posted: Wed May 13, 2015 9:15 pm
by miazza
Before:
Code: Select all
DLinux#>alias alert="samyGOso -A -B -l /mnt/opt/privateer/usr/libso/libAlert.so"
VDLinux#>alert MSGBOX:"blub"
After:
Code: Select all
/mnt # alias alert="samyGOso -A -B -l /mnt/opt/privateer/usr/libso/libAlert.so"
/mnt # alert MSGBOX:"blub"
/mnt #
Different look but same issue ... no echo...