Skip to content

Commit

Permalink
add helptext
Browse files Browse the repository at this point in the history
  • Loading branch information
finnschiermer committed Feb 2, 2023
1 parent 7a354f5 commit c590514
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/realm/exec/realm_trawler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1093,14 +1093,13 @@ int main(int argc, const char* argv[])
const char* key_ptr = nullptr;
char key[64];
for (int curr_arg = 1; curr_arg < argc; curr_arg++) {
if (strcmp(argv[curr_arg], "--key") == 0) {
if (strcmp(argv[curr_arg], "--keyfile") == 0) {
std::ifstream key_file(argv[curr_arg + 1]);
key_file.read(key, sizeof(key));
key_ptr = key;
curr_arg++;
}
else if (strcmp(argv[curr_arg], "--hexkey") == 0) {
std::ifstream key_file(argv[curr_arg + 1]);
curr_arg++;
const char* chars = argv[curr_arg];
for (int idx = 0; idx < 64; ++idx) {
Expand Down Expand Up @@ -1165,7 +1164,10 @@ int main(int argc, const char* argv[])
}
}
else {
std::cout << "Usage: realm-trawler [-afmsw] [--key crypt_key] [--top top_ref] <realmfile>" << std::endl;
std::cout << "Usage: realm-trawler [-afmsw] [--keyfile file-with-binary-crypt-key] [--hexkey "
"crypt-key-in-hex] [--top "
"top_ref] <realmfile>"
<< std::endl;
std::cout << " f : free list analysis" << std::endl;
std::cout << " m : memory leak check" << std::endl;
std::cout << " s : schema dump" << std::endl;
Expand Down

0 comments on commit c590514

Please sign in to comment.