Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Davide Arcuri committed Mar 27, 2024
1 parent f422790 commit 5755798
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 7 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/push-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,20 @@ jobs:
include:
- dockerfile: ./compose/local/django/Dockerfile
image: ghcr.io/LDO-CERT/orochi_django
<<<<<<< HEAD
- dockerfile: ./compose/local/dask/Dockerfile
image: ghcr.io/LDO-CERT/orochi_worker
- dockerfile: ./compose/local/nginx/Dockerfile
image: ghcr.io/LDO-CERT/orochi_nginx
=======
name: ldo-cert/orochi_django
- dockerfile: ./compose/local/dask/Dockerfile
image: ghcr.io/LDO-CERT/orochi_worker
name: ldo-cert/orochi_worker
- dockerfile: ./compose/local/nginx/Dockerfile
image: ghcr.io/LDO-CERT/orochi_nginx
name: ldo-cert/orochi_nginx
>>>>>>> 5c4b00a8ce8aadcbf8306625e42c03b83a06d82a
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
include:
- dockerfile: ./compose/local/django/Dockerfile
image: ghcr.io/LDO-CERT/orochi_django
- dockerfile: ./compose/local/postgres/Dockerfile
image: ghcr.io/LDO-CERT/orochi_postgres
- dockerfile: ./compose/local/dask/Dockerfile
image: ghcr.io/LDO-CERT/orochi_worker
- dockerfile: ./compose/local/nginx/Dockerfile
image: ghcr.io/LDO-CERT/orochi_nginx
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
## Changelog

<details open>
<summary><b>OROCHI 2.3.0</b></summary>

* signal for dump/result changes are very verbose [[#1074](https://github.com/LDO-CERT/orochi/issues/1074)]
</details>

<details>
<summary><b>OROCHI 2.2.0 [2024/03/26]</b></summary>

* Upload ntoskrnl.exe and generate symbol [[#1020](https://github.com/LDO-CERT/orochi/issues/1020)]
Expand All @@ -11,6 +17,7 @@
* Add use case example with API. [[#248](https://github.com/LDO-CERT/orochi/issues/248)]
* put custom plugins under volatility3 /plugins/ [[#1068](https://github.com/LDO-CERT/orochi/issues/1068)]
* Improve tree rendered plugins
* Execute Regipy plugins on windows images
</details>

<details>
Expand All @@ -20,7 +27,7 @@
* Expand/Collapse folders [[#1006](https://github.com/LDO-CERT/orochi/issues/1006)]
</details>

<details open>
<details>
<summary><b>OROCHI 2.1.0 [2024/02/12]</b></summary>

* add possibility to download all symbols from a given ISF URL [[#1007](https://github.com/LDO-CERT/orochi/issues/1007)]
Expand Down
Binary file modified docs/animations/000_orochi_main.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 25 additions & 3 deletions orochi/website/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from django.contrib.auth import get_user_model
from django.contrib.postgres.fields import ArrayField
from django.db import models
from django.db.models.signals import post_save
from django.db.models.signals import post_save, pre_save
from django.dispatch import receiver
from guardian.shortcuts import assign_perm, get_users_with_perms

Expand Down Expand Up @@ -225,14 +225,25 @@ def new_plugin(sender, instance, created, **kwargs):
up, created = UserPlugin.objects.get_or_create(user=user, plugin=instance)


@staticmethod
@receiver(pre_save, sender=Dump)
def cache_previous_mode(sender, instance, *args, **kwargs):
original_status = None
if instance.id:
original_status = Dump.objects.get(pk=instance.id).status
instance.__original_status = original_status


@staticmethod
@receiver(post_save, sender=Dump)
def dump_saved(sender, instance, created, **kwargs):
users = get_users_with_perms(instance, only_with_perms_in=["can_see"])
if created:
message = f"Dump <b>{instance.name}</b> has been created"
else:
elif instance.__original_status != instance.status:
message = f"Dump <b>{instance.name}</b> has been updated."
else:
return

message = f"{datetime.now()} || {message}<br>Status: <b style='color:{TOAST_DUMP_COLORS[instance.status]}'>{instance.get_status_display()}</b>"

Expand All @@ -248,6 +259,15 @@ def dump_saved(sender, instance, created, **kwargs):
)


@staticmethod
@receiver(pre_save, sender=Result)
def cache_previous_mode(sender, instance, *args, **kwargs):
original_status = None
if instance.id:
original_status = Result.objects.get(pk=instance.id).status
instance.__original_status = original_status


@staticmethod
@receiver(post_save, sender=Result)
def result_saved(sender, instance, created, **kwargs):
Expand All @@ -257,10 +277,12 @@ def result_saved(sender, instance, created, **kwargs):
message = (
f"Plugin {instance.plugin.name} on {instance.dump.name} has been created"
)
else:
elif instance.__original_status != instance.status:
message = (
f"Plugin {instance.plugin.name} on {instance.dump.name} has been updated"
)
else:
return

message = f"{datetime.now()} || {message}<br>Status: <b style='color:{TOAST_RESULT_COLORS[instance.result]}'>{instance.get_result_display()}</b>"

Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.2.0"
__version__ = "2.3.0"

0 comments on commit 5755798

Please sign in to comment.