From 5bb2b8688759fc36ae4c0ff5e1856e446de4d709 Mon Sep 17 00:00:00 2001 From: Bryan Joshua Pedini Date: Sun, 23 Aug 2026 23:18:05 +0200 Subject: [PATCH] integrated everything into provision --- meta.src | 48 ------------------------------------------------ provision.py | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 48 deletions(-) delete mode 100644 meta.src diff --git a/meta.src b/meta.src deleted file mode 100644 index 06355d0..0000000 --- a/meta.src +++ /dev/null @@ -1,48 +0,0 @@ -cp = get_shell.host_computer -home = "/home/" + active_user - -decipher_bin = cp.File(home + "/decipher") -if not decipher_bin then - print "Missing decipher" -else - decipher_bin.move "/bin", "decipher" - decipher_bin = cp.File("/bin/decipher") - if not decipher_bin then print("Failed to install decipher") - decipher_bin.set_group "root" - decipher_bin.set_owner "root" - decipher_bin.chmod "u+rwx,g+rx,o+rx" -end if - -scanrouter_bin = cp.File(home + "/scanrouter") -if not scanrouter_bin then - print "Missing scanrouter" -else - scanrouter_bin.move "/bin", "scanrouter" - scanrouter_bin = cp.File("/bin/scanrouter") - if not scanrouter_bin then print("Failed to install scanrouter") - scanrouter_bin.set_group "root" - scanrouter_bin.set_owner "root" - scanrouter_bin.chmod "u+rwx,g+rx,o+rx" -end if - -metaxploit_lib = cp.File(home + "/metaxploit.so") -if not metaxploit_lib then - print "Missing metaxploit.so" -else - metaxploit_lib.copy home + "/guest", "metaxploit.so" - metaxploit_guest = cp.File(home + "/guest/metaxploit.so") - metaxploit_guest.set_group "guest" - metaxploit_guest.set_owner "guest" - metaxploit_guest.chmod "u+rwx,g+rx,o+rx" - metaxploit_lib.move "/lib", "metaxploit.so" - metaxploit_lib = cp.File("/lib/metaxploit.so") - if not metaxploit_lib then print("Failed to install metaxploit.so") - metaxploit_lib.set_group "root" - metaxploit_lib.set_owner "root" - metaxploit_lib.chmod "u+rwx,g+r,o+r" -end if - -meta_source = cp.File(home + "/meta.src") -if meta_source then meta_source.delete -meta_bin = cp.File(home + "/meta") -if meta_bin then meta_bin.delete diff --git a/provision.py b/provision.py index 8a5edde..5e89a03 100644 --- a/provision.py +++ b/provision.py @@ -95,6 +95,35 @@ def downloaded_program_lines(name: str, destination: str) -> list[str]: ] +def metaxploit_lines() -> list[str]: + return [ + 'metaxploit_lib = cp.File(home + "/metaxploit.so")', + "if not metaxploit_lib then", + '\tprint("Missing metaxploit.so")', + "else", + '\tmetaxploit_lib.copy(home + "/guest", "metaxploit.so")', + '\tmetaxploit_guest = cp.File(home + "/guest/metaxploit.so")', + "\tif not metaxploit_guest then", + '\t\tprint("Failed to copy metaxploit.so to guest")', + "\telse", + '\t\tmetaxploit_guest.set_group("guest")', + '\t\tmetaxploit_guest.set_owner("guest")', + '\t\tmetaxploit_guest.chmod("u+rwx,g+rx,o+rx")', + "\tend if", + '\tmetaxploit_lib.move("/lib", "metaxploit.so")', + '\tmetaxploit_lib = cp.File("/lib/metaxploit.so")', + "\tif not metaxploit_lib then", + '\t\tprint("Failed to install metaxploit.so")', + "\telse", + '\t\tmetaxploit_lib.set_group("root")', + '\t\tmetaxploit_lib.set_owner("root")', + '\t\tmetaxploit_lib.chmod("u+rw,g+rw,o+rw")', + "\tend if", + "end if", + "", + ] + + def build_provision() -> str: sources = source_files() if not sources: @@ -127,6 +156,8 @@ def build_provision() -> str: for name in DOWNLOADED_EXECUTABLES: output.extend(downloaded_program_lines(name, "/usr/bin")) + output.extend(metaxploit_lines()) + bbuild = sources[0] bbuild_var = variable_name(bbuild) output.extend(