Raspirus / raspirus

A user- and resources-friendly rules-based malware scanner
https://raspirus.deno.dev
GNU General Public License v3.0
124 stars 12 forks source link

Path not sent correctly from the backend #805

Closed Benji377 closed 2 months ago

Benji377 commented 3 months ago

Describe the bug The frontend displays the found malware at the end of a scan and it does that by serializing the received result into a vector of strings. But the backend only returns the name of the file instead of the whole path.

To Reproduce Steps to reproduce the behavior:

  1. Select a folder with testmalware and an additional subfolder
  2. Click on Start
  3. Wait for the scan to finish
  4. Check the logs and see the path is incorrect

Expected behavior It should return the entire path to the file so that each file is uniquely identified

Benji377 commented 3 months ago

Ideally what I want from the backend is some sort of key-value pair dictionary. Where the key is the path of the file and the value is its signature. That way on the frontend I can add a button to send the signature to VirusTotal (#792)

GamingGuy003 commented 3 months ago

Will be implemented after i am done with my exams

Benji377 commented 3 months ago

Use the following struct to while sending the result to the frontend so that I can easily parse it:

#[derive(Serialize, Deserialize, Debug)]
pub struct VirusFile {
    pub path: String,
    pub signature: String,
}

Path can be the full path, just the name of the file or the relative path from the scanning root

GamingGuy003 commented 3 months ago

alright will be done when i get back to work

Benji377 commented 2 months ago

This is no longer relevant due to our migration to Yara-X, see #815