caldera
caldera copied to clipboard
hardcoded URL localhost:8888
Describe the bug by default all work fine. After change the bind port in conf/production.yml (my conf file): app.contact.http: http://caldera:9999 port: 9999
when I get http://10.0.4.6:9999/login and introduce user/pass nothing happened. If I debug the requesta made by de browser I find a js (index246d96ad.js) asking for http://localhost:8888/api/v2/config/main net::ERR_CONNECTION_REFUSED
the JS has this code inside:
let g = ${{}.VITE_CALDERA_URL || "http://localhost:8888"}/file/download_exfil?file=${btoa(v)}
const d = (await r.get(http://localhost:8888/plugin/${e.pluginName}/gui
)).data
I tried to find references in all files for VITE_CALDERA_URL and change all to point the port 9999. for example: ./plugins/magma/.env.template:VITE_CALDERA_URL=http://localhost:9999
To Reproduce Steps to reproduce the behavior:
- install in a docker following the oficial gide
- chage the conf/production.yml (my conf file): app.contact.http: http://caldera:9999 port: 9999
docker-compose.yml: version: '3'
services: caldera: build: context: . dockerfile: Dockerfile args: TZ: "UTC" #TZ sets timezone for ubuntu setup WIN_BUILD: "true" #WIN_BUILD is used to enable windows build in sandcat plugin image: caldera:server-v2.2 ports: - "8888:8888" - "8443:8443" - "9999:9999" # - "7010:7010" # - "7011:7011/udp" # - "7012:7012" # - "8853:8853" # - "8022:8022" # - "2222:2222" volumes: #- ./:/usr/src/app - ./conf/production.yml:/usr/src/app/conf/production.yml - ./plugins/ssl/conf/haproxy.conf:/usr/src/app/plugins/ssl/conf/haproxy.conf command: --log DEBUG --environment production
- docker compose build --no-cache
- docker compose up Expected behavior A clear and concise description of what you expected to happen.
Screenshots
Desktop (please complete the following information):
- OS: Ubuntu + docker (lasts versions)
- Browser chrome
- Version Versión 123.0.6312.122 (Build oficial) (64 bits)
Additional context I think that there are certain lines hardcoded with the port 8888
Looks like your first issue -- we aim to respond to issues as quickly as possible. In the meantime, check out our documentation here: http://caldera.readthedocs.io/
Sounds like #2885, you need to change the conf and rebuild, that should solve your issue.
solution for me:
find . -type f -exec grep -l "http://localhost:8888" {} \; | xargs -I {} sed -i "s/http:\/\/localhost:8888/http:\/\/192.168.0.10:8888/g" {}
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days