rapid7/metasploit-framework — pull request #3110 by FireFart (2014-03-17 08:52:11+00:00)
Title: Added a check for Set-Cookie header in msftidy

This PR adds a check for reading the Set-Cookie header. resp.get_cookies should be used instead.

## Verify Steps
-[ ] Checkout branch
-[ ] run msftidy
-[ ] check output for false positives

## Sample Output
```
firefart@LinuxMint ~/Coding/metasploit-framework $ ./tools/msftidy.rb modules/ | grep -i set-cookie
modules/auxiliary/admin/2wire/xslt_password_reset.rb:133 - [WARNING] Do not read Set-Cookie header, use res.get_cookies instead: if (res.headers['Set-Cookie'] and res.headers['Set-Cookie'].match(/(.*); path=\//))
modules/auxiliary/admin/http/axigen_file_access.rb:170 - [WARNING] Do not read Set-Cookie header, use res.get_cookies instead: if res.headers['Set-Cookie'] =~ /_hadmin=([a-f0-9]*)/
modules/auxiliary/admin/http/cfme_manageiq_evm_pass_reset.rb:116 - [WARNING] Do not read Set-Cookie header, use res.get_cookies instead: session = $1 if res.headers['Set-Cookie'] =~ /_vmdb_session=(\h*)/
modules/auxiliary/admin/http/foreman_openstack_satellite_priv_esc.rb:70 - [WARNING] Do not read Set-Cookie header, use res.get_cookies instead: session = $1 if res.headers['Set-Cookie'] =~ /_session_id=([0-9a-f]*)/
modules/auxiliary/admin/http/mutiny_frontend_read_delete.rb:142 - [WARNING] Do not read Set-Cookie header, use res.get_cookies instead: if res and res.code == 200 and res.headers['Set-Cookie'] =~ /JSESSIONID=(.*);/
modules/auxiliary/admin/http/mutiny_frontend_read_delete.rb:168 - [WARNING] Do not read Set-Cookie header, use res.get_cookies instead: if res and res.code == 200 and res.headers['Set-Cookie'] =~ /JSESSIONID=(.*);/
modules/auxiliary/admin/http/tomcat_administration.rb:78 - [WARNING] Do not read Set-Cookie header, use res.get_cookies instead: if (res.headers['Set-Cookie'] and res.headers['Set-Cookie'].match(/JSESSIONID=(.*);(.*)/i))
modules/auxiliary/admin/oracle/osb_execqr2.rb:52 - [WARNING] Do not read Set-Cookie header, use res.get_cookies instead: if (res and res.headers['Set-Cookie'] and res.headers['Set-Cookie'].match(/PHPSESSID=(.*);(.*)/i))
modules/auxiliary/admin/oracle/osb_execqr2.rb:54 - [WARNING] Do not read Set-Cookie header, use res.get_cookies instead: sessionid = res.headers['Set-Cookie'].split(';')[0]
modules/auxiliary/admin/oracle/osb_execqr3.rb:49 - [WARNING] Do not read Set-Cookie header, use res.get_cookies instead: if (res and res.headers['Set-Cookie'] and res.headers['Set-Cookie'].match(/PHPSESSID=(.*);(.*)/i))
```