@@ -166,7 +166,12 @@ pub fn assess_build(
166166 & [ "__rust_alloc" , "__rust_dealloc" , "__rust_panic_cleanup" ] ,
167167 ) ;
168168 if rust_markers {
169- push_candidate ( & mut langs, "Rust" , 100 , "Rust runtime strings/symbols detected" ) ;
169+ push_candidate (
170+ & mut langs,
171+ "Rust" ,
172+ 100 ,
173+ "Rust runtime strings/symbols detected" ,
174+ ) ;
170175 push_candidate (
171176 & mut tools,
172177 "rustc / Cargo" ,
@@ -178,7 +183,13 @@ pub fn assess_build(
178183 if contains_prefix ( & import_dlls, "python" )
179184 || strings_contains_any (
180185 & strings,
181- & [ "pyi_rth_" , "pyimod" , "meipass" , "pyinstaller" , "python3.dll" ] ,
186+ & [
187+ "pyi_rth_" ,
188+ "pyimod" ,
189+ "meipass" ,
190+ "pyinstaller" ,
191+ "python3.dll" ,
192+ ] ,
182193 )
183194 {
184195 push_candidate (
@@ -196,7 +207,11 @@ pub fn assess_build(
196207 }
197208 if strings_contains_any (
198209 & strings,
199- & [ "nuitka" , "__nuitka_binary_dir" , "onefile_child_grace_time_int" ] ,
210+ & [
211+ "nuitka" ,
212+ "__nuitka_binary_dir" ,
213+ "onefile_child_grace_time_int" ,
214+ ] ,
200215 ) {
201216 push_candidate ( & mut tools, "Nuitka" , 95 , "Nuitka loader markers detected" ) ;
202217 push_candidate (
@@ -210,13 +225,23 @@ pub fn assess_build(
210225 push_candidate ( & mut tools, "py2exe" , 90 , "py2exe bundle markers detected" ) ;
211226 }
212227 if strings_contains_any ( & strings, & [ "cx_freeze" , "initscripts\\ console" ] ) {
213- push_candidate ( & mut tools, "cx_Freeze" , 90 , "cx_Freeze bundle markers detected" ) ;
228+ push_candidate (
229+ & mut tools,
230+ "cx_Freeze" ,
231+ 90 ,
232+ "cx_Freeze bundle markers detected" ,
233+ ) ;
214234 }
215235
216236 if contains_any ( & import_dlls, & [ "node.dll" , "libnode.dll" , "chrome_elf.dll" ] )
217237 || strings_contains_any (
218238 & strings,
219- & [ "electron.asar" , "app.asar" , "crashpad_handler" , "resources.pak" ] ,
239+ & [
240+ "electron.asar" ,
241+ "app.asar" ,
242+ "crashpad_handler" ,
243+ "resources.pak" ,
244+ ] ,
220245 )
221246 {
222247 push_candidate (
@@ -419,7 +444,10 @@ pub fn assess_build(
419444
420445fn apply_rust_crate_heuristics ( list : & mut Vec < ( & ' static str , Candidate ) > , strings : & [ String ] ) {
421446 let crate_markers: [ ( & str , & [ & str ] ) ; 13 ] = [
422- ( "Tokio" , & [ "tokio::" , "tokio-runtime-worker" , "tokio::runtime" ] ) ,
447+ (
448+ "Tokio" ,
449+ & [ "tokio::" , "tokio-runtime-worker" , "tokio::runtime" ] ,
450+ ) ,
423451 ( "Serde" , & [ "serde::" , "serde_json::" , "serde_yaml::" ] ) ,
424452 ( "Reqwest" , & [ "reqwest::" , "hyper::client" ] ) ,
425453 ( "Hyper" , & [ "hyper::" , "h2::proto" ] ) ,
@@ -428,7 +456,10 @@ fn apply_rust_crate_heuristics(list: &mut Vec<(&'static str, Candidate)>, string
428456 ( "Rusqlite" , & [ "rusqlite::" , "libsqlite3-sys" ] ) ,
429457 ( "Clap" , & [ "clap::" , "clap_builder::" ] ) ,
430458 ( "Anyhow" , & [ "anyhow::" , "thiserror::" ] ) ,
431- ( "Tracing" , & [ "tracing::" , "tracing_subscriber::" , "env_logger::" ] ) ,
459+ (
460+ "Tracing" ,
461+ & [ "tracing::" , "tracing_subscriber::" , "env_logger::" ] ,
462+ ) ,
432463 ( "Regex" , & [ "regex::" , "regex-automata::" ] ) ,
433464 ( "Rayon" , & [ "rayon::" , "rayon-core::" ] ) ,
434465 ( "Egui" , & [ "egui::" , "eframe::" , "epaint::" ] ) ,
@@ -452,19 +483,47 @@ fn apply_component_heuristics(
452483 strings : & [ String ] ,
453484) {
454485 let dll_components: [ ( & str , & [ & str ] , & str ) ; 13 ] = [
455- ( "OpenSSL" , & [ "libssl" , "libcrypto" , "ssleay32" , "libeay32" ] , "OpenSSL import DLL detected" ) ,
456- ( "libcurl" , & [ "libcurl" , "curl.dll" ] , "libcurl import DLL detected" ) ,
486+ (
487+ "OpenSSL" ,
488+ & [ "libssl" , "libcrypto" , "ssleay32" , "libeay32" ] ,
489+ "OpenSSL import DLL detected" ,
490+ ) ,
491+ (
492+ "libcurl" ,
493+ & [ "libcurl" , "curl.dll" ] ,
494+ "libcurl import DLL detected" ,
495+ ) ,
457496 ( "SQLite" , & [ "sqlite3.dll" ] , "SQLite import DLL detected" ) ,
458- ( "zlib" , & [ "zlib1.dll" , "zlibwapi.dll" ] , "zlib import DLL detected" ) ,
459- ( "Qt" , & [ "qt5core.dll" , "qt6core.dll" , "qt5gui.dll" , "qt6gui.dll" ] , "Qt runtime import DLL detected" ) ,
497+ (
498+ "zlib" ,
499+ & [ "zlib1.dll" , "zlibwapi.dll" ] ,
500+ "zlib import DLL detected" ,
501+ ) ,
502+ (
503+ "Qt" ,
504+ & [ "qt5core.dll" , "qt6core.dll" , "qt5gui.dll" , "qt6gui.dll" ] ,
505+ "Qt runtime import DLL detected" ,
506+ ) ,
460507 ( "SDL2" , & [ "sdl2.dll" ] , "SDL2 import DLL detected" ) ,
461508 ( "GLFW" , & [ "glfw3.dll" ] , "GLFW import DLL detected" ) ,
462509 ( "Vulkan" , & [ "vulkan-1.dll" ] , "Vulkan loader detected" ) ,
463510 ( "OpenGL" , & [ "opengl32.dll" ] , "OpenGL import detected" ) ,
464- ( "Direct3D" , & [ "d3d11.dll" , "d3d12.dll" , "dxgi.dll" ] , "Direct3D import detected" ) ,
511+ (
512+ "Direct3D" ,
513+ & [ "d3d11.dll" , "d3d12.dll" , "dxgi.dll" ] ,
514+ "Direct3D import detected" ,
515+ ) ,
465516 ( "libuv" , & [ "libuv.dll" ] , "libuv import DLL detected" ) ,
466- ( "wxWidgets" , & [ "wxmsw" , "wxbase" ] , "wxWidgets import DLL detected" ) ,
467- ( "OpenCV" , & [ "opencv_world" , "opencv_core" ] , "OpenCV import DLL detected" ) ,
517+ (
518+ "wxWidgets" ,
519+ & [ "wxmsw" , "wxbase" ] ,
520+ "wxWidgets import DLL detected" ,
521+ ) ,
522+ (
523+ "OpenCV" ,
524+ & [ "opencv_world" , "opencv_core" ] ,
525+ "OpenCV import DLL detected" ,
526+ ) ,
468527 ] ;
469528
470529 for ( label, needles, evidence) in dll_components {
@@ -476,7 +535,10 @@ fn apply_component_heuristics(
476535 if strings_contains_any ( strings, & [ "webview2" , "msedgewebview2" , "icorewebview2" ] ) {
477536 push_candidate ( list, "WebView2" , 80 , "WebView2 strings detected" ) ;
478537 }
479- if strings_contains_any ( strings, & [ "openssl/" , "libcurl/" , "sqlite format 3" , "zlib" ] ) {
538+ if strings_contains_any (
539+ strings,
540+ & [ "openssl/" , "libcurl/" , "sqlite format 3" , "zlib" ] ,
541+ ) {
480542 if strings_contains_any ( strings, & [ "openssl/" ] ) {
481543 push_candidate ( list, "OpenSSL" , 55 , "OpenSSL version string detected" ) ;
482544 }
@@ -520,16 +582,31 @@ fn apply_packer_heuristics(
520582 || has_section ( sections, ".themida" )
521583 || strings_contains_any ( strings, & [ "vmprotect" , "themida" ] )
522584 {
523- push_candidate ( list, "VMProtect / Themida" , 95 , "VMProtect/Themida markers detected" ) ;
585+ push_candidate (
586+ list,
587+ "VMProtect / Themida" ,
588+ 95 ,
589+ "VMProtect/Themida markers detected" ,
590+ ) ;
524591 }
525592 if has_section ( sections, ".enigma1" )
526593 || has_section ( sections, ".enigma2" )
527594 || strings_contains_any ( strings, & [ "the enigma protector" ] )
528595 {
529- push_candidate ( list, "Enigma Protector" , 95 , "Enigma Protector markers detected" ) ;
596+ push_candidate (
597+ list,
598+ "Enigma Protector" ,
599+ 95 ,
600+ "Enigma Protector markers detected" ,
601+ ) ;
530602 }
531603 if strings_contains_any ( strings, & [ "pyinstaller" ] ) {
532- push_candidate ( list, "PyInstaller" , 85 , "PyInstaller one-file markers detected" ) ;
604+ push_candidate (
605+ list,
606+ "PyInstaller" ,
607+ 85 ,
608+ "PyInstaller one-file markers detected" ,
609+ ) ;
533610 }
534611
535612 let high_entropy_exec = pe
0 commit comments