savoyardal
n3wb
Is anybody who can write new version of repacker to support new FW 5.5.53 for platform G0 ?
Is the source code available somewhere?
Is anybody who can write new version of repacker to support new FW 5.5.53 for platform G0 ?
Certainly worth a try.
Presumably the Hikvision firmware gets rejected at a web GUI update attempt?
Are you convinced the LAview NVR is the same model?
Brilliant! Well done. I bet there was some nervousness. I know that feeling ...mission accomplished
Brilliant! Well done. I bet there was some nervousness. I know that feeling ...
Are you sure DS-2CD2414?Found firmware for DS-2CD2414 with built-in OpenVpn client.
$ ../hikpack_2.5/hikpack -t r6 -x digicap.dav -o 5.6.0/
Magic   : 484b3230
hdr_crc : 000028b8 (OK)
frm_flg : 1210050031141110011
Magic   : 484b3330
hdr_crc : c0bc25cd (OK)
version : 05060000
lang_id : 00000001
date    : 190128
frm_flg : 1210050031141110011
File: _cfgUpgClass, CRC OK
File: uImage, CRC OK
File: hik_ar9331.bin, CRC OK
File: hik_ar9331_1.bin, CRC OK
File: initrun.sh, CRC OK
File: sysVersion.bin, CRC OK
File: r7_modules.tgz, CRC OK
File: WebComponents.exe, CRC OK
File: IEfile.tar.gz, CRC OK
File: r7_app.tar.gz, CRC OK
File: sound.tar.gz, CRC OK
File: help.tar.gz, CRC OK
File: SoftwareLicense.txt, CRC OK
File: cap.json, CRC OK
File: MOTOR_APP, CRC OK
File: MOTOR_APP1, CRC OK
File: MOTOR_APP2, CRC OK
$
	$ ../hikpack_2.5/hikpack -L 1 -V 0x05060000 -t r6 -p digicap.testorig.dav -o 5.6.0/
File: _cfgUpgClass, CRC OK
File: uImage, CRC OK
File: hik_ar9331.bin, CRC OK
File: hik_ar9331_1.bin, CRC OK
File: initrun.sh, CRC OK
File: sysVersion.bin, CRC OK
File: r7_modules.tgz, CRC OK
File: WebComponents.exe, CRC OK
File: IEfile.tar.gz, CRC OK
File: r7_app.tar.gz, CRC OK
File: sound.tar.gz, CRC OK
File: help.tar.gz, CRC OK
File: SoftwareLicense.txt, CRC OK
File: cap.json, CRC OK
File: MOTOR_APP, CRC OK
File: MOTOR_APP1, CRC OK
File: MOTOR_APP2, CRC OK
*** WARNING *** HK30 header is missing firmware flags
Magic   : 484b3330
hdr_crc : 9af48fb7 (OK)
version : 05060000
lang_id : 00000001
date    : 190128
frm_flg : 1210050031141110011
*** WARNING *** HK20 record header is missing firmware flags
Magic   : 484b3230
hdr_crc : 000027d4 (OK)
frm_flg : 1210050031141110011
$
	$ curl -X PUT --digest -T digicap.testorig.dav -u admin:XXXXX http://XX.XX.XX.XX/ISAPI/System/updateFirmware
<?xml version="1.0" encoding="UTF-8"?>
<ResponseStatus version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<requestURL>/ISAPI/System/updateFirmware</requestURL>
<statusCode>6</statusCode>
<statusString>Invalid Content</statusString>
<subStatusCode>badDevType</subStatusCode>
</ResponseStatus>
$
	$ curl -X PUT --digest -T digicap.dav -u admin:XXXXX http://XX.XX.XX.XX/ISAPI/System/updateFirmware
<?xml version="1.0" encoding="UTF-8"?>
<ResponseStatus version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<requestURL>/ISAPI/System/updateFirmware</requestURL>
<statusCode>7</statusCode>
<statusString>Reboot Required</statusString>
<subStatusCode>rebootRequired</subStatusCode>
</ResponseStatus>
$
	# help
