google / binexport

Export disassemblies into Protocol Buffers
Apache License 2.0
1.05k stars 206 forks source link

binexport2.proto general questions #14

Closed Manouchehri closed 8 years ago

Manouchehri commented 8 years ago

In this example, BinExport only references the location accepted and not the string Welcome to the admin console, trusted user!; in what situations should I be using string_reference as well? Never? Only if I have no data reference?

image

cblichmann commented 8 years ago

Do not rely on string_reference to be correct, the handling of strings is not super reliable just yet.

Manouchehri commented 8 years ago

Ignoring the very wrong instruction indexes, should I be writing the string table like this?

C:\IntelPython27\python.exe C:/Users/Dave/IdeaProjects/radare2-binexport2/export.py
meta_information {
  executable_name: "sample-files/fauxware"
  architecture_name: "x86-64"
}
string_table: "string!"
string_table: "SOSNEAKY"
string_table: "Welcome to the admin console, trusted user!"
string_table: "Go away!"
string_table: "Username: "
string_table: "Password: "
string_reference {
  string_table_index: 1
}
string_reference {
  instruction_index: 2256
  string_table_index: 2
}
string_reference {
  instruction_index: 2272
  string_table_index: 3
}
string_reference {
  instruction_index: 2316
  string_table_index: 4
}
string_reference {
  instruction_index: 2325
  string_table_index: 5
}
string_reference {
  instruction_index: 2336
  string_table_index: 6
}
cblichmann commented 8 years ago

LGTM