Make --live-test Metasploit integration cases work, added more test cases for PostgreSQL and code refactoring (issue #312)
minor bug fix