yogeshojha / rengine

reNgine is an automated reconnaissance framework for web applications with a focus on highly configurable streamlined recon process via Engines, recon data correlation and organization, continuous monitoring, backed by a database, and simple yet intuitive User Interface. reNgine makes it easy for penetration testers to gather reconnaissance with minimal configuration and with the help of reNgine's correlation, it just makes recon effortless.
https://yogeshojha.github.io/rengine/
GNU General Public License v3.0
7.4k stars 1.12k forks source link

bug: error from subdomain scanning #1325

Open zagrosbingol opened 2 months ago

zagrosbingol commented 2 months ago

Is there an existing issue for this?

Current Behavior

When i am trying to perform an subdomain scan, it fails with the following error code:

Error: ProgrammingError('column scanEngine_notification.send_to_lark does not exist\nLINE 1: ...."id", "scanEngine_notification"."send_to_slack", "scanEngin...\n ^\nHINT: Perhaps you meant to reference the column "scanEngine_notificat...[trimmed] [ Logs](javascript:get_logs_modal(null, 89))

Reviewing the logs as an example: Path in Docker: root@45a646d7f2f9:/usr/src/scan_results//#10-subdomain_discovery.txt

Shows the following error:

Traceback (most recent call last):

  File "/usr/local/lib/python3.10/dist-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)

psycopg2.errors.UndefinedColumn: column scanEngine_notification.send_to_lark does not exist
LINE 1: ...."id", "scanEngine_notification"."send_to_slack", "scanEngin...
                                                             ^
HINT:  Perhaps you meant to reference the column "scanEngine_notification.send_to_slack".

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

  File "/usr/src/app/reNgine/celery_custom_task.py", line 129, in __call__
    self.result = self.run(*args, **kwargs)

  File "/usr/src/app/reNgine/tasks.py", line 414, in subdomain_discovery
    notif = Notification.objects.first()

  File "/usr/local/lib/python3.10/dist-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)

  File "/usr/local/lib/python3.10/dist-packages/django/db/models/query.py", line 674, in first
    for obj in (self if self.ordered else self.order_by('pk'))[:1]:

  File "/usr/local/lib/python3.10/dist-packages/django/db/models/query.py", line 280, in __iter__
    self._fetch_all()

  File "/usr/local/lib/python3.10/dist-packages/django/db/models/query.py", line 1324, in _fetch_all
    self._result_cache = list(self._iterable_class(self))

  File "/usr/local/lib/python3.10/dist-packages/django/db/models/query.py", line 51, in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)

  File "/usr/local/lib/python3.10/dist-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql
    cursor.execute(sql, params)

  File "/usr/local/lib/python3.10/dist-packages/django/db/backends/utils.py", line 66, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)

  File "/usr/local/lib/python3.10/dist-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
    return executor(sql, params, many, context)

  File "/usr/local/lib/python3.10/dist-packages/django/db/backends/utils.py", line 79, in _execute
    with self.db.wrap_database_errors:

  File "/usr/local/lib/python3.10/dist-packages/django/db/utils.py", line 90, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value

  File "/usr/local/lib/python3.10/dist-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)

django.db.utils.ProgrammingError: column scanEngine_notification.send_to_lark does not exist
LINE 1: ...."id", "scanEngine_notification"."send_to_slack", "scanEngin...
                                                             ^
HINT:  Perhaps you meant to reference the column "scanEngine_notification.send_to_slack".

Expected Behavior

Notifications and results to my discord.

Steps To Reproduce

  1. Start a new scan on any target
  2. perform a full scan or a subdomain scan
  3. You should recieve this: image

Environment

- reNgine: Rengine 2.1.1
- OS: Linux / Debian
- Python: Python 3.10.12

Anything else?

No response

github-actions[bot] commented 2 months ago

👋 Hi @zagrosbingol, Issues is only for reporting a bug/feature request. Please read documentation before raising an issue https://rengine.wiki For very limited support, questions, and discussions, please join reNgine Discord channel: https://discord.gg/azv6fzhNCE Please include all the requested and relevant information when opening a bug report. Improper reports will be closed without any response.