rapid7/meterpreter — pull request #43 by OJ (2013-10-30 08:47:20+00:00)
Title: Add the getproxy command

On Windows systems there is a system proxy setting that is exposed by IE and Chrome. This commit adds a `getproxy` command to `stdapi` which pulls out the details of the proxy settings for the current user.

Sample test run without proxy settings:

```
meterpreter > getproxy
Auto-detect : No
Auto config URL :
Proxy URL :
Proxy Bypass :
```

Sample test run with all proxy settings configured:
```
meterpreter > getproxy
Auto-detect : Yes
Auto config URL : http://baz:8080/foo.pac
Proxy URL : foo:80
Proxy Bypass : test;testagain;
```

This command is not supported on POSIX.

This commit also adds another helper function called `packet_add_tlv_wstring` which was used by the `getproxy` innards. This is the same as `packet_add_tlv_string` but is for wide-character strings.