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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user