rapid7/metasploit-framework — pull request #4031 by zeroSteiner (2014-10-16 12:34:25+00:00)
Title: Fix #4019, fix NameError peer in pureftpd shellshock exploit

This fixes issue #4019 by changing ```#{peer}```, which is not defined to ```#{rhost}:#{rport}```.

This also explicitly disconnects in the check method to clean up.

Before:
```
msf-git (S:0 J:0) exploit(pureftpd_bash_env_exec) > rexploit
[*] Reloading module...

[*] Started reverse handler on 192.168.1.112:4444
[-] Exploit failed: NameError undefined local variable or method `peer' for #

[*] Exploit completed, but no session was created.
msf-git (S:0 J:0) exploit(pureftpd_bash_env_exec)
```

After:
```
msf-git (S:0 J:0) exploit(pureftpd_bash_env_exec) > rexploit
[*] Reloading module...

[*] Started reverse handler on 192.168.1.112:4444
[-] Exploit failed [bad-config]: 192.168.1.110:21 - Failed to store payload inside executable, please select a native payload
[*] Exploit completed, but no session was created.
msf-git (S:0 J:0) exploit(pureftpd_bash_env_exec) >
```