惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
T
Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
Intezer
C
Cyber Attacks, Cyber Crime and Cyber Security
The Register - Security
The Register - Security
量子位
Security Latest
Security Latest
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
C
CXSECURITY Database RSS Feed - CXSecurity.com
MyScale Blog
MyScale Blog
J
Java Code Geeks
Apple Machine Learning Research
Apple Machine Learning Research
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
Spread Privacy
Spread Privacy
Jina AI
Jina AI
博客园 - 【当耐特】
P
Palo Alto Networks Blog
Last Week in AI
Last Week in AI
SecWiki News
SecWiki News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
G
GRAHAM CLULEY
宝玉的分享
宝玉的分享
Hacker News - Newest:
Hacker News - Newest: "LLM"
T
The Blog of Author Tim Ferriss
V
Vulnerabilities – Threatpost
有赞技术团队
有赞技术团队
T
Tor Project blog
H
Hacker News: Front Page
A
Arctic Wolf
NISL@THU
NISL@THU
A
About on SuperTechFans
云风的 BLOG
云风的 BLOG
Engineering at Meta
Engineering at Meta
V
V2EX
N
News and Events Feed by Topic
Webroot Blog
Webroot Blog
Know Your Adversary
Know Your Adversary
P
Privacy International News Feed
I
InfoQ
D
Docker
L
LINUX DO - 最新话题
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
U
Unit 42

博客园 - Ethan_村长

自己开发iOS版按键精灵--TTouch iOS 基于OpenCV图像比较的常见方法 iOS越狱系统使用root权限运行命令 Mac CEF 支持mp3 mp4编译 iOS自动化测试需求实现(iOS按键精灵类似) [转]runtime 消息机制 [转]多线程 Mac读取Andriod屏幕截图 windows或mac上对iOS设备截图 JPEG文件结构 ios获取左右眼图片景深图 使用libjpeg.framework压缩UIImage shell脚本删除指定mobileprovision iphone使用mac上的SOCKS代理 eclipse配置javah命令 [转]Android通过NDK调用JNI,使用opencv做本地c++代码开发配置方法 利用JNI技术在Android中调用、调试C++代码 iOS在线更新framework,使用NSBundle动态读取 CocoaPods pod install
解决读取iphone名称中文乱码问题
Ethan_村长 · 2016-01-12 · via 博客园 - Ethan_村长
#region 解决中文乱码 Ethan 2016-01-06
[DllImport("iTunesMobileDevice.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "AMDeviceCopyValue")]
public unsafe static extern __CFString* AMDeviceCopyValue_1(void* device, uint unknown, void* cfstring);
[DllImport("CoreFoundation.dll", CallingConvention = CallingConvention.Cdecl)]
public unsafe static extern int CFStringGetLength(__CFString* thisString);
// Token: 0x060000A3 RID: 163
[DllImport("CoreFoundation.dll", CallingConvention = CallingConvention.Cdecl)]
public unsafe static extern byte CFStringGetCString(__CFString* thisString, void* value, int length, uint format);

// Token: 0x060000D5 RID: 213 //for 32位
[DllImport("msvcr71.dll", CallingConvention = CallingConvention.Cdecl)]
public unsafe static extern void* malloc(uint size);

// Token: 0x060000D7 RID: 215 //for 64位
[DllImport("msvcr100.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "malloc")]
public unsafe static extern void* malloc_64(ulong size);

// Token: 0x02000012 RID: 18
public struct __CFString
{
}

public unsafe static string AMDeviceCopyValue_fix(void* device, string name)
{
    string result = "";
    try
    {
        __CFString* ptr = AMDeviceCopyValue_1(device, 0u, __CFStringMakeConstantString(StringToCString(name)));
        if (ptr != null)
        {
            uint num = (uint)CFStringGetLength(ptr);
            uint num2 = 4u * num + 2u;
            sbyte* value;

            try
            {
                value = (sbyte*)malloc(num2);
            }
            catch (Exception)
            {


                value = (sbyte*)malloc_64(num2);
            }


            CFStringGetCString(ptr, (void*)value, (int)num2, 134217984u);
            EX.UTF8Marshaler uTF8Marshaler = new EX.UTF8Marshaler();
            result = (string)uTF8Marshaler.MarshalNativeToManaged(new IntPtr((void*)value));

        }
    }
    catch (Exception ex)
    {

    }

    return result;
}
#endregion