rapid7/metasploit-framework — pull request #2805 by jvazquez-r7 (2013-12-27 22:48:04+00:00)
Title: Don't user merge! because can modify self.compat

This change fixes a "small" issue on #2786. If merge! is used, self.compat['Payload'] is modified and it isn't the intended behaviour.

Verification
----------------

- [ ] From master start msfconsole
- [ ] use exploit/multi/http/hp_sitescope_issuesiebelcmd
- [ ] show targets
- [ ] set target 0 (windows)
- [ ] set payload [tab][tab]
- [ ] Verify there are 114 possibilities

```
msf exploit(hp_sitescope_issuesiebelcmd) > set payload
Display all 114 possibilities? (y or n)
```

- [ ] show targets
- [ ] set target 1 (linux)
- [ ] set payload [tab][tab]
- [ ] Verify there are 11 possibilities:

```
msf exploit(hp_sitescope_issuesiebelcmd) > set payload cmd/unix/
set payload cmd/unix/bind_awk set payload cmd/unix/reverse_awk set payload cmd/unix/reverse_openssl set payload cmd/unix/reverse_python
set payload cmd/unix/bind_perl set payload cmd/unix/reverse_bash set payload cmd/unix/reverse_perl set payload cmd/unix/reverse_python_ssl
set payload cmd/unix/bind_perl_ipv6 set payload cmd/unix/reverse_bash_telnet_ssl set payload cmd/unix/reverse_perl_ssl
```

- [ ] set target 0 (windows again)
- [ ] set payload [tab][tab]
- [ ] VERIFY THERE AREN'T OPTIONS! (it is because self.target['Payload'] has been modified)

Now switch to the branch on this pull request

- [ ] From master start msfconsole
- [ ] use exploit/multi/http/hp_sitescope_issuesiebelcmd
- [ ] show targets
- [ ] set target 0 (windows)
- [ ] set payload [tab][tab]
- [ ] Verify there are 114 possibilities

```
msf exploit(hp_sitescope_issuesiebelcmd) > set payload
Display all 114 possibilities? (y or n)
```

- [ ] show targets
- [ ] set target 1 (linux)
- [ ] set payload [tab][tab]
- [ ] Verify there are 11 possibilities:

```
msf exploit(hp_sitescope_issuesiebelcmd) > set payload cmd/unix/
set payload cmd/unix/bind_awk set payload cmd/unix/reverse_awk set payload cmd/unix/reverse_openssl set payload cmd/unix/reverse_python
set payload cmd/unix/bind_perl set payload cmd/unix/reverse_bash set payload cmd/unix/reverse_perl set payload cmd/unix/reverse_python_ssl
set payload cmd/unix/bind_perl_ipv6 set payload cmd/unix/reverse_bash_telnet_ssl set payload cmd/unix/reverse_perl_ssl
```

- [ ] set target 0 (windows again)
- [ ] set payload [tab][tab]
- [ ] Verify there are 114 options again

```
msf exploit(hp_sitescope_issuesiebelcmd) > set payload
Display all 114 possibilities? (y or n)

```