Skip to content

Commit

Permalink
Add the MTU when it's available
Browse files Browse the repository at this point in the history
This doesn't work on 1.4, but I'm not Java-savvy enough to figure out
how to only compile it for 1.4, so do a ghetto try-catch block in case
the method doesn't exist.
  • Loading branch information
egypt committed Mar 1, 2012
1 parent bde9a84 commit 14dfcce
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ public int execute(Meterpreter meterpreter, TLVPacket request, TLVPacket respons
ifaceTLV.add(TLVType.TLV_TYPE_IP, new byte[4]);
ifaceTLV.add(TLVType.TLV_TYPE_NETMASK, new byte[4]);
}
try {
ifaceTLV.add(TLVType.TLV_TYPE_MTU, iface.getMTU());
} catch (NoSuchMethodError e) { }

ifaceTLV.add(TLVType.TLV_TYPE_MAC_ADDRESS, info[2]);
ifaceTLV.add(TLVType.TLV_TYPE_MAC_NAME, iface.getName() + " - " + iface.getDisplayName());
response.addOverflow(TLVType.TLV_TYPE_NETWORK_INTERFACE, ifaceTLV);
Expand Down Expand Up @@ -79,3 +83,4 @@ protected static byte[] createNetworkMask(int length, int prefixLength) {
return netmask;
}
}

0 comments on commit 14dfcce

Please sign in to comment.