Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pwnagotchi web UI not working #1214

Open
Soraya-sky opened this issue Feb 11, 2024 · 9 comments
Open

Pwnagotchi web UI not working #1214

Soraya-sky opened this issue Feb 11, 2024 · 9 comments

Comments

@Soraya-sky
Copy link

Soraya-sky commented Feb 11, 2024

Hello everyone !
I've been struggling a bit with my pwnagotchi. After 4 days on it, I'm still no able to connect to the web UI.

I run the pwnagotchi on a raspi0w, without display.
My config.tolm seems to be working as the name of my pwnagotchi have been successfully changed. Although it's a bit weird because it's not always removed from the /boot directory on the SD card.

Here is my config.tolm file :

main.name = "mychosenname"
main.lang = "en"
main.whitelist = [
"fo:od:ba:be:fo:od",
"fo:od:ba"
]

main.plugins.grid.enabled = true
main.plugins.grid.report = true
main.plugins.grid.exclude = [
""
]

ui.display.enabled = false
ui.display.type = "waveshare_2"
ui.display.color = "black"

main.plugins.bt-tether.enabled = true

main.plugins.bt-tether.devices.android-phone.enabled = true # the name of this entry is android-phone
main.plugins.bt-tether.devices.android-phone.search_order = 1 # in which order the devices should
## be searched. E.g. this is #1
main.plugins.bt-tether.devices.android-phone.mac = "XX:XX:XX:XX:XX:XX" # you need to put your phones
## bt-mac here (settings > status)
main.plugins.bt-tether.devices.android-phone.ip = "192.168.44.44" # this is the static ip of your pwnagotchi
## adjust this to your phones pan-network
## (run "ifconfig bt-pan" on your phone)
## if you feel lucky,
## try: 192.168.44.44 (Android) or
## 172.20.10.6 (iOS)
## 44 is just an example, you can choose
## between 2-254 (if netmask is 24)
main.plugins.bt-tether.devices.android-phone.netmask = 24 # netmask of the PAN
main.plugins.bt-tether.devices.android-phone.interval = 1 # in minutes, how often should
## the device be searched
main.plugins.bt-tether.devices.android-phone.scantime = 10 # in seconds, how long should be searched
## on each interval
main.plugins.bt-tether.devices.android-phone.max_tries = 10 # how many times it should try to find the
## phone (0 = endless)
main.plugins.bt-tether.devices.android-phone.share_internet = false # set to true if you want to have
## internet via bluetooth
main.plugins.bt-tether.devices.android-phone.priority = 1 # the device with the highest
## priority wins (1 = highest)

main.plugins.bt-tether.devices.ios-phone.enabled = false # next device...
main.plugins.bt-tether.devices.ios-phone.search_order = 2

ui.web.enabled = true
ui.web.username = "username"
ui.web.password = "password"
ui.web.address = "0.0.0.0"
ui.web.origin = ""
ui.web.port = "8080"
ui.web.on_frame = ""


  • I have flashed the 1.5.5 version on the sd card, It has been recognised by the computer as a Ethernet/RNDIS gadget. Then I set the ip etc. on 10.0.0.1, 255.255.255.0 and 8.8.8.8 (see picture).
IPconfig - Copie

The only strange thing about that is that my computer is creating a new network almost each time I plug the pwnagotchi (network4,network5, etc.)

  • I'm able to ssh with Putty, the pwnagotchi.local redirects to bettercap as it shoud and everything seems alright on that side. But the web UI stays stuck on "the site can't be reached" message. I tried multiple ip and ports, but nothing works.

  • I also tried connected the pwnagotchi with bluetooth to my android phone, the connexion worked but the webUI would not work neither this way.

  • The pwnagotchi seems to be working normally when not plugged to the computer as it has already some handshakes.

Does anyone have an idea of the problem ?
Thanks for the help

@mieg
Copy link

mieg commented Feb 12, 2024

In the line
ui.web.enabled_ = true
i would delete the _ at the end of enabled

@Soraya-sky
Copy link
Author

Soraya-sky commented Feb 12, 2024

In the line ui.web.enabled_ = true i would delete the _ at the end of enabled

I think it's just due to the copy/past and trying to put in italic on the post, because it's not in my original file.
But thanks :-)

(I edited btw)

@sosdos
Copy link

sosdos commented Feb 16, 2024

are you able to connect to the bettercap ui at 10.0.0.2?

i had the issue that while I could connect to bettercap, I couldn't connect to the actual ui using pwnagotchi.local:8080.

solved by just using 10.0.0.2:8080 to get there instead

to be clear:

10.0.0.2 for bettercap
10.0.0.2:8080 for web ui (the face)

@Soraya-sky
Copy link
Author

are you able to connect to the bettercap ui at 10.0.0.2?

i had the issue that while I could connect to bettercap, I couldn't connect to the actual ui using pwnagotchi.local:8080.

solved by just using 10.0.0.2:8080 to get there instead

to be clear:

10.0.0.2 for bettercap 10.0.0.2:8080 for web ui (the face)

Yes I'm able to connect to bettercap at 10.0.0.2, but the web ui won't work neither at 10.0.0.2:8080 nor atpwnagotchi.local:8080.

@sosdos
Copy link

sosdos commented Feb 16, 2024

maybe try removing everything about the web ui from your config file.

if that doesn't work, try replacing the text in your config file with this (default config file):

main.name = "pwnagotchi"
main.lang = "en"

main.plugins.grid.enabled = true
main.plugins.grid.report = true

ui.display.enabled = true
ui.display.type = "waveshare_2"
ui.display.color = "black"

@Soraya-sky
Copy link
Author

Soraya-sky commented Mar 2, 2024

maybe try removing everything about the web ui from your config file.

if that doesn't work, try replacing the text in your config file with this (default config file):

main.name = "pwnagotchi" main.lang = "en"

main.plugins.grid.enabled = true main.plugins.grid.report = true

ui.display.enabled = true ui.display.type = "waveshare_2" ui.display.color = "black"

Thanks, my computer is broken right now, but I’ll try this asap

@wichi92
Copy link

wichi92 commented Jun 10, 2024

Hi @Soraya-sky any updates on this? I have the same issue like you.

@xiaoyao9184
Copy link

try

check process

ps -aux | grep pwnagotchi

check service Active: active (running)

systemctl status pwngrid-peer.service  --no-pager --quiet
systemctl status bettercap  --no-pager --quiet
systemctl status pwnagotchi  --no-pager --quiet

check config no error

pwnagotchi --print-config

try run manual

/usr/bin/python3 /usr/local/bin/pwnagotchi --manual

@Soraya-sky
Copy link
Author

Hi !
Thanks for the help.

So I was away from this project for a while but I juste came back to it.
First thing I did was download the latest version, then reflash it on the same sd card after formating it.
I plugged the pwnagotchi on power port and let it initialize for a while.
I then plugged it on data port and started ssh.

And from there, I used :
sudo touch /root/.pwnagotchi-auto && systemctl restart pwnagotchi

To restart it in auto mod.
And I've been able to access the webUI.

Now something that is still weird is that the config.tolm file seems to not be read proprely as the name hasn't been changed...

I'll keep investigating this and I'll let you know when I find something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants