rapid7/metasploit-framework — pull request #2707 by OJ (2013-11-28 01:52:13+00:00)
Title: Fix metsrv.dll name issue in metsvc script

As mentioned here https://community.rapid7.com/thread/3788 the metsvc script was still looking for the old file name for metsrv.dll, which was causing the script to fail.

This commit fixes this issue. A hash is used to indicate local (`from`) and remote (`to`) file names so that the remote can continue to use metsrv.dll, but it is correctly located on disk locally. If a remote name isn't specified, the local one is used instead.

Test run:

```
meterpreter > run metsvc
[*] Creating a meterpreter service on port 31337
[*] Creating a temporary installation directory C:\Users\OJ\AppData\Local\Temp\FnuwTWzMV...
[*] >> Uploading metsrv.x86.dll...
[*] >> Uploading metsvc-server.exe...
[*] >> Uploading metsvc.exe...
[*] Starting the service...
* Installing service metsvc
* Starting service
Service metsvc successfully installed.
```