diff --git a/README.md b/README.md index bdd5ede..709bf1c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Unbrick a Hikvision device. Use as follows: Setup the expected IP address: - linux$ sudo ifconfig eth0:0 192.0.0.128 + linux$ sudo ip addr add 192.0.0.128/24 dev enp4s0 osx$ sudo ifconfig en0 alias 192.0.0.128 255.255.255.0 Download the firmware to use: @@ -35,7 +35,15 @@ there are two known configurations: This program defaults to the former. The latter requires commandline overrides: - $ sudo ./hikvision_tftp.py --server-ip=172.9.18.80 --filename=digicap.mav +```bash +sudo ./hikvision_tftp.py --server-ip=192.0.0.128 --filename=digicap.dav +``` + +OR + +```bash +sudo ./hikvision_tftp.py --server-ip=172.9.18.80 --filename=digicap.mav +``` If nothing happens when your device restarts, your device may be expecting another IP address. tcpdump may be helpful in diagnosing this: diff --git a/hikvision_tftpd.py b/hikvision_tftpd.py index 5412e1f..a5eedb1 100755 --- a/hikvision_tftpd.py +++ b/hikvision_tftpd.py @@ -55,10 +55,10 @@ def _bind(self, addr): raise Error( ('Address %s:%d not available.\n\n' 'Try running:\n' - 'linux$ sudo ifconfig eth0:0 %s\n' + 'linux$ sudo ip addr add 192.0.0.128/24 dev enp4s0 %s\n' 'osx$ sudo ifconfig en0 alias %s ' '255.255.255.0\n\n' - '(adjust eth0 or en0 to taste. see "ifconfig -a" output)') + '(adjust eth0 or en0 to taste. see "ip addr" output)') % (addr[0], addr[1], addr[0], addr[0])) if e.errno == errno.EADDRINUSE: raise Error(