Request that was made on android application cannot be accessed from PC

asked 2023-06-30 09:46:08 +0000

Elior gravatar image

Hi,

The problem is this I used Wireshark while trying to find which request a android application was making, While searching for the request I found the website and in Wireshark I can see the response.

While trying to replicate this using Node.js & Browser I got a few errors:

Browser: api.sdarot.pirate’s DNS address could not be found

Node.js (fetch): Code:

fetch("http://api.sdarot.pirate/sernew/info/9597", {
    headers: {
        "user-agent": "OS: android, Device: sdk_gphone_x86_64",
        "cookie": "Sdarot=vczzCsV5aRIJ6...; path=/; domain=.sdarot.pirate; secure",
        "accept-encdoing": "application/json",
        "host": "api.sdarot.pirate",
        "auth": "e57d38e2a552412155ce2360d4b....",
        "pkg": "com.efs.telly.sdarottv",
    }
}).then((response) => response.text()).then(text => console.log(text));

Error:

  TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:14152:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  cause: Error: getaddrinfo ENOTFOUND api.sdarot.pirate
      at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {
    errno: -3008,
    code: 'ENOTFOUND',
    syscall: 'getaddrinfo',
    hostname: 'api.sdarot.pirate'
  }
}

Request in Wireshark: Image

Response in Wireshark: Image

I tried using http & https, I would appreciate I you can help me replicate this request.

edit retag flag offensive close merge delete

Comments

It seems to me that this is a NodeJS problem and with your code specifically and is not a Wireshark issue.

grahamb gravatar imagegrahamb ( 2023-06-30 09:59:11 +0000 )edit