turn wifi off (android)
This commit is contained in:
parent
ad98471099
commit
7ae3566ee1
14
README.md
14
README.md
@ -22,6 +22,7 @@
|
|||||||
- [Hook java io InputStream](#hook-java-io-inputstream)
|
- [Hook java io InputStream](#hook-java-io-inputstream)
|
||||||
- [iOS alert box](#ios-alert-box)
|
- [iOS alert box](#ios-alert-box)
|
||||||
- [Get IMEI](#get-imei)
|
- [Get IMEI](#get-imei)
|
||||||
|
- [Turn WiFi off (Android)](#turn-wifi-off)
|
||||||
- [TODO list](#todos)
|
- [TODO list](#todos)
|
||||||
|
|
||||||
#### Intercept and backtrace low level open
|
#### Intercept and backtrace low level open
|
||||||
@ -480,7 +481,18 @@ function getIMEI(){
|
|||||||
}
|
}
|
||||||
Java.perform(getIMEI)
|
Java.perform(getIMEI)
|
||||||
```
|
```
|
||||||
|
#### Turn Wifi OFF
|
||||||
|
```
|
||||||
|
var WifiManager = Java.use("android.net.wifi.WifiManager");
|
||||||
|
Java.use("android.app.Activity").onCreate.overload('android.os.Bundle').implementation = function() {
|
||||||
|
try {
|
||||||
|
var wManager = Java.cast(this.getSystemService("wifi"), WifiManager);
|
||||||
|
console.log('isWifiEnabled', wManager.isWifiEnabled());
|
||||||
|
wManager.setWifiEnabled(false);
|
||||||
|
} catch (e) { console.error(e) }
|
||||||
|
return this.$init();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user