[关闭]
@chendbdb 2018-05-08T10:40:34.000000Z 字数 8122 阅读 12486

XXTFaker

XXTFaker XXTouch

此功能完全依赖于 XXTouch。
该插件与其他伪装插件不能共存,请提前删除其它如 NZT、HD等伪装插件,否则可能会影响伪装效果。
该模块只在少数系统及设备上测试通过,使用出现任何问题均自行承担责任。
如果出现异常情况可使用“cydia”进行卸载或“脚本”卸载。

因个人发现“IDFA”与“IDFV”可能会造成 APP 效果不正常,当某些无法预估的情况时请去除这两项的伪装,并配合“clear.idfav()”进行处理。

请移至 XXTouch 论坛进行下载

使用规则

将“XXTFaker.xxt”放入“/var/mobile/Media/1ferver/lua”目录下,并在脚本头部写入引用。

  1. local XXTFaker = require("XXTFaker")()
  2. sys.toast("",-1) --让提示框消失

安装插件(XXTFaker.install())

  1. local XXTFaker = require("XXTFaker")()
  2. if not XXTFaker.exists() then
  3. XXTFaker.install()
  4. end

卸载插件(XXTFaker.uninstall())

  1. local XXTFaker = require("XXTFaker")()
  2. if XXTFaker.exists() then
  3. XXTFaker.uninstall()
  4. end

判断是否安装(XXTFaker.exists())

返回值

返回类型 讲解
boolean 是否安装
  1. local XXTFaker = require("XXTFaker")()
  2. if XXTFaker.exists() then
  3. sys.alert("已安装")
  4. else
  5. sys.alert("未安装")
  6. end

影响范围(XXTFaker.filter_app(bids))

注意:这里传递什么只存在什么,之前存在的项会被覆盖。

传递值

类型 讲解
bids string 程序包名表

返回值

返回类型 讲解
boolean 是否成功修改
  1. local XXTFaker = require("XXTFaker")()
  2. if not XXTFaker.exists() then
  3. XXTFaker.install()
  4. end
  5. XXTFaker.filter_app(
  6. {
  7. "com.apple.Preferences",
  8. "com.tencent.xin"
  9. }
  10. )

获取对应bid的真实数据(XXTFaker.true_config(bid))

传递值

类型 讲解
bid string 程序包名

返回值

返回类型 讲解
table 对应应用的真实数据(不判断程序是否存在)
  1. local XXTFaker = require("XXTFaker")()
  2. sys.log(
  3. table.deep_print(
  4. XXTFaker.true_config(
  5. "com.tencent.xin"
  6. )
  7. )
  8. )

获取对应bid的伪装数据(XXTFaker.get_config(bid))

传递值

类型 讲解
bid string 程序包名

返回值

返回类型 讲解
table or nil 伪装的数据(失败返回 nil)
  1. local XXTFaker = require("XXTFaker")()
  2. if not XXTFaker.exists() then
  3. XXTFaker.install()
  4. end
  5. sys.log(
  6. table.deep_print(
  7. XXTFaker.get_config(
  8. "com.tencent.xin"
  9. )
  10. )
  11. )

获取当前伪装的bid表(XXTFaker.get_appbid())

返回值

返回类型 讲解
table bid列表
  1. local XXTFaker = require("XXTFaker")()
  2. if not XXTFaker.exists() then
  3. XXTFaker.install()
  4. end
  5. sys.log(
  6. table.deep_print(
  7. XXTFaker.get_appbid()
  8. )
  9. )

针对某个app的伪装(XXTFaker.set_config(bid, cfg_table, antijbdetection))

注意:这里传递什么伪装什么,不传递则不伪装。
第一次传递的内容会直接被第二次传递的内容覆盖。
如果有需要获取真实数据请使用“true_config”,如果有需要获取被伪装的数据请使用“get_config”。

传递值

类型 讲解
bid string 程序包名
cfg_table table 配置表(详细配置请参阅下方配置表)
antijbdetection boolean 防越狱检测(不保证可以应对所有检测并且可能导致其它插件失效或引发应用闪退,如果导致应用闪退,请使用 XXTFaker.clear_config('*') 清理伪装)

返回值

返回类型 讲解
boolean 伪装是否成功
  1. local XXTFaker = require("XXTFaker")()
  2. if not XXTFaker.exists() then
  3. XXTFaker.install()
  4. end
  5. sys.log(
  6. XXTFaker.set_config(
  7. "com.tencent.xin",
  8. {
  9. SSID = "WiFi-1234",
  10. BSSID = "12:34:56:78:9a:be",
  11. },
  12. true
  13. )
  14. )

针对多个app的伪装(XXTFaker.set_config(bids, cfg_table, antijbdetection))

注意:这里传递什么伪装什么,不传递则不伪装。
第一次传递的内容会直接被第二次传递的内容覆盖。
如果有需要获取真实数据请使用“true_config”,如果有需要获取被伪装的数据请使用“get_config”。