Support Commands:
taskShow                        printPart                       prtHardInfo
getPreviewStatus                setIp                           setV6ip
setGateway                      dspStatus                       outputClose
outputOpen                      getDebug                        setDebug
debugLog                        getIrstate                      getMtu
camCmd                          getCamVer                       getLux
getMcuInfo                      getMotion                       getRawdata
setIrcmd                        setRectFrame                    updateCamera
setLaserMode                    getLaserMode                    setIrMode
getIrMode                       setBaiguangMode                 getBaiguangMode
setYTLock                       InquireFanSwitch                StartLaser
CloseLaser                      LaserMotReset                   EnlargeCur
ReduceCur                       SetCur                          LaserMotDirect
LaserTeleOffset                 LaserWideOffset                 InqSwitch
InqCurrent                      InqCurMotDirect                 getMcuStateInfo
setFastFocus                    getTrackStatus                  getSelfcheckResult
setLdcMode                      getLdcMode                      appCmd
ezoomlens_start_t2_test         prtLensCurve                    getLensCurve
getIp                           gdbcfg                          {Test1}
{Test2}                         {Test3}                         {Test4}
{TestN}                         {TestY}                         setAgingMode
getAgingMode                    setAgingTime                    getAgingTime
setLensZoomPos                  getLensZoomPos                  showKey
showServer                      showUpnp                        showStatus
showDefence                     setLBS                          setAlarm
cloudService                    t1                              sandbox
ifconfig                        netstat                         ping
ping6                           top                             iostat
mpstat                          ps                              reset
dmesg                           wl                              iwpriv
iperf                           setWifiEnable                   getWifiInfo
exit                            getDateInfo                     diagnose
diag                            help                            debug
#
	HKVS # help
erase   - erase flash except bootloader area
go      - start application at address 'addr'
help    - print command description/usage
loadk   - load kernel to DRAM
update  - update digicap.dav
updateb - update bootloader
upf     - update firmware, format and update (factory use)
ddr     - ddr training function
mii     - MII utility commands
ping    - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
reset   - Perform RESET of the CPU
saveenv - save environment variables to persistent storage
setenv  - set environment variables
HKVS #
	Hm,works fine with my own repacker, created file is identical with just unpacking and repacking:Attempting to flash this file gives me an error:
$ ../hik_repack -u digicap.dav dav
HIKvision firmware repacker V0.7, (c)oded by [email protected] 11/2015
* 1210050031141110011
+ This seems to be a HK30 crypted file, unpacking HK30:
+ This seems to be a 00790000 device
* _cfgUpgClass
* uImage
* hik_ar9331.bin
* hik_ar9331_1.bin
* initrun.sh
* sysVersion.bin
* r7_modules.tgz
* WebComponents.exe
* IEfile.tar.gz
* r7_app.tar.gz
* sound.tar.gz
* help.tar.gz
* SoftwareLicense.txt
* cap.json
* MOTOR_APP
* MOTOR_APP1
* MOTOR_APP2
$ ../hik_repack -r digicap.dav dav newdigi.dav
HIKvision firmware repacker V0.7, (c)oded by [email protected] 11/2015
+ This seems to be a 00790000 device
* _cfgUpgClass (from dav/_cfgUpgClass)
* uImage (from dav/uImage)
* hik_ar9331.bin (from dav/hik_ar9331.bin)
* hik_ar9331_1.bin (from dav/hik_ar9331_1.bin)
* initrun.sh (from dav/initrun.sh)
* sysVersion.bin (from dav/sysVersion.bin)
* r7_modules.tgz (from dav/r7_modules.tgz)
* WebComponents.exe (from dav/WebComponents.exe)
* IEfile.tar.gz (from dav/IEfile.tar.gz)
* r7_app.tar.gz (from dav/r7_app.tar.gz)
* sound.tar.gz (from dav/sound.tar.gz)
* help.tar.gz (from dav/help.tar.gz)
* SoftwareLicense.txt (from dav/SoftwareLicense.txt)
* cap.json (from dav/cap.json)
* MOTOR_APP (from dav/MOTOR_APP)
* MOTOR_APP1 (from dav/MOTOR_APP1)
* MOTOR_APP2 (from dav/MOTOR_APP2)
HK30 Repack completed.
$ diff digicap.dav newdigi.dav
$
	What version of openSSL do we need to use for the compile?my own repacker
I'm using OpenSSL 0.9.8c on a 32bit machine.What version of openSSL do we need to use for the compile?
You can probably figure out that coding isn't one of my strengths ...
Interesting - I never thought to try that.These cams seem to use the same method to decrypt davinci as they use with the firmware images, in contrary to older versions that used their own encryption method for davinci.