This simple math would do the trick
git-svn-id: file:///home/svn/framework3/trunk@13766 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
@@ -84,31 +84,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
||||
|
||||
# Correct the offset according to the 2nd IP (DHCP) length
|
||||
iplen = datastore['DHCP'].length
|
||||
|
||||
if iplen == 15
|
||||
offset = 78
|
||||
elsif iplen == 14
|
||||
offset = 79
|
||||
elsif iplen == 13
|
||||
offset = 80
|
||||
elsif iplen == 12
|
||||
offset = 81
|
||||
elsif iplen == 11
|
||||
offset = 82
|
||||
elsif iplen == 10
|
||||
offset = 83
|
||||
elsif iplen == 9
|
||||
offset = 84
|
||||
elsif iplen == 8
|
||||
offset = 85
|
||||
elsif iplen == 7
|
||||
offset = 86
|
||||
elsif iplen == 6
|
||||
offset = 87
|
||||
# attack class A ip, slightly unlikly, but just in case.
|
||||
elsif iplen == 5
|
||||
offset = 88
|
||||
end
|
||||
offset = 93-iplen
|
||||
|
||||
if offset >= 80
|
||||
pktoffset = offset - 80
|
||||
|
||||
Reference in New Issue
Block a user