rapid7 / meterpreter

THIS REPO IS OBSOLETE. USE https://github.com/rapid7/metasploit-payloads INSTEAD
Other
325 stars 144 forks source link

Fix clipboard file size handling #175

Closed OJ closed 9 years ago

OJ commented 9 years ago

This is a small fix to extapi's clipboard functionality. When files are captured on the clipboard, the file sizes are incorrectly reported because they were being stored after a call to htonq. When sending the value down the wire, a call to packet_add_tlv_qword was being used, which by itself does another call to htonq, resulting in the bytes being reversed again.

This patch removes the unnecessary manual call, and results in correctly reported file sizes when the clipboard is in use.

Verification

metasploit-public-bot commented 9 years ago

Test PASSED. Refer to this link for build results (access rights to CI server needed): https://ci.metasploit.com//job/GPR-MeterpreterWin/208/ Test PASSED.

bcook-r7 commented 9 years ago

Looks good:

meterpreter > clipboard_get_data
Files captured at 2015-06-28 17:28:08.0911
==========================================
Remote Path : C:\Users\bcook\Desktop\Dbgview.exe
File size   : 468056 bytes
OJ commented 9 years ago

Thank you sir!