FIX: Remove Hardcoded Offset in Compression
authorAnkit Pati <redacted>
Fri, 16 Feb 2018 04:47:22 +0000 (10:17 +0530)
committerAnkit Pati <redacted>
Fri, 16 Feb 2018 18:15:10 +0000 (23:45 +0530)
commitdb29acda6507a4b9609782a6433a3c5b2a7d7b5f
tree6840c71ba08d3a757690276716321edf1fb88a00
parent04cbba965c3c79d1b6ad32ef10944e4609ac1deb
FIX: Remove Hardcoded Offset in Compression

An offset of 7 was hardcoded in the function compress_file, presumably
to skip over the default target IP address of 0.0.0.0 in a hosts file.
However, this causes problems when the default is overridden using the
--ip or -i flag, causing visibly garbled output in the generated hosts
file.

Fix is to calculate the length of target IP at runtime.
updateHostsFile.py
git clone https://git.99rst.org/PROJECT