whid-injector / WHID-Mobile-Connector

Android Mobile App for Controlling WHID Injector remotely.
GNU General Public License v3.0
176 stars 45 forks source link

App says not connected while web interface works #12

Closed Moonbeam4520 closed 4 years ago

Moonbeam4520 commented 4 years ago

Describe the bug When I connect to the whid injector wifi on my phone I can access the webpage and send payloads, but in the App the Whid Connexio slider is red and i cannot communicate with the device.

Android OS version OxygenOS 10.0.5 GM57BA (android 10)

WHID version 0.0.4

To Reproduce Connect to the whid injector wifi, open the app and try to send text

Expected behavior I should be able to send payloads and communicate with the device

PaulSec commented 4 years ago

Hey Joël, thanks for reaching out.

Did you have 4G on with the phone or just Wi-Fi?

Moonbeam4520 commented 4 years ago

Hi, I tried both, the website does not load with 4g enabled, if I enable only WiFi the Web interface loads but nothing in the app

PaulSec commented 4 years ago

Ok, that's pretty weird.

Would it be possible for you to take some screenshots of the app with the Wi-Fi connected:

Moonbeam4520 commented 4 years ago

sure, i tried upgrading the firmware but it didn't fix the problem.

I noticed that if i reload the app, it did not save my settings (dark theme and the wifi settings)

image

image

image

PaulSec commented 4 years ago

Hi Joël,

Someone else contacte med through private channel and has the exact same issue. After deep dive and more troubleshooting, your issue seems related with recent Android versions which are forbidding cleartext communication originating from apps. Since ESPloit is relying on the HTTP protocol, it is in cleartext, therefore, it's forbidden.

More details here (and some fix for the app): https://forum.ionicframework.com/t/err-cleartext-not-permitted-in-debug-app-on-android/164101/32

However, you can tweak the app in order to allow this kind of practice and this is something that I will try.

For full transparency, I pushed a new branch which should (hopefully) fix this issue and the pipeline is currently running on Github. You can find it here: https://github.com/whid-injector/WHID-Mobile-Connector/actions

If everything goes well, a resulting APK should be available at this address : https://github.com/whid-injector/WHID-Mobile-Connector/actions/runs/94644694 If the apk is there, would it be possible for you to download and try it and tell me if it's working for you? I've tried it locally on my phone and it works flawlessly.

You can also find the APK here: https://mega.nz/file/8IBSgQwb#W-MnkH4FB4BJH1BZih4SbiCqAv1Ldcu-D6EVvgv9p8U

Moonbeam4520 commented 4 years ago

The fix works great, thank you!

PaulSec commented 4 years ago

w00t, pretty cool! I will ship a v0.0.6 in this case asap (expect it to land on the Play Store in the upcoming days)

PaulSec commented 4 years ago

App v0.0.5 has been pushed on the Play store: https://play.google.com/store/apps/details?id=whid.usb.injector