传递值

类型 讲解
bids table 程序包名列表
cfg_table table 配置表(详细配置请参阅下方配置表)
antijbdetection boolean 防越狱检测(不保证可以应对所有检测并且可能导致其它插件失效或引发应用闪退,如果导致应用闪退,请使用 XXTFaker.clear_config('*') 清理伪装)

返回值

返回类型 讲解
boolean 伪装是否成功
  1. local XXTFaker = require("XXTFaker")()
  2. if not XXTFaker.exists() then
  3. XXTFaker.install()
  4. end
  5. sys.log(
  6. XXTFaker.set_config(
  7. {
  8. "com.tencent.xin",
  9. "com.tencent.mqq"
  10. },
  11. {
  12. SSID = "WiFi-1234",
  13. BSSID = "12:34:56:78:9a:be",
  14. },
  15. true
  16. )
  17. )

产生配置进行伪装(XXTFaker.set_random_config(bid))

注意:此方法介于“XXTFaker.set_config”和“XXTFaker.random_config”进行封装。

传递值

类型 讲解
bid string 程序包名

返回值

返回类型 讲解
boolean 伪装是否成功
  1. local XXTFaker = require("XXTFaker")()
  2. if not XXTFaker.exists() then
  3. XXTFaker.install()
  4. end
  5. sys.log(
  6. XXTFaker.set_random_config(
  7. "com.tencent.xin"
  8. )
  9. )

产生随机配置(XXTFaker.random_config())

注意:此方法需要“XXTFaker.set_config”进行二次伪装。
0.11版本方可使用

  1. local XXTFaker = require("XXTFaker")()
  2. local cfg = XXTFaker.random_config()
  3. sys.log(
  4. XXTFaker.set_config(
  5. {
  6. "com.tencent.xin",
  7. "com.tencent.mqq"
  8. },
  9. cfg
  10. )
  11. )

产生随机内容进行伪装(XXTFaker.set_random_config(bids))

注意:此方法介于“XXTFaker.set_config”进行封装。

传递值

类型 讲解
bids table 程序包名列表

返回值

返回类型 讲解
boolean 伪装是否成功
  1. local XXTFaker = require("XXTFaker")()
  2. if not XXTFaker.exists() then
  3. XXTFaker.install()
  4. end
  5. sys.log(
  6. XXTFaker.set_random_config(
  7. {
  8. "com.tencent.xin",
  9. "com.tencent.mqq"
  10. }
  11. )
  12. )

清空针对某个app的伪装(XXTFaker.clear_config(bid))

传递值

类型 讲解
bid string 程序包名

返回值

返回类型 讲解
boolean 清理伪装数据是否成功
  1. local XXTFaker = require("XXTFaker")()
  2. if not XXTFaker.exists() then
  3. XXTFaker.install()
  4. end
  5. sys.log(
  6. XXTFaker.clear_config(
  7. "com.tencent.xin"
  8. )
  9. )

清空针对某个app的伪装(XXTFaker.clear_config(bids))

传递值

类型 讲解
bids table 程序包名列表

返回值

返回类型 讲解
boolean 清理伪装数据是否成功
  1. local XXTFaker = require("XXTFaker")()
  2. if not XXTFaker.exists() then
  3. XXTFaker.install()
  4. end
  5. sys.log(
  6. XXTFaker.clear_config(
  7. {
  8. "com.tencent.xin",
  9. "com.tencent.mqq"
  10. }
  11. )
  12. )

伪装配置

名称 类型 讲解 例子
SSID string wifi "WiFi-1234"
BSSID string 服务集标识 "12:34:56:78:9a:be"
IPv4 string IPv4 "192.168.0.99"
MEID string MEID "12345678901234"
IMEI string IMEI "123456789012345"
ECID number ECID 1234567890123
ICCID string ICCID "12345678901234567890"
IDFV string IDFV(8-4-4-4-12) "BCB2B003-60FF-4774-970E-D8373DBC2264"
IDFA string IDFA(8-4-4-4-12) "BCB2B003-60FF-4774-970E-D8373DBC2265"
UDID string UDID(40) "0123456789abcdef0123456789abcdef01234567"
HostName string 用户给设备取的名字 "XXTFaker"
DeviceName string 型号 "iPad"
ProductType string 设备产品名 "iPad2,1"
可参照设备版本列表
ProductVersion string 系统版本 "7.3.1"
BuildVersion string 系统 Build 版本 "12E456"
SerialNumber string 序列号 "ABCDEFGHIJKL"
CarrierName string 运营商名字 "China Mobile"
可参照附录内中国运营商
CountryCode string 国家代码 "460"
NetworkCode string 网络代码 "00"
ISOCountryCode string ISO 国家代码代码 "CN"
LocaleIdentifier string 本地化区域(0.21 新增) "en_US"
NetworkType number 网络连接类型
1:2G
2:3G
3:4G
5:WIFI
3
BluetoothMAC string 蓝牙 MAC "12:34:56:78:9a:bd"
WiFiMAC string WiFi MAC "12:34:56:78:9a:bd"
DeviceToken string 推送令牌(64) "0123456789abcdef0123456789abcdef01234567890123456789012345678901"
BatterySerial string 电池序列号 "F5D336444J4F66666"
BatteryFullyCharged number 是否充满 0 或 1 0
BatteryLevel number 电量 0.0-1.0 0.5
PowerSourceConnected number 是否连接电源 0 或 1 0
BatteryIsCharging number 是否正在充电 0 或 1 0
ScreenBrightness number 屏幕亮度 0.01 - 1.00 0.7
SysUptimeOffset number 开机到现在的时长偏移秒数 可以为负数 1000
Coordinate table 地理位置 {
 Longitude=116.459999,
 LongitudeRange=0.00071,
 Latitude=116.459999,
 LatitudeRange=0.00035
}

