All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.virjar.ratel.api.FingerPrintModel Maven / Gradle / Ivy

Go to download

ratel api,used for developer on ratel system,an extension for xposed framewrok,ratel api compatable with original xposed framework

There is a newer version: 1.3.6
Show newest version
package com.virjar.ratel.api;

import com.virjar.ratel.api.hint.Beta;

import java.util.HashMap;
import java.util.Map;

/**
 * @since 1.2.1
 */
@Beta
public class FingerPrintModel {
    /////// telephony 相关指纹隐藏
    /**
     * 序列号,Android9之后就拿不到了
     */
    public ValueHolder serial = ValueHolder.defaultStringHolder();

    /**
     * imei 手机卡槽的唯一标记
     */
    public ValueHolder imei = ValueHolder.defaultStringHolder();

    /**
     * imei 手机卡槽的唯一标记,可能有双卡
     */
    public ValueHolder imei2 = ValueHolder.defaultStringHolder();

    /**
     * 手机卡槽的唯一标记 ,电信使用这个值
     */
    public ValueHolder meid = ValueHolder.defaultStringHolder();

    /**
     * 手机卡槽的唯一标记 ,电信使用这个值,可能有双卡
     */
    public ValueHolder meid2 = ValueHolder.defaultStringHolder();

    /**
     * 本机号码
     */
    public ValueHolder line1Number = ValueHolder.defaultStringHolder();

    //  以下为基站数据相关(CellInfo)
    public ValueHolder iccSerialNumber = ValueHolder.defaultStringHolder();

    public ValueHolder subscriberId = ValueHolder.defaultStringHolder();

    public ValueHolder lac = ValueHolder.defaultIntegerHolder();

    public ValueHolder cid = ValueHolder.defaultIntegerHolder();

    public ValueHolder tac = ValueHolder.defaultIntegerHolder();

    public ValueHolder lac2 = ValueHolder.defaultIntegerHolder();

    public ValueHolder cid2 = ValueHolder.defaultIntegerHolder();

    public ValueHolder tac2 = ValueHolder.defaultIntegerHolder();

    /**
     * 经纬度差异,在自动飘逸模式下,下面两个参数生效。本参数描述的含义是:当前手机的地理位置会相对于他的真实坐标按照固定差值漂移。
     * 目前飘逸的范围是,当前手机定位为中心的30公里为半径的圆弧范围,且最终落点满足圆内高斯分布。
     * 

* 如果你按照系统默认设定,那么框架将会使用自动飘逸模式。除非你设置了(latitude,longitude)元组参数。 */ public ValueHolder latitudeDiff = ValueHolder.defaultValueHolder(); public ValueHolder longitudeDiff = ValueHolder.defaultValueHolder(); /** * 经纬度模拟定位中心坐标,本参数和上面的参数互斥 (latitudeDiff,longitudeDiff)。如果设置了下面的两对参数,那么最终app可见定位为设定的经纬度坐标的微小抖动(可能一两公里的抖动)。 * 这个参数是手动设定定位模式,适合模拟异地设备,但是异地模拟包括Wi-Fi,ip出口,基站信息,都需要同步模拟。否则容易被大数据分析发现。 *

* 无论是否处于自动飘逸模式,你都可以通过这两个对象获取原始定位数据 */ public ValueHolder latitude = ValueHolder.defaultValueHolder(); public ValueHolder longitude = ValueHolder.defaultValueHolder(); /** * 当app通过VPN替换出口ip的时候,app可以监测到VPN的存在。默认隐藏VPN的flag */ public boolean hiddenVPN = true; /** * 系统属性mock,默认mock序列号(serial)和基带版本(baseband) */ public PropertiesReplacer systemPropertiesFake = null; /** * 全局设置 see {@link android.provider.Settings.Global} */ public Map settingsGlobalFake = new HashMap<>(); /** * 系统设置 see {@link android.provider.Settings.System} */ public Map settingsSystemFake = new HashMap<>(); /** * 安全设置 see {@link android.provider.Settings.Secure} */ public Map settingsSecureFake = new HashMap<>(); /** * Wi-Fi BSSID和SSID mock接口,Wi-Fi列表可以用来实现定位,你可以通过编程接口填入Wi-Fi列表。 * 请注意,不能添加新的Wi-Fi信号。如果你拥有的Wi-Fi mock资源少于余实际扫描到的,那么框架将会按照框架的行为,替换BSSID的后两位。连接中的Wi-Fi资源除外 */ public WifiReplacer wifiReplacer = null; public static class WIFIReplaceItem { public String SSID; public String BSSID; } public interface WifiReplacer { void doReplace(WIFIReplaceItem wifiReplaceItem); } public interface PropertiesReplacer { T replace(String key, T value); } public static class ValueHolder { private T value; private boolean called = false; private T origin; private PropertiesReplacer propertiesReplacer; public final T replace(String key, T originValue) { origin = originValue; if (called) { return value; } if (propertiesReplacer != null) { synchronized (this) { if (!called) { called = true; value = propertiesReplacer.replace(key, originValue); } } } return value; } public ValueHolder set(T value) { this.value = value; called = true; return this; } public ValueHolder set(PropertiesReplacer propertiesReplacer) { this.propertiesReplacer = propertiesReplacer; return this; } public T get() { return value; } public T getOrigin() { return origin; } public ValueHolder setOrigin(T t) { origin = t; return this; } static ValueHolder defaultStringHolder() { ValueHolder valueHolder = new ValueHolder<>(); valueHolder.set((key, value) -> SuffixTrimUtils.SuffixModifier5.modify(value)); return valueHolder; } static ValueHolder defaultIntegerHolder() { ValueHolder valueHolder = new ValueHolder<>(); valueHolder.set((key, value) -> value + SuffixTrimUtils.randomMockDiff(20)); return valueHolder; } static ValueHolder defaultValueHolder() { return new ValueHolder<>(); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy