My client's developer sent me a Postman Post Request Body in a format that I'm not sure how to enter into Fiddler 4.
In the Postman Body (raw):
{
"userCredential":
{
"userId": "myemail80@mailhost.com",
"password": "Password1"
}
}
I copied just the UserId and password parts into the top part of Fiddler composer, and other values in the lower "Request Body" in Telerik:
userId: myemail80@mailhost.com
password: Password1
Do I need to encode "userCredential" and if so, how?
I am a bit confused between terminologies Request Body and Request Header between Postman and Telerik.
Testing using Postman I get a OK 200 return. In Fiddler I am getting
"statusCode":1,"errorType":3,"errorCode":9200,"errorMessage":"Missing mandatory data in header"}}
Thanks,
Hello, I am trying to use FiddlerScript to change a json response from my API server to my client. I keep on getting an error when I have my client connect to the server. I am new to FiddlerScript so I don't know if I am doing anything wrong.
This is the code I am using in Fiddler ScriptEditor:
01.
// Here is code to modify server's response
02.
if
(oSession.host == (
"api.server"
) && oSession.uriContains(
"/config/url/1"
)) {
03.
// Color this response, so we can spot it in Fiddler
04.
oSession[
"ui-backcolor"
] =
"lime"
;
05.
06.
// Convert the request body into a string
07.
var
oBody = System.Text.Encoding.UTF8.GetString(oSession.responseBodyBytes);
08.
09.
// Convert the text into a JSON object
10.
var
j1 = Fiddler.WebFormats.JSON.JsonDecode(oBody);
11.
12.
//Change the value
13.
j1.JSONObject[
"data1"
][
"data2"
][
"data3"
][
"data4"
][
"Value"
] =
"1000"
;
14.
j1.JSONObject[
"data1"
][
"data2"
][
"data3"
][
"Value"
] =
"1000"
;
15.
16.
// Convert back to a byte array
17.
var
modBytes1 = Fiddler.WebFormats.JSON.JsonEncode(j1.JSONObject);
18.
19.
// Convert json to bytes, storing the bytes in request body
20.
var
mod = System.Text.Encoding.UTF8.GetBytes(modBytes1);
21.
oSession.RequestBody = mod;
22.
}
23.
24.
// Here is code to modify server's response
25.
if
(oSession.host == (
"api.server"
) && oSession.uriContains(
"/config/url/2"
)) {
26.
// Color this response, so we can spot it in Fiddler
27.
oSession[
"ui-backcolor"
] =
"lime"
;
28.
29.
// Convert the request body into a string
30.
var
oBody = System.Text.Encoding.UTF8.GetString(oSession.responseBodyBytes);
31.
32.
// Convert the text into a JSON object
33.
var
j2 = Fiddler.WebFormats.JSON.JsonDecode(oBody);
34.
35.
//Change the value
36.
j2.JSONObject[
"data1"
][
"data2"
][
"data3"
][
"data4"
][
"Value"
] =
"1000"
;
37.
j2.JSONObject[
"data1"
][
"data2"
][
"data3"
][
"Value"
] =
"1000"
;
38.
39.
// Convert back to a byte array
40.
var
modBytes2 = Fiddler.WebFormats.JSON.JsonEncode(j2.JSONObject);
41.
42.
// Convert json to bytes, storing the bytes in request body
43.
var
mod = System.Text.Encoding.UTF8.GetBytes(modBytes2);
44.
oSession.RequestBody = mod;
45.
}
46.
47.
// Here is code to modify server's response
48.
if
(oSession.host == (
"api.server"
) && oSession.uriContains(
"/config/database"
)) {
49.
// Color this response, so we can spot it in Fiddler
50.
oSession[
"ui-backcolor"
] =
"lime"
;
51.
FiddlerApplication.Log.LogFormat(oBody);
52.
53.
// Convert the request body into a string
54.
var
oBody = System.Text.Encoding.UTF8.GetString(oSession.responseBodyBytes);
55.
56.
// Convert the text into a JSON object
57.
var
j3 = Fiddler.WebFormats.JSON.JsonDecode(oBody);
58.
59.
//Change the value
60.
j3.JSONObject[
"Value"
] =
"1"
;
61.
j3.JSONObject[
"data1"
][
"Value"
] =
"1000"
;
62.
63.
// Convert back to a byte array
64.
var
modBytes3 = Fiddler.WebFormats.JSON.JsonEncode(j3.JSONObject);
65.
66.
// Convert json to bytes, storing the bytes in request body
67.
var
mod = System.Text.Encoding.UTF8.GetBytes(modBytes3);
68.
oSession.RequestBody = mod;
69.
}
70.
71.
// Here is code to modify server's response
72.
if
(oSession.host == (
"api.server"
) && oSession.uriContains(
"/config"
)) {
73.
// Color this response, so we can spot it in Fiddler
74.
oSession[
"ui-backcolor"
] =
"lime"
;
75.
76.
// Convert the request body into a string
77.
var
oBody = System.Text.Encoding.UTF8.GetString(oSession.responseBodyBytes);
78.
79.
// Convert the text into a JSON object
80.
var
j4 = Fiddler.WebFormats.JSON.JsonDecode(oBody);
81.
82.
//Change the value
83.
j4.JSONObject[
"Value"
] =
"1"
;
84.
j4.JSONObject[
"data1"
][
"Value"
] =
"1000"
;
85.
86.
// Convert back to a byte array
87.
var
modBytes4 = Fiddler.WebFormats.JSON.JsonEncode(j4.JSONObject);
88.
89.
// Convert json to bytes, storing the bytes in request body
90.
var
mod = System.Text.Encoding.UTF8.GetBytes(modBytes4);
91.
oSession.RequestBody = mod;
92.
}
I have attached screenshots of the setup and the error codes.
I test mobile applications on both Android and iOS. I've tried using Fiddler running on a desktop PC to monitor an Android phone's network connections.
Can Fiddler running on a desktop PC be used not only to monitor an Android's or iPhone's network connections, but to throttle (slow down the speed, in a controlled manner) the mobile device's network connections? If so, how?
Thank you.
- Russell Johnson
Software Tester
Hi,
I'm using Fiddler4 to capture from an iOS 13.3.1 device, with the iOS device set to Manual Proxy mode and necessary certificates installed on both end. Overall, works very well.
But there is a problem. For every socket opened by the iOS that goes via the proxy is never closed again. So the connection from iOS to Fiddler4 appears to be closed ok. However the socket from Fiddler4 to destination device stays open until I shutdown Fiddler.
The result of this is that on connection limited devices, they run out of available connections and it all stops working.
I've wiresharked the session when not going via Fiddler and iOS is correctly closing the socket (FIN state is sent).
When I wireshark the Fiddler4 proxied session the socket just stays open based on the socket is open from between my PC running Fiddler and the destination device.
Is this a known problem? If yes, is there a work around?
Best regards
Steve
Hello,
I just downloaded and installed Fiddler on my Ubuntu 16.04 machine (Love it on my Windows machine). Getting the Fiddler certificate installed for Chrome and Firefox was surprisingly easy (I thought I would have to do some converting).
However, when I try to add the same CER file to the system wide trusted certificates, my OS tells me that the FiddlerRoot.pem does not contain a certificate (output pasted below). I am wondering if this is a known issue since this is still in beta phase or if I am doing something wrong.
I am trying to do this so when I run things through the terminal Fiddler will pick them up - specifically HTTPS requests.
output:
test@GPA-HSW04:/usr/lib/mono/4.5$ sudo cp '/home/test/Desktop/FiddlerRoot.cer' '/usr/share/ca-certificates/FiddlerRoot.crt'
test@GPA-HSW04:/usr/lib/mono/4.5$ sudo dpkg-reconfigure ca-certificatesProcessing triggers for ca-certificates (20160104ubuntu1) ...
Updating certificates in /etc/ssl/certs...
WARNING: FiddlerRoot.pem does not contain a certificate or CRL: skipping
Which is the last version of FiddlerCore which is free for commercial use in a non public application?
Earlier I downloaded version 2.4.0.1
Is there any newer version which is free for commercial usage? If yes, from where can I download it?
Hello. I've got tons of experience using Fiddler but it was on my old Windows 7 machine a couple years ago. I'm getting back to using Fiddler again, now on a Mac Book Pro, running Mojave. When I close Fiddler, whether by clicking the close icon on the window or selecting Quit from the menu, it causes my internet to be unusable. I get proxy errors in the browsers. I've followed directions to reset the proxies in system settings and this changes nothing. Obviously this is a game-breaking experience. Is there a solution?
Hi guys,
I am pretty new on Fiddler and Wireshark and stuff like that. I try to edit a response for learning propose but many connections dont get Shown on Fiddler.
Like that one : "https://prnt.sc/r9a7ms"
May I messed something up with my settings or do I need to make some Script to get it working?
Thanks for your time guys.
Hi,
I am trying to capture WebSocket connection of an app in windows (Win32).
I also created a test app with websocketsharp and connected to ws://echo.websocket.org and unfortunately this was not captured in fiddler.
Any help?
Fiddler version: v5.0.20194.41348 for .NET 4.6.1
Built: Thursday, October 3, 2019