I used the eval function in fiddlerscript to dynamically load code from the server when fiddler was opened.But when using the eval function to process JSON, the program throws an exception.code show as below:
//Operating normallyif(oSession.uriContains('https://xxxxxx.com')){
var responseStringOriginal = oSession.GetResponseBodyAsString();
var responseJSON = Fiddler.WebFormats.JSON.JsonDecode(responseStringOriginal);
responseJSON.JSONObject['data']['data1']['data2'] = 22;
responseJSON.JSONObject['data']['data1']['data3'] = 1;
responseJSON.JSONObject['data']['data1']['data4'][0]['type'] = 2;
responseJSON.JSONObject['data']['data1']['data5'][0]['type'] = 22;
var responseStringDestinal = Fiddler.WebFormats.JSON.JsonEncode(responseJSON.JSONObject);
oSession.utilSetResponseBody(responseStringDestinal);
}
eval("if(oSession.uriContains('https://xxxxxx.com')){var responseStringOriginal=oSession.GetResponseBodyAsString();var responseJSON=Fiddler.WebFormats.JSON.JsonDecode(responseStringOriginal);responseJSON.JSONObject['data']['data1']['data2']=22;responseJSON.JSONObject['data']['data1']['data3']=1;responseJSON.JSONObject['data']['data1']['data4'][0]['type']=2;responseJSON.JSONObject['data']['data1']['data5'][0]['type']=22;var responseStringDestinal=Fiddler.WebFormats.JSON.JsonEncode(responseJSON.JSONObject);oSession.utilSetResponseBody(responseStringDestinal)}")
(It says that Hashtable cannot cast to StackFrame)
Thanks for help.
I have Fiddler up and running on box A. I can see all traffic from my local machine and my autoresponders are working as expected.
On my Android cell phone I have set up the network to use box A as proxy. The pages are being rendered in the Android browser as expected and autoresponders are giving the correct data as expected, but none of the traffic is showing in the Fiddler UI.
Any idea?
My enviroment:
I run my connection through a barracuda web security gateway proxy that uses a pac file to connect
Issue.
I was running into an issue with google earth pro and was attempting to use fiddler to troubleshoot the issue. I installed fiddler without admin permissions. Google earth pro streetview fails to download images due to 407 error (Web page that renders image gives a failed to pass or parse credentials from proxy.)
The issue I am running into is when I run fiddler it "fixes" the issue without indication of where the issue came from. I uninstall fiddler and the "fix" remains even after removing google earth pro registry files tmp files and cached files, something on my system changed when installing fiddler that prevents the images in google earth pro from using my pac file when connecting. I cant seem to find out what change was made to reverse it even after an uninstall of fiddler. Any help or information regarding what system changes are made with the fiddler installer would be greatly appreciated.
Thank you,
Patrick
Hi,
Tried every filter, every Rule but this host allways appears making Fiddler unusable.
POST http://localhost:60110/request HTTP/1.1
Hello, please tell me how to create a separate POST request using the C# language.
Initially, I tried to change the outgoing POST request from another application and resend it, but I get an error - "HTTP/1.1 504 Fiddler - Receive Failure".
And now you need to write a new request, specifying the headers and receiving a response.
And the whole question is how to do it all in C#?
I tried to use this code
public static void OnBeforeResponse(Session oSession)
{
if (oSession.HTTPMethodIs("POST") )
{
String strBody = oSession.GetRequestBodyAsString();
oSession.host="api.123.com";
string resultRequest = "request";
byte[] resulByte = System.Text.Encoding.ASCII.GetBytes(resultRequest);
FiddlerApplication.oProxy.SendRequest (oSession.RequestHeaders, resulByte, null);
}
Hi,
Any release schedule for the latest Telerik Fiddler Classic? Just curious, I love your products.
Thank you in advance.
hi everyone, sorry for my English)))
I have been trying to solve my problem for a long time, but unfortunately so far without success ((((
I have a POST request of a certain type, I need to change it and send it to another address, and the original request should go further to its address. I'm trying to work with the exchange. More to the point, I have a request like this :
I need to send this request after the original one
https://fapi/binance.com/fapi/v1/order?symbol=KEEPUSDT&side=BUY&type=MARKET&quantity=100&timeInForce=GTC&recvWindow=5000×tamp=1591702613943&signature= 3c661234138461fcc7a7d8746c6558c9842d4e10870d2ecbedf7777cad694af9
In addition, the public API is passed in the header
I tried to do all this work in the onBeforeRequest method
static function OnBeforeRequest(oSession: Session) {
if (oSession.RequestMethod == "POST" && oSession.uriContains("order") ) {
oSession.utilDecodeResponse()
var strBody=oSession.GetRequestBodyAsString();
// timestamp, time ms
var timestampSTART= oSession.url.IndexOf("timestamp=") + 10;
var timestampEND= oSession.url.IndexOf("&", timestampSTART);
var timestamp = oSession.url.Substring(timestampSTART, 13);
// SYMBOL
var symbolStart = oSession.url.IndexOf("symbol=")+7;
var symbolend = oSession.url.IndexOf("BTC", symbolStart)+3;
var symbol = oSession.url.Substring(symbolStart, symbolend-symbolStart);
// Signature (timestamp+SecretAPIKey=Hmac Sha256) theoretically, it can be taken from the original request, but it is more reliable to make your own
var signStart = oSession.url.IndexOf("signature=")+10;
var sign = oSession.url.Substring(signStart);
//PRICE
var PriceStart = oSession.url.IndexOf("price=")+6;
var PriceEND = oSession.url.IndexOf("&", PriceStart);
var priceStr = oSession.url.Substring(PriceStart, PriceEND-PriceStart);
var price = parseFloat(priceStr);
// Quantity
var quantity = 50/ price*63000;
var apiBIN = "https://fapi.binance.com/fapi/v1/order?" ;
// var result = apiBIN+"symbol="+symbol+"&side=BUY&type=MARKET&quantity="+ quantity+"&timeInForce=GTC&recvWindow=5000×tamp="+timestamp+"&signature="+sign;
// oSession.utilSetRequestBody(result)
// FiddlerApplication.oProxy.SendRequest(oSession.RequestHeaders, oSession.requestBodyBytes, null);
I have selected the necessary parameters from the request, but I do not understand how to send it in any way, and I also lose the header with the API key.
Separately, I want to note the "Signature" parameter, which is created using the Hmac Sha256 algorithm from the secret API key and time, which I also can't figure out how to describe it in the code.
I would be very grateful for any help, with the possibility of some payment for substantial help.