Getting Encrypted Data in Websocket


  • Getting encrypted data from. wss://omnefeeds.angelbroking.com/NestHtml5Mobile/socket/stream
    e.g.
    data: "eJyLrlYqKUvMKU1VslIyMIzRNzCP0TcyMDJSMLSwMjC2MrJQ0lHKS8wFSZfkKtXGAgBCtQzi"

    Can someone please comment what is wrong here. I am using this via javascript..

    url:wss://omnefeeds.angelbroking.com/NestHtml5Mobile/socket/stream

    request1 :
    var _req = '{"task":"cn","channel":"","token":"' + token + '","user":"' + user + '","acctid":"'+user+'"}';
    systemSocket.send(_req);

    request2
    var _req = '{"task":"mw","channel":"' + strwatchlistscrips + '","token":"' + token + '","user":"' + user + '","acctid":"' + user + '"}';
    systemSocket.send(_req);

    Below is the message detail i am getting from the above request.

    MessageEvent {isTrusted: true, data: 'eJyLrlYqKUvMKU1VslIyMIzRNzCP0TcyMDJSMLSwMjC2MrJQ0lHKS8wFSZfkKtXGAgBCtQzi', origin: 'wss://omnefeeds.angelbroking.com', lastEventId: '', source: null, …}
    isTrusted: true
    bubbles: false
    cancelBubble: false
    cancelable: false
    composed: false
    currentTarget: WebSocket {url: 'wss://omnefeeds.angelbroking.com/NestHtml5Mobile/socket/stream', readyState: 3, bufferedAmount: 0, onopen: ƒ, onerror: ƒ, …}
    data: "eJyLrlYqKUvMKU1VslIyMIzRNzCP0TcyMDJSMLSwMjC2MrJQ0lHKS8wFSZfkKtXGAgBCtQzi"
    defaultPrevented: false
    eventPhase: 0
    lastEventId: ""
    origin: "wss://omnefeeds.angelbroking.com"
    path: []
    ports: []
    returnValue: true
    source: null
    srcElement: WebSocket {url: 'wss://omnefeeds.angelbroking.com/NestHtml5Mobile/socket/stream', readyState: 3, bufferedAmount: 0, onopen: ƒ, onerror: ƒ, …}
    target: WebSocket {url: 'wss://omnefeeds.angelbroking.com/NestHtml5Mobile/socket/stream', readyState: 3, bufferedAmount: 0, onopen: ƒ, onerror: ƒ, …}
    timeStamp: 52395
    type: "message"


  • let atob = require('atob');
    let pako = require('pako');

    you have to use this two library to decrypt the data


  • @talk2ajay is anyone else getting the same error