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

hardcoded URL localhost:8888 #2946

Open
elruedas-ops opened this issue Apr 11, 2024 · 3 comments
Open

hardcoded URL localhost:8888 #2946

elruedas-ops opened this issue Apr 11, 2024 · 3 comments
Assignees
Labels

Comments

@elruedas-ops
Copy link

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:

  1. install in a docker following the oficial gide
  2. 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

  1. docker compose build --no-cache
  2. docker compose up
    Expected behavior
    A clear and concise description of what you expected to happen.

Screenshots
image

image

image

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

Copy link

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/

@Guil33
Copy link

Guil33 commented Apr 12, 2024

Sounds like #2885, you need to change the conf and rebuild, that should solve your issue.

@plaskur-365-bank
Copy link

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" {}

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

No branches or pull requests

4 participants