rapid7/metasploit-framework — pull request #4020 by fmunozs (2014-10-15 05:41:18+00:00)
Title: Fix jenkins when CSRF is enabled

When Jenkins CI has the CSRF security feature enabled [1], the module fails without giving any explanation:

```
[*] Started reverse handler on 192.168.1.8:4444
[*] Checking access to the script console
[*] No authentication required, skipping login...
[*] 192.168.1.9:8080 - Sending command stager...
[-] Exploit failed: Failed to execute the command.
```
I'm adding a change that searches for the CSRF token, if present it will be added to the subsequent requests.

[1] http://i.imgur.com/5WBkg79.png