You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, how do I use the _generate_html function?
I set the corresponding global variables, but it did not execute successfully.
The error is as follows
[Diaphora: Wed Dec 4 10:19:25 2024] Sorry, there is no pseudo-code available for either the first or the second database.
[Diaphora: Wed Dec 4 10:19:25 2024] Sorry, there is no assembly available for either the first or the second database.
It will go through the following function
defgenerate_pseudo_diff(self, ea1, ea2, html=True, error_func=log):
cur=self.db_cursor()
try:
sql="""select * from ( select prototype, pseudocode, name, 1 from functions where address = ? and pseudocode is not null union select prototype, pseudocode, name, 2 from diff.functions where address = ? and pseudocode is not null) order by 4 asc"""ea1=str(int(ea1, 16))
ea2=str(int(ea2, 16))
cur.execute(sql, (ea1, ea2))
print("[*] sql = "+sql)
rows=cur.fetchall()
res=Noneiflen(rows) !=2:
error_func(
"Sorry, there is no pseudo-code available for either the first or the second database."
)
else:
row1=rows[0]
row2=rows[1]
html_diff=CHtmlDiff()
proto1=self.decompile_and_get(int(ea1))
ifproto1:
buf1=proto1+"\n"+"\n".join(self.pseudo[int(ea1)])
else:
......
There is no diff.functions in the sqlite generated in DIAPHORA_DB1
sqlite> .tables
basic_blocks function_bblocks
bb_instructions functions
bb_relations instructions
callgraph program
compilation_unit_functions program_data
compilation_units version
constants
At the same time, the output.sqlite generated by me according to the operation document does not have it, only the following tables
sqlite> .tables
config results unmatched
My ultimate goal is to get the comparison results through diaphora and save them in html, or save them in a diff file
The text was updated successfully, but these errors were encountered:
There is no diff.functions in the sqlite generated in DIAPHORA_DB1
There is no diff.XXX table as diff is how I name the attached SQLite database, the schema, if you prefer. To read the diff.functions table you need to query the functions table in the 2nd database (DIAPHORA_DB2).
My ultimate goal is to get the comparison results through diaphora and save them in html, or save them in a diff file
For this you will need to do the following:
Get the diffing results from, in your case, output.sqlite.
Read the appropriate function from the functions table in DIAPHORA_DB1 (which is usually referenced by Diaphora internally as main.functions or as functions, because by default it tries to find tables in the main schema) to get the assembly or pseudo-code for the function to diff.
Read the appropriate function from the functionstable in DIAPHORA_DB2 (which is referenced by Diaphora internally as diff.functions) to get the assembly or pseudo-code for the function to diff against.
Hello, how do I use the _generate_html function?
I set the corresponding global variables, but it did not execute successfully.
The error is as follows
It will go through the following function
There is no diff.functions in the sqlite generated in DIAPHORA_DB1
At the same time, the output.sqlite generated by me according to the operation document does not have it, only the following tables
My ultimate goal is to get the comparison results through diaphora and save them in html, or save them in a diff file
The text was updated successfully, but these errors were encountered: