mirror of
https://github.com/jkcoxson/idevice.git
synced 2026-03-02 06:26:15 +01:00
Obfuscate more Apple strings
This commit is contained in:
@@ -67,7 +67,7 @@ pub trait IdeviceService: Sized {
|
||||
|
||||
#[cfg(feature = "rsd")]
|
||||
pub trait RsdService: Sized {
|
||||
fn rsd_service_name() -> &'static str;
|
||||
fn rsd_service_name() -> std::borrow::Cow<'static, str>;
|
||||
fn from_stream(
|
||||
stream: Self::Stream,
|
||||
) -> impl std::future::Future<Output = Result<Self, IdeviceError>> + Send;
|
||||
|
||||
@@ -162,7 +162,9 @@ pub async fn flush_reports(
|
||||
.start_session(&provider.get_pairing_file().await?)
|
||||
.await?;
|
||||
|
||||
let (port, ssl) = lockdown.start_service("com.apple.crashreportmover").await?;
|
||||
let (port, ssl) = lockdown
|
||||
.start_service(obf!("com.apple.crashreportmover"))
|
||||
.await?;
|
||||
|
||||
let mut idevice = provider.connect(port).await?;
|
||||
if ssl {
|
||||
|
||||
@@ -8,11 +8,11 @@ use log::debug;
|
||||
use std::fmt::Write;
|
||||
use tokio::io::{AsyncReadExt, AsyncWriteExt};
|
||||
|
||||
use crate::{IdeviceError, ReadWrite, RsdService};
|
||||
use crate::{obf, IdeviceError, ReadWrite, RsdService};
|
||||
|
||||
impl<R: ReadWrite> RsdService for DebugProxyClient<R> {
|
||||
fn rsd_service_name() -> &'static str {
|
||||
"com.apple.internal.dt.remote.debugproxy"
|
||||
fn rsd_service_name() -> std::borrow::Cow<'static, str> {
|
||||
obf!("com.apple.internal.dt.remote.debugproxy")
|
||||
}
|
||||
|
||||
async fn from_stream(stream: R) -> Result<Self, IdeviceError> {
|
||||
|
||||
@@ -41,11 +41,9 @@ use crate::{
|
||||
message::AuxValue,
|
||||
remote_server::{Channel, RemoteServerClient},
|
||||
},
|
||||
IdeviceError, ReadWrite,
|
||||
obf, IdeviceError, ReadWrite,
|
||||
};
|
||||
|
||||
const IDENTIFIER: &str = "com.apple.instruments.server.services.LocationSimulation";
|
||||
|
||||
/// A client for the location simulation service
|
||||
pub struct LocationSimulationClient<'a, R: ReadWrite> {
|
||||
/// The underlying channel used for communication
|
||||
@@ -61,7 +59,11 @@ impl<'a, R: ReadWrite> LocationSimulationClient<'a, R> {
|
||||
/// # Returns
|
||||
/// The client on success, IdeviceError on failure
|
||||
pub async fn new(client: &'a mut RemoteServerClient<R>) -> Result<Self, IdeviceError> {
|
||||
let channel = client.make_channel(IDENTIFIER).await?; // Drop `&mut client` before continuing
|
||||
let channel = client
|
||||
.make_channel(obf!(
|
||||
"com.apple.instruments.server.services.LocationSimulation"
|
||||
))
|
||||
.await?; // Drop `&mut client` before continuing
|
||||
|
||||
Ok(Self { channel })
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Jackson Coxson
|
||||
|
||||
use crate::{IdeviceError, ReadWrite, RsdService};
|
||||
use crate::{obf, IdeviceError, ReadWrite, RsdService};
|
||||
|
||||
#[cfg(feature = "location_simulation")]
|
||||
pub mod location_simulation;
|
||||
@@ -9,8 +9,8 @@ pub mod process_control;
|
||||
pub mod remote_server;
|
||||
|
||||
impl<R: ReadWrite> RsdService for remote_server::RemoteServerClient<R> {
|
||||
fn rsd_service_name() -> &'static str {
|
||||
"com.apple.instruments.dtservicehub"
|
||||
fn rsd_service_name() -> std::borrow::Cow<'static, str> {
|
||||
obf!("com.apple.instruments.dtservicehub")
|
||||
}
|
||||
|
||||
async fn from_stream(stream: R) -> Result<Self, IdeviceError> {
|
||||
|
||||
@@ -37,12 +37,10 @@
|
||||
use log::warn;
|
||||
use plist::{Dictionary, Value};
|
||||
|
||||
use crate::{dvt::message::AuxValue, IdeviceError, ReadWrite};
|
||||
use crate::{dvt::message::AuxValue, obf, IdeviceError, ReadWrite};
|
||||
|
||||
use super::remote_server::{Channel, RemoteServerClient};
|
||||
|
||||
const IDENTIFIER: &str = "com.apple.instruments.server.services.processcontrol";
|
||||
|
||||
/// Client for process control operations on iOS devices
|
||||
///
|
||||
/// Provides methods for launching, killing, and managing processes through the
|
||||
@@ -65,7 +63,9 @@ impl<'a, R: ReadWrite> ProcessControlClient<'a, R> {
|
||||
/// # Errors
|
||||
/// * Propagates errors from channel creation
|
||||
pub async fn new(client: &'a mut RemoteServerClient<R>) -> Result<Self, IdeviceError> {
|
||||
let channel = client.make_channel(IDENTIFIER).await?; // Drop `&mut client` before continuing
|
||||
let channel = client
|
||||
.make_channel(obf!("com.apple.instruments.server.services.processcontrol"))
|
||||
.await?; // Drop `&mut client` before continuing
|
||||
|
||||
Ok(Self { channel })
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ impl RsdHandshake {
|
||||
S: ReadWrite,
|
||||
{
|
||||
let service_name = T::rsd_service_name();
|
||||
let service = match self.services.get(service_name) {
|
||||
let service = match self.services.get(&service_name.to_string()) {
|
||||
Some(s) => s,
|
||||
None => {
|
||||
return Err(IdeviceError::ServiceNotFound);
|
||||
|
||||
Reference in New Issue
Block a user