If this is your first visit, be sure to
check out the Forum Rules by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Re: metasploit v4.4.0-dev : search function not working fully

Originally Posted by r083rt

did you try to update the gems and also reinstall pg ????
it looks like the pg gem is corrupt or outdated

r083rt

Does it work for built-in pg of metasploit as well?

btw, why do we need a seperate postgresql for metasploit? Wouldn't it better if metasploit uses installed postgresql and requires it as a dependence? It creates confusion, I think. I experienced 2 major problems addressing postgresql connection of msf in past 2 days. I've just started to use linux, but I see even experienced users are having trouble using it.

The problem is about semantics of GROUP BY clause in PostgreSQL, I guess. It would be great if somebody who hasn't this problem would share these lines with us.

I also looked into this issue and I agree it's a problem with the change to the GROUP BY clause in the /opt/metasploit/msf3/lib/msf/core/db_manager.rb file.

The problem is cause by the use of the wildcard in the GROUP By clause. This is not a valid operation in Postgres 8.4 it was brought in in version 9.1. This is why taking out the line: group("module_details.id, module_details.*") fixes the issue.

A possibly better fix would be to fix the GROUP BY clause in a way that works with Postgres 8.4 and 9.1 yet still makes the query work as the developers intended. If you change the end of the function to the following you'll be back in action in no time:

Alternatively, updating Postgres to 9.1 will get id of the problem entirely. When I get a bit of time I am going to separate out the postgres dependecy on my machine so that Metasploit connects to that instead of the version shipped with Metasploit this will remove one dependency from the chain.

Re: metasploit v4.4.0-dev : search function not working fully

Ditto here,

First the search wasn't working for exploits, then after "svn up," I get the database error. Are the maintainers/developers looking into it? Even if its only documentation, something didn't get checked in.