Post
Topic
Board Mining (Altcoins)
Re: "Cannot find Signature"... What's this?
by
yonydouna
on 26/12/2018, 18:33:17 UTC


ok you donig good so far, but the code is incomplete, you need to scroll down use the "down arrow" on the keyboard there will be more code.

you see this
Code:
"- upgrade.cgi 1/219 0%"

it means you are now at Line no 1 out if 219 lines. you need to click the down arrow a few times until you find  a part like this

Code:
f [ -f runme.sh ]; then
You mean this code?
Code:
#if [ -f runme.sh ]; then
#       sh runme.sh
#else
#       echo "Incorrect firmware!!!!" >> /tmp/upgrade_result
#fi

#
#    if [ -e /dev/mmcblk0p3 ]; then
#               mkdir $file.boot
#       mount /dev/mmcblk0p1 $file.boot
#       cp -rf * $file.boot/
#       umount $file.boot
#       sync
#       fi
#       if [ -e /dev/mtd8 ]; then
#               if [ -e initramfs.bin.SD ]; then
#                       echo "flash romfs"
#                       flash_eraseall /dev/mtd8 >/dev/null 2>&1
#                       nandwrite -p /dev/mtd8 initramfs.bin.SD >/dev/null 2>&1
#               fi
#
#               if [ -e uImage.bin ]; then
#                       echo "flash kernel"
#                       flash_eraseall /dev/mtd7 2>/dev/null
#                       nandwrite -p /dev/mtd7 uImage.bin 2>/dev/null
#               fi
#       fi
#fi

ant_result=`cat /tmp/upgrade_result`

# CGI output must start with at least empty line (or headers)

BTW/EDIT: I started to "read" what I could understand the Russian server and I leave you the code that I saw on the page, I do not know if it is this or the one above that needs to be modified:

Code:
if [ ! -f runme.sh.sig ]; then
        echo "Cannot Find Signature!!!" >> /tmp/upgrade_result
else
        openssl dgst -sha256 -verify /etc/bitmain-pub.pem -signature  runme.sh.sig  runme.sh >/dev/null  2>&1
        res=$?
        if [ $res -eq 1 ]; then
                echo "Installer Not Signtured!!!" >> /tmp/upgrade_result
        else
                if [ -f runme.sh ]; then
                        sh runme.sh
                else
                        echo "Incorrect firmware!!!!" >> /tmp/upgrade_result
                fi
        fi
fi

#if [ -f runme.sh ]; then
#       sh runme.sh
#else
#       echo "Incorrect firmware!!!!" >> /tmp/upgrade_result
#fi