爱伪装(AWZ) Http脚本指南


爱伪装(AWZ) Http脚本指南

爱伪装` `AWZ` `Http脚本指南

目录

前言

要使用HTTP脚本,需要应用的设置中,将脚本选项下的“启用HTTP脚本指令”开关打开。
手机脚本调用:可直接调用http://127.0.0.1:1688/cmd?
PC调用:可直接调用http://局域网IP:1688/cmd?

HTTP指令说明

功能 代码
启动应用 runApp("AWZ"); 注意:以下所有指令调用前,必须先调用该指令,将应用启动到最前端。
一键新机 http://127.0.0.1:1688/cmd?fun=newrecord
下一条记录 http://127.0.0.1:1688/cmd?fun=nextrecord
清除所有记录 http://127.0.0.1:1688/cmd?fun=deleteallrecords
生效指定记录 http://127.0.0.1:1688/cmd?fun=activerecord&record=记录ID
生效第一条 http://127.0.0.1:1688/cmd?fun=activefirstrecord
生效最后一条 http://127.0.0.1:1688/cmd?fun=activelastrecord
禁用指定记录 http://127.0.0.1:1688/cmd?fun=disablerecord&record=记录ID
取消禁用记录 http://127.0.0.1:1688/cmd?fun=enablerecord&record=记录ID
删除指定记录 http://127.0.0.1:1688/cmd?fun=deleterecord&record=记录ID
瘦身指定记录 http://127.0.0.1:1688/cmd?fun=thinrecord&record=记录ID
导出指定记录 http://127.0.0.1:1688/cmd?fun=exportrecord&record=记录ID> 导出记录在/var/mobile/exportdata/下
导出所有记录 http://127.0.0.1:1688/cmd?fun=exportallrecords&zip=文件名 导出记录在/var/mobile/exportdata/下
直接导入记录 http://127.0.0.1:1688/cmd?fun=importdirect 导入记录放在/var/mobile/importdata/下 注:可以是导出的目录,也可以是导出的zip包
兼容性导入记录 http://127.0.0.1:1688/cmd?fun=importcompatible 导入记录放在/var/mobile/importdata/下 注:可以是导出的目录,也可以是导出的zip包
导入NZT记录 http://127.0.0.1:1688/cmd?fun=importnzt NZT记录放在/var/mobile/nztdata/下 注:NZT记录需是解开的目录,或不加密的zip包
重命名当前记录 http://127.0.0.1:1688/cmd?fun=renamecurrentrecord&name=新名称 重命名后,新的名称将成为ID
设置当前记录坐标 http://127.0.0.1:1688/cmd?fun=setcurrentrecordlocation&location=坐标 坐标格式为:经度_纬度_地名地名可选
清除当前记录坐标 http://127.0.0.1:1688/cmd?fun=clearcurrentrecordlocation
获取当前记录参数 http://127.0.0.1:1688/cmd?fun=getcurrentrecordparam 获取的参数在/var/mobile/iggparams.txt文件中
设置当前记录参数 http://127.0.0.1:1688/cmd?fun=setcurrentrecordparam 要设置的参数在/var/mobile/iggparams.txt文件中
获取所有记录名列表 http://127.0.0.1:1688/cmd?fun=getallrecordnames 获取的记录名列表在/var/mobile/iggrecords.txt文件中
清理AppStore http://127.0.0.1:1688/cmd?fun=cleanappstore 注:如果已打开"清理AppStore"选项,一键新机之后,不再需要调用该指令
卸载选中的应用 http://127.0.0.1:1688/cmd?fun=uninstallselectedapp 注:如果已打开"卸载应用"选项,一键新机之后,不再需要调用该指令
时间正序排序 http://127.0.0.1:1688/cmd?fun=orderbytime
时间倒序排序 http://127.0.0.1:1688/cmd?fun=orderbytimedesc

指令返回值说明

指令调用后,直接返回json串,格式:{"result":返回值}
另提供文件返回值,在:/var/mobile/iggresult.txt文件中

返回值 说明
2 指令正在执行过程中,还未完成。
1 指令执行正常完成。
3 一键新机成功,但IP地址重复(仅针对newrecord指令)。
4 下一条记录已到最后一条(仅针对nextrecord指令)。
0 指令执行出错。
100 产品未激活,或已过期。
10 运行环境异常。

iggparams.txt参数文件说明

获取或设置当前记录参数在:/var/mobile/iggparams.txt文件中;
每一行一个参数,换行符为: chr(10)
参数名与参数值之间,使用冒号(:)隔开;
可通过调用指令getcurrentrecordparam后,打开该文件查看格式。

参数名称 说明
RecordID 记录ID,如:"APP001"。
DeviceName 设备名称,如:"xxxx iPhone"。
SystemVersion 系统版本号,如:"10.3.1"。
IDFA IDFA值。
IDFV IDFV值。
UDID 设备UDID值。
IMEI 设备IMEI值。
SerialNum 设备序列号。
MAC MAC地址。
SSID SSID值。
BSSID BSSID值。
OpenUDID OpenUDID值。

触动脚本示例

1、启动应用

runApp("AWZ");-- 第一次启动,建议延迟等待3秒,需要联网验证,如:mSleep(3 *1000);

2、生效指定记录

function activeRecord(name)    local sz = require("sz");    local http = require("szocket.http");    local res, code = http.request("http://127.0.0.1:1688/cmd?fun=activerecord&record="..name);    if code == 200 then        local resJson = sz.json.decode(res);        local result = resJson.result;        dialog("the result is: " .. result, 2);    end end;runApp("AWZ");mSleep(1 * 1000);activeRecord("APP001");

3、一键新机

function newRecord()    local sz = require("sz");    local http = require("szocket.http");    local res, code = http.request("http://127.0.0.1:1688/cmd?fun=newrecord");    if code == 200 then        local resJson = sz.json.decode(res);        local result = resJson.result;        dialog("the result is: " .. result, 2);        if result == 3 then            -- IP地址重复        end        -- ....其他代码    end end;runApp("AWZ");mSleep(1 * 1000);newRecord();

4、重命名当前记录

function renameCurrentRecord(name)    local sz = require("sz");    local http = require("szocket.http");    local res, code = http.request("http://127.0.0.1:1688/cmd?fun=renamecurrentrecord&name="..name);    if code == 200 then        local resJson = sz.json.decode(res);        local result = resJson.result;        dialog("the result is: " .. result, 2);    end end;runApp("AWZ");mSleep(1 * 1000);renameCurrentRecord("139xxxxxxx吴有财");

5、设置当前记录坐标

function setCurrentRecordLocation(location)    local sz = require("sz");    local http = require("szocket.http");    local res, code = http.request("http://127.0.0.1:1688/cmd?fun=setcurrentrecordlocation&location="..location);    if code == 200 then        local resJson = sz.json.decode(res);        local result = resJson.result;        dialog("the result is: " .. result, 2);    end end;runApp("AWZ");mSleep(1 * 1000);setCurrentRecordLocation("116.7361382365_39.8887921413_北京老胡同");


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM