From 41e079b9773ec25b5e7ce9b1e1fa094e49726fc7 Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Tue, 21 Apr 2026 18:39:39 +0200 Subject: [PATCH] add resultbrowser menu action --- .gitignore | 1 + scripts/explore.pl | 2 ++ scripts/menu.pl | 17 +++++++++++++++-- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 4c29343..deee172 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /mars-db.conf /.direnv /db.conf +/fail/bin/resultbrowser/app/__pycache__ diff --git a/scripts/explore.pl b/scripts/explore.pl index 561121b..f4fcc4a 100644 --- a/scripts/explore.pl +++ b/scripts/explore.pl @@ -35,6 +35,8 @@ my $cui = TUI::init_cui(); # TODO: Add a more exhaustive faults query that also retrieves # what fault has been injected. Then add an info popup or # display it in the markers panel +# TODO: Add a filter for address ranges +# TODO: Add a filter for segments # ============================================================================= # Data handling diff --git a/scripts/menu.pl b/scripts/menu.pl index 155a044..48f3221 100644 --- a/scripts/menu.pl +++ b/scripts/menu.pl @@ -24,6 +24,9 @@ my $local_ghidra_projects = "$local_root/ghidra/projects"; my $local_ghidra_scripts = "$local_root/ghidra/scripts"; my $local_db_conf = "$local_root/db.conf"; +my $resultbrowser_port = '5000'; +my $resultbrowser = 'resultbrowser.py'; + my $remote_root = '/home/lab/smchurla/Documents/failnix'; my $remote_builds_dir = "$remote_root/builds"; @@ -141,8 +144,18 @@ my %handlers = ( '13. Open Experiment in ResultBrowser' => sub { - # TODO: Select from existing DBs, rewrite db.conf, - # launch resultbrowser + firefox + my @db_names = Mars::db_list(); + my @selected_dbs = + TUI::select_from_list( "Select Database for ResultBrowser", + 0, @db_names ); + die "No database selected" unless @selected_dbs; + my $selected_db = $selected_dbs[0]; + + Util::rewrite_file( $local_db_conf, "database=", + "database=$selected_db\n" ); + + system( $resultbrowser, '-c', $local_db_conf, '--host=0.0.0.0', + "--port=$resultbrowser_port" ); }, '14. Run Build in GDB' => sub {