一、目标编译ollvm工具,并在Xcode中来混淆你的ipa或动态库,增加别人破解你源码的难度。二、工具
witchan@witchandeMacBook-Air ~ % $cd obfuscator
witchan@witchandeMacBook-Air ~ % mkdir build
witchan@witchandeMacBook-Air ~ % cd build
witchan@witchandeMacBook-Air ~ % cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_CREATE_XCODE_TOOLCHAIN=ON -DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi" -DLLVM_ENABLE_NEW_PASS_MANAGER=OFF ../llvm
witchan@witchandeMacBook-Air ~ % make -j8
witchan@witchandeMacBook-Air ~ % sudo make install-xcode-toolchain
witchan@witchandeMacBook-Air ~ % mv /usr/local/Toolchains /Library/Developer/注:make -j8这命令编译的快慢,取决于你的硬件设备挨个执行以上命令后,ollvm就编译并安装完成,效果如下:3、混淆命令及效果对比混淆命令简介
NSString *name = @"wit";
int age = 18;
NSArray *list = @[@1,@3,@5,@18];
for (int i=0; i混淆参数:-mllvm -fla -mllvm -bcf -mllvm -sub -mllvm -split -mllvm -sobf混淆后效果如下:__int64 __fastcall -[ViewController testMethod](__int64 a1, __int64 a2)
{
void *v2; // x0
void *v3; // x0
__int64 v4; // ST58_8
void *v5; // x0
__int64 v6; // ST50_8
void *v7; // x0
__int64 v8; // ST48_8
void *v9; // x0
void *v10; // x0
signed int v11; // w8
BOOL v12; // w9
signed int v13; // w8
BOOL v14; // w9
signed int v15; // w8
BOOL v16; // w14
signed int v17; // w8
void *v18; // x0
void *v19; // ST20_8
int v20; // ST2C_4
BOOL v21; // w12
signed int v22; // w8
BOOL v23; // w9
signed int v24; // w8
BOOL v25; // w12
signed int v26; // w8
signed int v27; // w8
BOOL v28; // w9
signed int v29; // w8
BOOL v30; // w12
signed int v31; // w8
BOOL v32; // w14
signed int v33; // w8
BOOL v34; // w9
signed int v35; // w8
void *v37; // x0
void *v38; // ST08_8
int v39; // ST14_4
signed int v40; // [xsp+94h] [xbp-DCh]
int v41; // [xsp+98h] [xbp-D8h]
int v42; // [xsp+9Ch] [xbp-D4h]
void *v43; // [xsp+A0h] [xbp-D0h]
int v44; // [xsp+ACh] [xbp-C4h]
__int64 v45; // [xsp+B0h] [xbp-C0h]
__int64 v46; // [xsp+B8h] [xbp-B8h]
__int64 v47; // [xsp+C0h] [xbp-B0h]
__int64 v48; // [xsp+C8h] [xbp-A8h]
__int64 *v49; // [xsp+D0h] [xbp-A0h]
const char *v50; // [xsp+D8h] [xbp-98h]
void *v51; // [xsp+E0h] [xbp-90h]
__int64 v52; // [xsp+E8h] [xbp-88h]
unsigned __int64 v53; // [xsp+F0h] [xbp-80h]
const char *v54; // [xsp+F8h] [xbp-78h]
void *v55; // [xsp+100h] [xbp-70h]
void *v56; // [xsp+108h] [xbp-68h]
__int64 v57; // [xsp+110h] [xbp-60h]
bool v58; // [xsp+11Fh] [xbp-51h]
__int64 *v59; // [xsp+120h] [xbp-50h]
int v60; // [xsp+128h] [xbp-48h]
int v61; // [xsp+12Ch] [xbp-44h]
__int64 v62; // [xsp+130h] [xbp-40h]
__int64 v63; // [xsp+138h] [xbp-38h]
__int64 v64; // [xsp+140h] [xbp-30h]
__int64 v65; // [xsp+148h] [xbp-28h]
__int64 v66; // [xsp+150h] [xbp-20h]
__int64 v67; // [xsp+158h] [xbp-18h]
​
v67 = *(_QWORD *)__stack_chk_guard_ptr;
v47 = a1;
v46 = a2;
v45 = objc_retain(&stru_10000C078);
v44 = 18;
v2 = objc_msgSend(off_1000112D0, (const char *)off_100011290, 1LL);
v48 = objc_retainAutoreleasedReturnValue(v2);
v63 = v48;
v49 = &v64;
v50 = (const char *)off_100011290;
v51 = off_1000112D0;
v40 = -1933834049;
while ( 1 )
{
while ( 1 )
{
while ( 1 )
{
while ( 1 )
{
while ( 1 )
{
while ( 1 )
{
while ( 1 )
{
while ( v40 == -1944675086 )
{
v23 = x_24 * (x_24 - 1) % 2u == 0;
if ( ((unsigned __int8)v23 & (y_25 = (unsigned __int64)v10 )
v11 = 1801130365;
else
v11 = 1380523063;
v40 = v11;
}
if ( v40 != -1846767803 )
break;
v40 = -267481379;
}
if ( v40 != -1502917571 )
break;
v54 = (const char *)off_1000112A0;
v55 = v43;
v40 = -1847141909;
}
if ( v40 == -1361227290 )
break;
switch ( v40 )
{
case -1295475565:
v44 += 10;
v40 = 1987329712;
break;
case -1240448313:
v4 = v52;
*v49 = v52;
v5 = objc_msgSend(off_1000112D0, (const char *)off_100011290, 5LL);
v6 = objc_retainAutoreleasedReturnValue(v5);
v65 = v6;
v7 = objc_msgSend(off_1000112D0, (const char *)off_100011290, 18LL);
v8 = objc_retainAutoreleasedReturnValue(v7);
v66 = v8;
v9 = objc_msgSend(off_1000112D8, (const char *)off_100011298, &v63, 4LL);
v43 = (void *)objc_retainAutoreleasedReturnValue(v9);
objc_release(v8);
objc_release(v6);
objc_release(v4);
objc_release(v48);
v42 = 0;
v40 = -381231803;
break;
case -1088106110:
v40 = -1361227290;
break;
case -1009849083:
v61 = v60 + 1;
v40 = -792637388;
break;
case -792637388:
v42 = v61;
v40 = -381231803;
break;
case -757913245:
v40 = -484710506;
break;
case -706815919:
v40 = 975706093;
break;
case -484710506:
v58 = v41 == v44;
v25 = x_24 * (x_24 - 1) % 2u == 0;
if ( (!v25 ^ (y_25 >= 10) | (v25 && y_25 = 10) | (v30 && y_25 = 10) | (v21 && y_25
总结简单的入门文章,希望能帮助到你。