Create (Save) Database To ProjectFile Handle

Aperta
#7,848 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
cpp, python

Direzione di ricerca

Start by tracing the existing Project.create_file_from_path(), Project.create_file(), and bv.create_database() entry points, using the Python example in the issue as the behavior to understand. Determine how a ProjectFile handle could be created directly from a new analysis, and consider the intended API boundary. Done means a new analysis can be saved into a project without the temporary-file and import steps.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

What is the feature you'd like to have?
A single step from a new analysis to saving it to a database in a project. At the moment, to get a database into a project, it needs to be saved somewhere else first and then imported into the project using Project.create_file_from_path(). There should be a way to take an empty project file handle and pass it to bv.create_database. And/Or Project.create_file should be able to accept a bv? Or the appropriate handle that lets a ProjectFile be created directly from a new analysis.

Is your feature request related to a problem?
The current two step process seems inefficient and not straightforward.

Are any alternative solutions acceptable?

for pf in tqdm.notebook.tqdm(to_do):
    with tempfile.TemporaryDirectory() as td:
        bv = binaryninja.load(pf)
        bv.update_analysis_and_wait()
        tdp = pathlib.Path(td)
        dest = tdp.joinpath(f'{pf.name}.bndb')
        bv.create_database(dest)
        bv.file.close()
        p.create_file_from_path(dest, f, dest.name)

to_do here contains a list of ProjectFile handles to raw files in the project.

Lingua principale
C++
Stelle
1.3k
Fork
298
Merge medio
5g 5h
PR unite (30g)
19

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Vector35/binaryninja-api

Tutte le issue di Vector35/binaryninja-api

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.