rapid7/metasploit-framework — pull request #3293 by zeroSteiner (2014-04-24 03:13:37+00:00)
Title: Support deprecation information from constants

This changes the Deprecation mixin to support retrieving information from constants which allows things like payload modules to specify deprecation dates and replacement modules.

Example from deprecating reverse_ipv6_http and reverse_ipv6_https:
```
resource (/home/steiner/tmp.rc)> use exploit/multi/handler
resource (/home/steiner/tmp.rc)> set PAYLOAD windows/meterpreter/reverse_ipv6_https
PAYLOAD => windows/meterpreter/reverse_ipv6_https
resource (/home/steiner/tmp.rc)> set LHOST fe80::250:56ff:fec0:1
LHOST => fe80::250:56ff:fec0:1
msf exploit(handler) > set LPORT 8888
LPORT => 8888
msf exploit(handler) > exploit
[!] ************************************************************************
[!] * The module windows/meterpreter/reverse_ipv6_https is deprecated! *
[!] * It will be removed on or about 2014-07-30 *
[!] * Use windows/meterpreter/reverse_https instead *
[!] ************************************************************************
[*] Started HTTPS reverse handler on https://:::8888/
[*] Starting the payload handler...
^C[-] Exploit failed: Interrupt
msf exploit(handler) > use payload/windows/meterpreter/reverse_ipv6_https
msf payload(reverse_ipv6_https) > set LHOST fe80::250:56ff:fec0:1
LHOST => fe80::250:56ff:fec0:1
msf payload(reverse_ipv6_https) > generate -t raw

[!] ************************************************************************
[!] * The module windows/meterpreter/reverse_ipv6_https is deprecated! *
[!] * It will be removed on or about 2014-07-30 *
[!] * Use windows/meterpreter/reverse_https instead *
[!] ************************************************************************
[RAW STUFF]
msf payload(reverse_ipv6_https) >
```

This is a proposed solution to the issues regarding the deprecation of payloads mentioned in PR #3270.