Skip to content

Commit

Permalink
Allow reading non-utf8 files
Browse files Browse the repository at this point in the history
  • Loading branch information
Tehforsch committed Feb 5, 2025
1 parent 462f3a3 commit c7195d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rust/src/scannerctl/feed/filter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use all_builtins::ALL_BUILTINS;
use regex::Regex;
use scannerlib::models::{Scan, VT};
use scannerlib::nasl::nasl_std_functions;
use scannerlib::nasl::syntax::load_non_utf8_path;
use std::io::{self};
use std::path::PathBuf;
use std::{
Expand Down Expand Up @@ -144,7 +145,7 @@ impl ScriptReader {
}

fn script_from_path(&mut self, path: &Path) -> Option<Script> {
let contents = fs::read_to_string(path);
let contents = load_non_utf8_path(path);
match contents {
Err(e) => {
error!("Error reading file {path:?}: {e:?}");
Expand Down

0 comments on commit c7195d6

Please sign in to comment.