Exetools  

Go Back   Exetools > General > General Discussion

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 06-15-2020, 09:01
atom0s's Avatar
atom0s atom0s is offline
Family
 
Join Date: Jan 2015
Location: 127.0.0.1
Posts: 431
Rept. Given: 26
Rept. Rcvd 130 Times in 67 Posts
Thanks Given: 54
Thanks Rcvd at 837 Times in 306 Posts
atom0s Reputation: 100-199 atom0s Reputation: 100-199
With the firmware dumped, this is the script that appears to work with the 'config.rom' file:

Code:
#!/bin/sh
OPTION="$1"
INPUTFILE="$2"
OUTPUTFILE="$3"

PROGRAM=`basename $0`

OPENSSL=openssl
CAT=cat
RM=rm

PASSWD=N3z0y93

#####################################################################################################
# usage
usage()
{
	echo ""
	echo "Copyright (C) ZyXEL Communications, Corp. All Rights Reserved."
	echo "Usage: $PROGRAM [option] [input filename] [output filename]"
	echo "$PROGRAM: A Simple Script to Encrypt/Decrypt file using openssl"
	echo "option : e [Encrypt],  d [Decrypt]"
	echo "Examples:"
	echo "  $PROGRAM e /var/pdm/config.rom /tmp/config.enc"
	echo ""
	exit 1
}

filenotfound()
{
	echo "Error! Input file not found."
	exit 1
}

optnotfound()
{
	echo "Error! Option not support."
	echo "option : e [Encrypt],  d [Decrypt]"
	exit 1
}
#####################################################################################################

test -n "$OPTION" || usage
test -n "$INPUTFILE" || usage
test -n "$OUTPUTFILE" || usage
test -e "$INPUTFILE" || filenotfound

case $OPTION in
	"e")
		$OPENSSL enc -e -des3 -pass pass:$PASSWD -in $INPUTFILE -out $OUTPUTFILE
		;;
	"d")
		$OPENSSL enc -d -des3 -pass pass:$PASSWD -in $INPUTFILE -out $OUTPUTFILE
		;;
	*)
		optnotfound;
		;;
esac
exit 0
__________________
Personal Projects Site: https://atom0s.com
Reply With Quote
The Following 3 Users Say Thank You to atom0s For This Useful Post:
chants (06-16-2020), flightwatch (06-15-2020), phroyt (06-16-2020)
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Signtelecom board st_vcu-v1.4 config dnvthv General Discussion 0 07-11-2019 17:41
vc2010 produced .obj is not a COFF type file ,there is anybody know why? xiaohang99 General Discussion 4 05-15-2016 17:22


All times are GMT +8. The time now is 01:15.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )