Closed OJ closed 10 years ago
Test PASSED. Refer to this link for build results: https://ci.metasploit.com/job/GPR-MeterpreterWin/81/
This looks very much cleaner. In fact, other places that build group TLVs could benefit from this, particularly source/extensions/stdapi/server/net/config/interface.c
I can think of quite a few other places where this can be used to make things not only more readable but reduce the amount of data transferred. Reducing code is always a win too. Constructing arrays of TLVs in the way we had to do before felt like it was prone to errors.
A group packet is a special packet that is to be used as a group of TLVs that will live under another packet. Using this functionality means that we can easily nest groupings of data to arbitrary depths, which wasn't something we were able to do before easily.
The MSF side is easily capable of handling this scenario, but this side had always been lacking.
The clipboard dump code has been updated to show how this can be used.
This is based on a chat I had with egypt tonight, where we were both lamenting on the inability to have arbitrary depths of groups. This seems to solve it well enough without having to create a stack of code specific to group hierarchies.
Feedback/discussion very much welcome!