Fix for ip-addresses containing 0's

A bug resulting in 0's being represented as empty when converting IP addresses for meterpreter injections was fixed. 
i.e. 192.168.0.10 => 0xc0,0xa8,0x0a instead of 0xc0,0xa8,0x00,0x0a
This commit is contained in:
z0noxz
2017-05-10 18:35:09 +02:00
committed by GitHub
parent b3120d48bc
commit 865b5dc9f6

View File

@@ -374,9 +374,12 @@ def which(program):
# Integer to binary converter
def binarray(n):
while n:
yield n & 0xff
n = n >> 8
if (n == 0):
yield 0
else:
while n:
yield n & 0xff
n = n >> 8
# Creates dynamic variable names while checking for name collisions