Use non-interactive RCore in rasign2 -S (#19134)

This commit is contained in:
Dennis Goodlett 2021-09-24 03:18:24 -04:00 committed by GitHub
parent ed311e825f
commit 81dbf2a5fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,7 @@ static RCore *opencore(const char *fname) {
return NULL;
}
r_core_loadlibs (c, R_CORE_LOADLIBS_ALL, NULL);
r_config_set_i (c->config, "scr.interactive", false);
r_config_set_b (c->config, "scr.interactive", false);
if (fname) {
#if __WINDOWS__
char *winf = r_acp_to_utf8 (fname);
@ -90,6 +90,7 @@ static int handle_sdb(const char *fname, struct rasignconf *conf) {
// can't use RAnal here because JSON output requires core, in a sneaky way
RCore *core = r_core_new ();
if (core && r_sign_load (core->anal, fname)) {
r_config_set_b (core->config, "scr.interactive", false);
if (conf->collision) {
r_sign_resolve_collisions (core->anal);
}
@ -139,7 +140,7 @@ static RList *get_ar_file_uris(const char *fname) {
return NULL;
}
RList *uris = r_list_newf (free);
RList *list_fds = r_io_open_many (io, allfiles, 0, 0444);
RList *list_fds = r_io_open_many (io, allfiles, 0, 0);
free (allfiles);
bool fail = false;