stucked on login page of web ui
freakazoidz opened this issue · comments
- Bettercap version 2.28
- OS version debian 5.7.6 architecture amd64
- Go version go1.15.6
- Caplet http-ui
- Full debug output
[21:24:35] [sys.log] [dbg] FindGateway(wlan0) [cmd=ip opts=[route] parser=^(default|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)\svia\s([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)\sdev\s(\S+).*$]
[21:24:35] [sys.log] [dbg] FindGateway(wlan0) output:
default via 192.168.0.1 dev wlan0 proto dhcp metric 600
192.168.0.0/24 dev wlan0 proto kernel scope link src 192.168.0.122 metric 600
[21:24:35] [mod.started] api.rest
[21:24:35] [sys.log] [dbg] gateway is 192.168.0.1[50:0f:f5:e3:b8:d0]
192.168.0.0/24 > 192.168.0.122 » [21:24:35] [mod.started] http.server
192.168.0.0/24 > 192.168.0.122 » [21:24:35] [mod.started] api.rest
192.168.0.0/24 > 192.168.0.122 » [21:24:35] [sys.log] [inf] http.server starting on http://127.0.0.1:80
192.168.0.0/24 > 192.168.0.122 » [21:24:35] [sys.log] [inf] api.rest api server starting on http://127.0.0.1:8081
192.168.0.0/24 > 192.168.0.122 » [21:24:35] [mod.started] http.server
192.168.0.0/24 > 192.168.0.122 » [21:24:35] [sys.log] [inf] http.server starting on http://127.0.0.1:80
192.168.0.0/24 > 192.168.0.122 » [21:24:50] [sys.log] [dbg] http.server 127.0.0.1 GET 127.0.0.1/
192.168.0.0/24 > 192.168.0.122 » [21:24:50] [sys.log] [dbg] http.server 127.0.0.1 GET 127.0.0.1/runtime.26209474bfa8dc87a77c.js
192.168.0.0/24 > 192.168.0.122 » [21:24:50] [sys.log] [dbg] http.server 127.0.0.1 GET 127.0.0.1/polyfills.681b44b3f292a3819611.js
192.168.0.0/24 > 192.168.0.122 » [21:24:50] [sys.log] [dbg] http.server 127.0.0.1 GET 127.0.0.1/main.ec83a59338123ba3bb5d.js
192.168.0.0/24 > 192.168.0.122 » [21:24:50] [sys.log] [dbg] http.server 127.0.0.1 GET 127.0.0.1/scripts.68228f7acaf48355d8cf.js
192.168.0.0/24 > 192.168.0.122 » [21:24:50] [sys.log] [dbg] http.server 127.0.0.1 GET 127.0.0.1/styles.92a454e3ed7c5bffbed3.css
192.168.0.0/24 > 192.168.0.122 » [21:24:50] [sys.log] [dbg] http.server 127.0.0.1 GET 127.0.0.1/assets/images/logo.png
192.168.0.0/24 > 192.168.0.122 »
Steps to Reproduce
- launch web ui with : sudo bettercap -caplet http-ui
- connect to 127.0.0.1
- enter credentials ( for testing user, pass)
- click on "login"
Expected behavior:
after install the last realease of golang and bettercap , i wanted to try the bettercap's ui
Actual behavior:
i'm stuck on login page , nothing happened
i hope give a complete report , thanks for your help
and sorry for my bad english
hi @freakazoidz, is this still happening? any chance you can open the developer console in your browser, see if you see any javascript errors and paste them here? thanks
hi @evilsocket yes it's still happen ,
in developer console i can see api.login() main.ec83a59338123ba3bb5d.js:1:216544
and when i click on " main.ec83a59338123ba3bb5d.js:1:216544"
i can see in debugger
main.ec83a59338123ba3bb5d.js
polyfills.681b44b3f292a3819611.js
runtime.26209474bfa8dc87a77c.js
scripts.68228f7acaf48355d8cf.js
but i don't think it's errors
thanks for trying help me :)
Can you check the network tab when you perform the login and send me a screenshot of the request and possibly the response? the more detailed the better, thanks!
what browser and OS is that? does it also happen if you try another browser?
it's firefox on kali, before that , i tested raspbian with chromium , and ubuntu with firefox
i'm assuming you are using the latest version of both bettercap and the UI right?
also, this seems a duplicate of #29, did you try to just install the ui via "ui.update" and clear the browser cache?
i'm assuming you are using the latest version of both bettercap and the UI right?
yes , it's a fresh install, i followed the " compiling from sources" method for installation
also, this seems a duplicate of #29, did you try to just install the ui via "ui.update" and clear the browser cache?
i tried this a few minutes ago , no changes for me , i'll try to install the ui manually and if it's better or not
when i close bettercap with "quit" i have some errors :
"WARNING: Stopping module api.rest timed out.
WARNING: Stopping module events.stream timed out.
Stopping modules and cleaning session state ..."
and i don't have warning messages when i quit when ui is not launched
those are not errors, don't worry about that
once you installed bettercap, please install the ui by running:
sudo bettercap -eval "ui.update; caplets.update; q"
and then just start it normally with:
sudo bettercap -caplet http-ui
once you installed bettercap, please install the ui by running:
sudo bettercap -eval "ui.update; caplets.update; q"
and then just start it normally with:
sudo bettercap -caplet http-ui
it's the method i use from the start
good, just wanted to make sure, people use all sorts of unsupported ways XD
good, just wanted to make sure, people use all sorts of unsupported ways XD
yeah i understand ^^ , i want it works , then i don't take any liberties ... in any case at the beginning xD
i tried to reinstall the ui manually , (like here : #29)
but no changes for me ... i don't know where to search for the moment
ok i'll try to reproduce it in a vm when i have a moment
ok i'll try to reproduce it in a vm when i have a moment
don't bother with that , i finally found the solution.
i give it for who want it :
download the last version with :
sudo wget https://github.com/bettercap/bettercap/releases/download/v2.28/bettercap_linux_amd64_v2.28.zip
remove the bettercap folder:
sudo rm /usr/local/bin/bettercap
copy bettercap on bin folder:
sudo cp bettercap_linux_amd64_v2.28.zip /usr/local/bin
unzip it :
sudo unzip bettercap_linux_amd64_v2.28.zip
and if you don't do it install the ui :
sudo bettercap -eval "ui.update; caplets.update; q"
and you can run it (my method can be optimized but it works like that )
thank you for taking time for me @evilsocket
i hope help someone at my turn :)
glad you worked it out! have fun
This issue seems to still exist.
This morning I built bettercap from the master branch and installed the ui via "ui.update".
And the login screen doesn't do anything after pressing the LOGIN button.
No errors in console. Just the following messages:
main.ec83a59338123ba3bb5d.js:1 found stored credentials
main.ec83a59338123ba3bb5d.js:1 api.login()
main.ec83a59338123ba3bb5d.js:1 env: {production: true, name: "ui", version: "1.3.0", requires: "2.24"}
/#/login?returnTo=%2Fevents:1 Autofocus processing was blocked because a document's URL has a fragment '#/login?returnTo=%2Fevents'.
main.ec83a59338123ba3bb5d.js:1 api.login()
Bettercap version: master branch, January 10th, 2020
OS version Kali Linux 2020.4 amd64
Go version: 1.15.6
Caplet: http-ui
UI Version: 1.3.0
I had a previously built version from around January 1st that worked ok.
So it's gotta be a recent commit.
Bettercap Release v2.28 verified works ok.
Have exactly the same issue with the most recent version from the repository. I found out that it stucking at the login page because REST API is not responding to HTTP requests:
$ curl -v 127.0.0.1:8081
* Rebuilt URL to: 127.0.0.1:8081/
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 8081 (#0)
> GET / HTTP/1.1
> Host: 127.0.0.1:8081
> User-Agent: curl/7.58.0
> Accept: */*
>
< HTTP/1.1 405 Method Not Allowed
< Date: Tue, 12 Jan 2021 13:40:02 GMT
< Content-Length: 0
<
* Connection #0 to host 127.0.0.1 left intact
$ curl -v 127.0.0.1:8081/api/session
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 8081 (#0)
> GET /api/session HTTP/1.1
> Host: 127.0.0.1:8081
> User-Agent: curl/7.58.0
> Accept: */*
>
... nothing happens, it just waits for HTTP reply
better test it with a browser and not with CURL
That's exactly how I started to investigate this issue.
what's the value of api.rest.alloworigin in bettercap?
and what's the URL you're accessing the UI from?
that's super weird ... will try to replicate somehow, thanks for all the info guys
it's very bizarre, hit me up if you need anything else
I believe this may be the same issue as:
bettercap/bettercap#811
nope
oook, i've finally managed to replicate it on a clean ubuntu vm install and firefox ... now it's debugging time 🤞🏻
actually @curious-ninja is right, this is a duplicate of bettercap/bettercap#811 the UI is stuck because of a deadlock, closing this one and continuing the conv there guys.