[关闭]
@ucydia 2018-07-30T16:34:46.000000Z 字数 4215 阅读 41237

爱伪装(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文件中
清理AppStorehttp://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"。
IDFAIDFA值。
IDFVIDFV值。
UDID设备UDID值。
IMEI设备IMEI值。
SerialNum设备序列号。
MACMAC地址。
SSIDSSID值。
BSSIDBSSID值。
OpenUDIDOpenUDID值。

触动脚本示例

1、启动应用

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

2、生效指定记录

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

3、一键新机

  1. function newRecord()
  2. local sz = require("sz");
  3. local http = require("szocket.http");
  4. local res, code = http.request("http://127.0.0.1:1688/cmd?fun=newrecord");
  5. if code == 200 then
  6. local resJson = sz.json.decode(res);
  7. local result = resJson.result;
  8. dialog("the result is: " .. result, 2);
  9. if result == 3 then
  10. -- IP地址重复
  11. end
  12. -- ....其他代码
  13. end
  14. end;
  15. runApp("AWZ");
  16. mSleep(1 * 1000);
  17. newRecord();

4、重命名当前记录

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

5、设置当前记录坐标

  1. function setCurrentRecordLocation(location)
  2. local sz = require("sz");
  3. local http = require("szocket.http");
  4. local res, code = http.request("http://127.0.0.1:1688/cmd?fun=setcurrentrecordlocation&location="..location);
  5. if code == 200 then
  6. local resJson = sz.json.decode(res);
  7. local result = resJson.result;
  8. dialog("the result is: " .. result, 2);
  9. end
  10. end;
  11. runApp("AWZ");
  12. mSleep(1 * 1000);
  13. setCurrentRecordLocation("116.7361382365_39.8887921413_北京老胡同");
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注