Ask Your Question
0

How is this json response retrieved?

asked 2019-10-22 17:00:26 +0000

aquatic7 gravatar image

I have this .pcap but I don't understand how it get the json response. I can't get any of the URI's to give a proper response with usable json data: PCAP file

Can anyone point me in the right direction? Thank you.

edit retag flag offensive close merge delete

Comments

I don't understand the question. Wireshark shows the retrieved json data as responses from the server to the client POST requests.

Are you saying the client application involved in this capture fails to receive the data? If that's the case it's a failure in that application and off-topic for this site.

grahamb gravatar imagegrahamb ( 2019-10-22 17:09:13 +0000 )edit

I am sorry if this is off-topic for the site. Didn't know where else to post it. I thought that I with wireshark maybe could see how to make such a post or get request to retrieve the same json data in a browser or with python.

I can thanks to wireshark see the request url is 'http://dhcxzil.facecast.xyz/faceshow/...' and yes, I can get the json data with wireshark, but what I would like to is get the data without wireshark.That's maybe when it get's off topic. But I thought I could use wireshark to get this information on how to via the request url / api get the json without wireshark.

I don't know if any of this makes any sense :D

aquatic7 gravatar imageaquatic7 ( 2019-10-22 17:39:22 +0000 )edit

So you've shared a capture that works, i.e. json data is returned. Can you show a capture with the application that fails, then we can use Wireshark to look at the differences?

In general this site is for Wireshark and Wireshark related issues, not fixing applications, but in this case there might be a way to use Wireshark to identify what's going wrong which is its purpose in life.

grahamb gravatar imagegrahamb ( 2019-10-22 17:59:47 +0000 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-10-22 20:27:02 +0000

SYN-bit gravatar image

You could try something like this:

curl --header "systoken: 4982f36448f4c29faa08803ad9c13aae" \
     --header "Content-Type: application/x-www-form-urlencoded" \
     --user-agent "okhttp/3.12.1" \
     --data "api_version=1&platform=android&platform_version=7.1.1&app_version=1.9.8&device=I9195I&unixTime=1571756090198&systoken=4982f36448f4c29faa08803ad9c13aae&longitude=0.0&latitude=0.0&index=1&type_id=4&userId=264655&country_id=16&cnt=2" \
     --verbose \
     https://dhcxzil.facecast.xyz/faceshow/tokens/weapp/live_room/get_room_list

(I took the parameters from your pcap file).

The response was {"msg":"Token is invalid, please login again","code":40001}. So in order to properly receive a response, you either need to supply a valid token. Or use some requests to the login page to get a valid token before firing off these requests to get the JSON output that you want.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-10-22 17:00:26 +0000

Seen: 73 times

Last updated: Oct 22