ciscocsirt / malspider

Malspider is a web spidering framework that detects characteristics of web compromises.
BSD 3-Clause "New" or "Revised" License
419 stars 78 forks source link

Does anyone have this error? SELECT GROUP BY #28

Open dieee opened 6 years ago

dieee commented 6 years ago

I'm doing the tests on ubuntu 16. The pyopenssl library was not installed correctly and I removed the version. After performing all the steps, I have this error:

Internal Server Error: / Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 149, in get_response response = self.process_exception_by_middleware(e, request) File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 147, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/home/die/malspider/malspider_django/dashboard/views.py", line 68, in index unique_alerts = ModelQuery.get_num_unique_alerts() File "/home/die/malspider/malspider_django/dashboard/functions/model_helper.py", line 65, in get_num_unique_alerts return len(list(all_alerts)) File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 1219, in iter query = iter(self.query) File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/query.py", line 79, in iter self._execute_query() File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/query.py", line 113, in _execute_query self.cursor.execute(self.sql, params) File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 79, in execute return super(CursorDebugWrapper, self).execute(sql, params) File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 64, in execute return self.cursor.execute(sql, params) File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", line 95, in exit six.reraise(dj_exc_type, dj_exc_value, traceback) File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 64, in execute return self.cursor.execute(sql, params) File "/usr/local/lib/python2.7/dist-packages/django/db/backends/mysql/base.py", line 112, in execute return self.cursor.execute(query, args) File "/usr/local/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 205, in execute self.errorhandler(self, exc, value) File "/usr/local/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler raise errorclass, errorvalue OperationalError: (1055, "Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'malspider.alert.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by") [14/Nov/2017 14:38:54] "GET / HTTP/1.1" 500 122406

thanks for everything This project it is a good job

dieee commented 6 years ago

This solve the error: mysql -u root -p Type your mysql root password and you should be presented with a mysql prompt, then type this to remove the strict group_by setting: mysql> set GLOBAL sql_mode = ''; Thanks user @jasheppa5