地理位置伪装配置

名称 类型 讲解 例子
Longitude number 经度 116.459999
LongitudeRange number 经度偏差范围 0.00071
Latitude number 纬度 39.919998
LatitudeRange number 经度偏差范围 0.00035

附录

中国运营商、国家代码、网络代码

运营商名字 国家代码 网络代码 提示
China Mobile 460 00 中国移动
China Unicom 460 01 中国联通
China Mobile 460 02 中国移动
China Telecom 460 03 中国电信
China Telecom 460 05 中国电信
China Unicom 460 06 中国联通
China Mobile 460 07 中国移动
China Mobile 460 08 中国移动
China Unicom 460 09 中国联通
China Telecom 460 11 中国电信
China Tietong 460 20 中国铁通

其它国家运行商或国家代码:可参阅这里

一些实例

iPhone 伪装成 iPad 微信两端登陆

  1. local bid = "com.tencent.xin"
  2. local XXTFaker = require("XXTFaker")()
  3. if not XXTFaker.exists() then XXTFaker.install() end
  4. XXTFaker.filter_app({bid})
  5. XXTFaker.set_config( --[[进行伪装iPad]]
  6. bid,
  7. {
  8. DeviceName = "iPad",
  9. ProductType = "iPad2,1"
  10. },
  11. false
  12. )

清理加伪装

  1. local bid = "com.tencent.xin"
  2. app.close(bid)
  3. clear.all_keychain()
  4. clear.pasteboard()
  5. clear.app_data(bid)
  6. clear.idfav()
  7. local XXTFaker = require("XXTFaker")()
  8. if not XXTFaker.exists() then XXTFaker.install() end
  9. XXTFaker.filter_app({bid})
  10. XXTFaker.set_random_config(bid)

除GPS外都伪装

  1. local XXTFaker = require("XXTFaker")()
  2. local cfg = XXTFaker.random_config()
  3. cfg.Coordinate = nil --去除对于GPS位置的伪装参数
  4. XXTFaker.set_config(
  5. {
  6. "com.tencent.xin",
  7. "com.tencent.mqq"
  8. },
  9. cfg
  10. )

检测模块版本并下载当前使用版本

  1. local XXTFaker = (function(url, hash)
  2. os.remove("/var/mobile/Media/1ferver/lua/scripts/XXTFaker.xxt")
  3. local faker_path = "/var/mobile/Media/1ferver/lua/XXTFaker.xxt"
  4. local verify = function(path, hash)
  5. local data = file.reads(path)
  6. if data and data:md5():lower() == hash:lower() then
  7. return true
  8. else
  9. os.remove(path)
  10. return false
  11. end
  12. end
  13. local download_and_verify = function(url, path, hash)
  14. local done = false
  15. thread.dispatch(function()
  16. local count = 0
  17. while not done do
  18. sys.toast('正在下载伪装模块(XXTFaker).'..string.rep('.', count%6))
  19. count = count + 1
  20. sys.msleep(30)
  21. end
  22. end)
  23. local c, h, r = http.get(url, 30)
  24. done = true
  25. sys.msleep(50)
  26. sys.toast('', -1)
  27. if c == 200 then
  28. file.writes(path, r)
  29. if verify(path, hash) then
  30. return true
  31. end
  32. end
  33. return false
  34. end
  35. local faker = nil
  36. if verify(faker_path, hash) then
  37. faker = require("XXTFaker")()
  38. else
  39. if download_and_verify(url, faker_path, hash) then
  40. faker = require("XXTFaker")()
  41. faker.uninstall()
  42. else
  43. sys.alert("伪装模块(XXTFaker)下载失败\n\n请检查网络后重新尝试")
  44. os.exit()
  45. end
  46. end
  47. return faker
  48. end)(
  49. "http://static.zybuluo.com/havonz/nhyuphebjy4hmfwgbj3y8y0z/XXTFaker-0.25.xxt",
  50. "DE0285EBC9DE2BF9434DE24317EE0A80"
  51. )
  52. if not XXTFaker.exists() then
  53. XXTFaker.install()
  54. end
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注