Skip to content

Commit f887bb1

Browse files
committed
feat: use attach to existing instead of choose source
1 parent 499cd8a commit f887bb1

7 files changed

Lines changed: 15 additions & 15 deletions

File tree

reai_toolkit/features/ai_decompiler/ai_decompiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def start_ai_decompiler(self, bv: BinaryView, options: Dict) -> None:
8787
callback = options.get("callback")
8888
analysis_id = self.config.get_analysis_id(bv)
8989
if not analysis_id:
90-
raise Exception("Analysis not found. Please choose one using 'Choose Source' feature.")
90+
raise Exception("Analysis not found. Please choose one using the 'Attach to existing' feature.")
9191
function_id = get_function_id_by_addr_util(bv, function.start, self.config)
9292

9393
with revengai.ApiClient(self.config.api_config) as api_client:

reai_toolkit/features/choose_source/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ class ChooseSourceFeature(BaseAuthFeature):
77
def __init__(self, config=None):
88
super().__init__(config)
99
self.choose_source = ChooseSource(config)
10-
log_info("RevEng.AI | Choose Source Feature initialized")
10+
log_info("RevEng.AI | Attach to existing Feature initialized")
1111

1212
def register(self):
1313
PluginCommand.register(
14-
"RevEng.AI\\Analysis\​​Choose Source",
14+
"RevEng.AI\\Analysis\​​Attach to existing",
1515
"Choose a source for the binary analysis",
1616
self.show_choose_source_dialog,
1717
self.is_valid
1818
)
19-
log_info("RevEng.AI | Choose Source Feature registered")
19+
log_info("RevEng.AI | Attach to existing Feature registered")
2020

2121
def show_choose_source_dialog(self, bv: BinaryView):
22-
log_info("RevEng.AI | Opening Choose Source dialog")
22+
log_info("RevEng.AI | Opening Attach to existing dialog")
2323
dialog = ChooseSourceDialog(self.config, self.choose_source, bv)
2424
dialog.exec_()
2525

reai_toolkit/features/choose_source/choose_source.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def choose_source(self, bv: BinaryView, chose: str):
3131

3232
return True, "Binary ID changed successfully."
3333
except Exception as e:
34-
log_error(f"RevEng.AI | Failed to choose source: {str(e)}")
34+
log_error(f"RevEng.AI | Failed to attach to existing analysis: {str(e)}")
3535
return False, str(e)
3636

3737
def get_analysis(self, bv: BinaryView):

reai_toolkit/features/choose_source/choose_source_dialog.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def __init__(self, config, choose_source, bv):
1616
self.init_ui()
1717

1818
def init_ui(self):
19-
self.setWindowTitle("RevEng.AI: Choose Source")
19+
self.setWindowTitle("RevEng.AI: Attach to existing")
2020
self.setMinimumWidth(500)
2121
layout = QVBoxLayout()
2222

@@ -106,10 +106,10 @@ def _on_analysis_loaded(self, success, analysis):
106106
def _choose_source(self):
107107
if not self.combo.currentText():
108108
log_error("RevEng.AI | Source selection is required")
109-
QMessageBox.warning(self, "RevEng.AI Choose Source", "Please select a source for analysis.", QMessageBox.Ok)
109+
QMessageBox.warning(self, "RevEng.AI: Attach to exiting", "Please select a source for analysis.", QMessageBox.Ok)
110110
return
111111

112-
self.progress = create_progress_dialog(self, "RevEng.AI Choose Source", "Choosing source...")
112+
self.progress = create_progress_dialog(self, "RevEng.AI: Attach to existing", "Choosing source...")
113113
self.progress.show()
114114
QCoreApplication.processEvents()
115115

@@ -121,9 +121,9 @@ def _on_choose_source_finished(self, success, message):
121121
self.progress.close()
122122

123123
if success:
124-
QMessageBox.information(self, "RevEng.AI Choose Source", message, QMessageBox.Ok)
124+
QMessageBox.information(self, "RevEng.AI: Attach to existing", message, QMessageBox.Ok)
125125
self.accept()
126126
else:
127-
log_error(f"RevEng.AI | Failed to choose source: {message}")
128-
QMessageBox.critical(self, "RevEng.AI Choose Source Error", f"Failed to choose source: {message}", QMessageBox.Ok)
127+
log_error(f"RevEng.AI | Failed to attach to existing analysis: {message}")
128+
QMessageBox.critical(self, "RevEng.AI: Attach to existing", f"Failed to choose source: {message}", QMessageBox.Ok)
129129
self.reject()

reai_toolkit/features/match_current_function/match_current_function.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def parse_confidence(item):
5454

5555
analysis_id = self.config.get_analysis_id(bv)
5656
if not analysis_id:
57-
raise Exception("Analysis not found. Please choose one using 'Choose Source' feature.")
57+
raise Exception("Analysis not found. Please choose one using the 'Attach to existing' feature.")
5858

5959
if self.cancelled.is_set():
6060
return False, "Operation cancelled"

reai_toolkit/features/match_functions/match_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def parse_confidence(item):
4444

4545
analysis_id = self.config.get_analysis_id(bv)
4646
if not analysis_id:
47-
raise Exception("Analysis not found. Please choose one using 'Choose Source' feature.")
47+
raise Exception("Analysis not found. Please choose one using the 'Attach to existing' feature.")
4848

4949
if self.cancelled.is_set():
5050
return False, "Operation cancelled"

reai_toolkit/features/view_function_in_portal/view_function_in_portal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def view_function_in_portal(self, bv: BinaryView, options: Dict) -> None:
2424

2525
analysis_id = self.config.get_analysis_id(bv)
2626
if not analysis_id:
27-
raise Exception("Analysis not found. Please choose one using 'Choose Source' feature.")
27+
raise Exception("Analysis not found. Please choose one using the 'Attach to existing' feature.")
2828

2929
with revengai.ApiClient(self.config.api_config) as api_client:
3030
api_instance = revengai.AnalysesResultsMetadataApi(api_client)

0 commit comments

Comments
 (0)