From 7c2f27df446d6bd04905095d6ab2985b5a71b409 Mon Sep 17 00:00:00 2001 From: hyugogirubato <65763543+hyugogirubato@users.noreply.github.com> Date: Sat, 1 Mar 2025 09:36:03 +0100 Subject: [PATCH] function optimization --- keydive/keydive.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/keydive/keydive.js b/keydive/keydive.js index 166bd06..00136e9 100644 --- a/keydive/keydive.js +++ b/keydive/keydive.js @@ -1,5 +1,5 @@ /** - * Date: 2025-01-18 + * Date: 2025-03-01 * Description: DRM key extraction for research and educational purposes. * Source: https://github.com/hyugogirubato/KeyDive */ @@ -69,19 +69,18 @@ const getVersion = () => Frida.version; // @Utils -const getLibraries = (name) => { +const getLibraries = () => { // https://github.com/hyugogirubato/KeyDive/issues/14#issuecomment-2146788792 try { - const libraries = Process.enumerateModules(); - return name ? libraries.filter(l => l.name.includes(name)) : libraries; + return Process.enumerateModules(); } catch (e) { print(Level.CRITICAL, e.message); return []; } -}; +} const getLibrary = (name) => { - const libraries = getLibraries(name); + const libraries = getLibraries().filter(l => l.name === name); return libraries.length === 1 ? libraries[0] : undefined; }