xml-rpc redstone: how can the xml-rpc messages be viewed? - message

Using redstone.xmlrpc.XmlRpcClient and redstone.xmlrpc.XmlRpcServlet, how can I see the actual xml-rpc messages that are being sent back and forth? Is there some configuration setting that needs to be set?

I used RawCap to collect the traffic and then used Wireshark to view the traffic giving the filter 'http and xml'

Related

Wireshark does not capture python POST request

I have a python script which triggers a http POST request using standard libraries. I'm trying to view and debug the requests content by capturing in wireshark.
The request is sucesfull because I recieve the correct server response.
In wireshark I listen on all available interfaces but cannot find the request.
I have also tried some filtering options like http filter but the request was still not found.
I have Ubuntu installed and the server host is not localhost
How can I find the request?
You are unable to capture HTTP POST request because you are using Wireshark http filters. Do not filter traffic with HTTP filters, instead of that use website/URL IP address.
I have just tried to filter the traffic with the help of Wireshark and found that I can filter it with the help of IP address.
Refer below link,
https://www.w3schools.com/python/ref_requests_post.asp
Use Filter : "ip.addr==192.229.133.221"
I can filter the packets, but its TCP encrypted traffic and we cannot get additional information without decryption.
Refer below answer, it will help you to find the IP address of your URL.
How to use filters in the wireshark?
If you are not comfortable with it, use “Microsoft Network Monitor” tool. It shows applications name along with IP address and ports.
Once you know the IP address and ports used, you can filter the traffic with the help of Wireshark easily.
Note:- I will suggest instead of "Wireshark" or "Microsoft Network Monitor”, please use fiddler. Refer below link,
How to capture Visual Studio Code traffic through Fiddler?

Use wireshark to see requests, not packets

I am trying to monitor calls to an API, and I am trying to do so with wireshark. However, I only see low level packets, I want to see the actual http and https requests and responses. Is this possible with wireshark?
You might consider using something besides wireshark for this.
For instance the Burp proxy will allow you to inspect requests and responses between you and the application, as well as pause a request, edit it, then send it on it's way. It really is a great tool for working with web APIs.

How do I filter json-rpc requests using stuff like wireshark?

I've been trying to filter my requests using wireshark but so far to no avail. I already know how to filter xml-rpc requests using wireshark. I followed this tutorial. I trust that to filter json-rpc requests, I should also follow a similar route? I tried to replace the xml filter to json and I also tried http, but I don't get anything at all. Sometimes, I do get something but they're a bunch of ok/200 responses and they dont even resemble any of the actual response I get. How to properly get the request?
You can do it with wireshark. This link covers it, complete with screenshots. It is under statistics> conversations list> TCP, send your request, then click on follow stream.

Need to poll Mqtt broker from a java REST API for already published messages to MQTT

I am looking for a solution to poll messages from MQTT broker. I will describe the solution briefly here.
We have a Spring based Controller class which exposes REST APIs to handle certain vehicle related diagnostics data. Through one of these API-s Notify3P() I create a MQTT java client and publish messages based on some input data to the MQTT broker on a given topic. My requirement is to notify a third-party system every time the client publishes a message on MQTT.
The 3P system is going to pick up the message from MQTT once it receives the notification. It then needs to get the message from the MQTT broker through a getMessage() REST API (which we need to expose on the above controller class). The getMessage() API needs to poll MQTT for the messages that have already been published and hand it to the 3P system. The 3P system would then do some processing and send back a response to our system through another REST API postMessage() exposed on our controller class. The postMessage() should post the message on the response topic on MQTT. I need another REST API checkResponse() which then polls the response topic of MQTT and send back the response to the client.
What I have done so far: On application start up I have a start up bean which listens to MQTT request and response topics. Now I publish data to request topic using the REST API Notify3P(). I have attached a callback with the startup bean which gets the message. The problem comes when the 3P needs to call my controller to poll message from MQTT.
I am not clear how to hold back messages on MQTT and consume it on demand. Is there a mechanism to do it in MQTT? Also once the 3P system post messages on the response then again how do I poll the response topic to pick up the response from MQTT and send to clients of my Controller?
I hope the problem description makes sense. If there is any solution from anyone please post it. Any sample code would of great help.
Thanks in advance!!
You may have got the idea of MQTT a bit confused. One of the key points is that there is no polling.
You subscribe to your response topic and publish to the request topic. As soon as a response is available you will be sent it by the broker. You can't hold back messages.
It sounds like your controller also needs to talk MQTT. If it is subscribed to the response topic from the start then it will receive the messages and you can do with them what you will, no need for polling.
To achieve exactly what you want, where the third party notifies the controller to read messages from MQTT then the controller would need to be able to use MQTT anyway. At that point you might as well do it "properly". If you don't want to integrate MQTT into your controller, then you can't do what you describe and you will have to come up with another means of communicating between the two components.
Summary - get your controller to talk MQTT if you can.

Capture Rails API Requests/Response with WireShark

I'm working with the API using HTTMultiParty and I'm having trouble capturing the outgoing HTTP requests when I make POSTs. I don't see them at all in wireshark. I am capturing on the wireless adapter (I have no other internet connection) and filtering on
http.host contains "docusign"
but I can't see anything come up. Even with just an HTTP filter, I see nothing new captured while I see a request and response. Why is wireshark unable to view the traffic from my rails app? Note: I can see the request made by my browser to the rails app.
Since it's https traffic, assuming you know the IP address of the server you're talking to, use the filter ip.addr == x.x.x.x and you should see TLS traffic leaving leaving your client.
I presume in the above comments that you mean "ip.dst" because there is no such thing as "tcp.dest" as far as I'm aware.
Slightly old but here's a complete list of filters.

Resources