Php 如何解析通过ADB发送短信的字符串
我试图通过ADB终端命令发送短信Php 如何解析通过ADB发送短信的字符串,php,parsing,sms,adb,message,Php,Parsing,Sms,Adb,Message,我试图通过ADB终端命令发送短信 $message = "Joe Doe. We find a provider for your request, touch the link below for see more details. https://massasistencia.com/detalles-cliente/23" exec('adb shell service call isms 7 i32 0 s16 "com.android.mms.service" s16 "+54115
$message = "Joe Doe. We find a provider for your request, touch the link below for see more details.
https://massasistencia.com/detalles-cliente/23"
exec('adb shell service call isms 7 i32 0 s16 "com.android.mms.service" s16 "+541156409605" s16 "null" s16 "' .$message. '" s16 "null" s16 "null"')
收到的信息只写“乔”
如果我只发送链接的短信到达ok。
如果我将stru_替换为“Joe Doe”,将“for”-”替换为“只发送名称”,则消息将正常到达
我相信问题在于“空格”
这是im使用的命令行,SMS到达,因此命令工作,问题是消息本身
adb shell service call isms 7 i32 0 s16 "com.android.mms.service" s16 "+541156409958" s16 "null" s16 "Hi" s16 "null" s16 "null"
您需要在消息中的每个空格字符之前添加斜杠字符。 以下命令将仅发送Joe:
adb shell service call isms 7 i32 0 s16 "com.android.mms.service" s16 "+541156409958" s16 "null" s16 "Joe Doe. hello" s16 "null" s16 "null"
以下命令将发送Joe Doe。您好:
adb shell service call isms 7 i32 0 s16 "com.android.mms.service" s16 "+541156409958" s16 "null" s16 "Joe\ Doe.\ hello" s16 "null" s16 "null"
也许试着避开你的空白?空格应该没问题。你可以硬编码字符串中的msg来测试exec('adb shell服务调用isms 7 i32 0 s16“com.android.mms.service“s16”+541156409605“s16”null“s16”Joe Doe。我们找到一个提供程序“s16”null“s16”null”),因为它涉及两个shell,可能是双重逃逸。可能是@miken32 Nice的复制品!是的,给Bobby Rm-rf发短信是另一个正确逃避的原因。新线路呢?