Hi, I'm trying to proxy and cache some responses that are being redownloaded over and over.
To do that I wrote this simple customization in FiddlerScript:
static
function
OnBeforeResponse(oSession: Session) {
var
captureRequests =
false
;
var
targetHost =
"api.nuget.org"
;
var
captureFolder =
"c:\\Projects\\Fiddler\\api.nuget.org"
;
// Capture traffic
if
(captureRequests && oSession.host.toLowerCase() == targetHost)
{
var
targetFile = captureFolder + oSession.PathAndQuery.Split(
'?'
)[0].Replace(
'/'
,
'\\'
);
oSession.oResponse[
"X-oSession-PathAndQuery"
] = targetFile;
var
fi =
new
FileInfo(targetFile);
Directory.CreateDirectory(fi.DirectoryName)
if
(!File.Exists(fi.FullName))
{
File.WriteAllBytes(fi.FullName, oSession.ResponseBody);
}
}
// // Replay captured
var
replayRequests =
true
;
if
(replayRequests&& oSession.host.toLowerCase() == targetHost)
{
var
targetFile = captureFolder +
"\\"
+ oSession.PathAndQuery.Split(
'?'
)[0].Replace(
'/'
,
'\\'
);
var
fi =
new
FileInfo(targetFile);
if
(!File.Exists(fi.FullName))
{
oSession[
"x-replywithfile"
] = fi.FullName;
}
}
}
And presumably it should work - when captureRequests=true - fiddler captures requests from a particular domain into a folder, preserving path and file name
When replayRequests = true - it simply replays existing files.
The problem here that even if I just capturing the data (I suspect I may be replaying too late - fiddler would call http already by that time...) - fiddler throws a lot of errors with this text:
---------------------------
FiddlerScript OnBeforeResponse() failed.
---------------------------
There was a problem with your FiddlerScript.
The given path's format
is
not supported.
at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)
at System.IO.FileInfo.Init(String fileName, Boolean checkHost)
at Fiddler.ScriptNamespace.Handlers.OnBeforeResponse(Session oSession)
at Fiddler.ScriptBase.(Session )
in
C:\JenkinsHome\jobs\FiddlerReleaseBuild\workspace\Fiddler2\Common\Application\Scripting\ScriptBase.cs:line 919
---------------------------
OK
---------------------------
I tried to investigate it by playing with code and identified that for some reason a typical file path like `c:\Projects\Fiddler\api.nuget.org\v3\registration1-gz\analytics\index.json` causes an error. Or that code is somehow not thread safe and competing requests simply break it (and visual studio starts them in parallel so there is a high chance of some kind of race).
Can anyone suggest what am I doing wrong here or maybe advice on better solution to the problem.
Hello,
I hope this is the correct forum for my question.
I am learning to use Fiddler (for debugging API's issues) hence I could be asking a question which is very basic or non-sensical, in this case I apologise upfront.
I would like Fiddler to show the streams going to Shopify using their API's:- in this example I have a simple GET Customers coded in Microsoft Dotnet. The API works 100% and it returns the expected XML list of current Shopify Customers.
However, when I look at the Fiddler data, it does NOT show the Authentication Headers:- I was expecting to see my Shopify API Key and Password.
Would anyone be able to explain why Fiddler states there isno Authorization Header where I used it in the API call?
Thanks
Is there a way to do a radio button effect that I can leverage in the custom rules.
I want to prompt for which one of a small set of choices should be used as the Session[i].hostname to run the selected tests.
Select host:
- localhost
- xxx.yyy.com
-aaa.bbb.com
Or if there is a better more in-built way to dynamically change the hostname for all selected sessions per run.
I am receiving an error from Fiddler when attempting to decrypt HTTPS traffic from a specific site. Other HTTPS sites seem to be working Ok.
The error is "fiddler.network.https> HTTPS handshake to login.nbnco.net.au"
URL : https://login.nbnco.net.au/portal-login
Fiddler Version :
v4.6.20171.14978
Built: Tuesday, 21 March 2017
64-bit AMD64, VM: 110.0mb, WS: 90.0mb
.NET 4.6.2 WinNT 6.1.7601 SP1
HTTPS protocols being used : <client>;ssl3;tls1.0
Browsers used :
Chrome Latest - Version 58.0.3029.96 (64-bit)
Internet Explorer : Version 11.0.9600.18638
Fiddler Log :
11:46:38:4535 fiddler.network.https> HTTPS handshake to login.nbnco.net.au (for #1136) failed. System.Security.Authentication.AuthenticationException A call to SSPI failed, see inner exception. < The message received was unexpected or badly formatted
Win32 (SChannel) Native Error Code: 0x80090326
Can anyone tell me what is happening here? And any steps I can take to rectify?
I have already followed other advice I have seen regarding Resetting Certificates, and restarting Fiddler.
Much thanks!!!
Chris
The instructions on http://www.telerik.com/blogs/fiddler-for-linux-beta-is-here for installing Fiddler for Linux Beta mention running /usr/lib/mono//mozroots --import --sync. However I don't have that application. Instead, mozroot is to be found in /usr/lib/mono/4.5. The documentation might confuse some folk.
For info, Linux Mint 18.1. Mono installed through apt install mono-complete.
Just a quick aside, why does the forum sign-up insist on the user entering a company name? We don't all work for companies.
Hi.
I get the following exception when I want to repeat a request via Shift + R
Once I press OK, the process continues with Repeat Count prompt and the repetition works.
Thanks
---------------------------
Awww, Fiddlesticks!
---------------------------
Fiddler has encountered an unexpected problem. If you believe this is a bug in Fiddler, please copy this message by hitting CTRL+C, and submit a bug report at http://www.telerik.com/forums/fiddler.
Value of 'null' is not valid for 'stream'.
Type: System.ArgumentException
Source: System.Drawing
at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData)
at Fiddler.frmPrompt.GetUserString(IWin32Window wndOwner, String sTitle, String sPrompt, String sDefault, Boolean bReturnNullIfCancelled, PromptIcon piIcon) in c:\JenkinsHome\jobs\FiddlerReleaseBuild\workspace\Fiddler2\frmPrompt.cs:line 84
Fiddler v4.6.3.50306 (x64 AMD64) [.NET 4.0.30319.42000 on Microsoft Windows NT 6.1.7601 Service Pack 1]
---------------------------
OK
---------------------------
Hello,
I have a packet capture which throws error while importing to Fiddler. I have selected one packet from capture and uploaded the capture to https://www.sendspace[.]com/file/rqnqs9 to find our what is different about this capture from the other usual captures that I am able to import without any problems. I have also attached the error screenshot that I get while I import this capture. Please feel free to delete this thread if this is not appropriate to be asked here.
Regards,
Rohit