This is a migrated thread and some comments may be shown as answers.

Remembering Filters

15 Answers 143 Views
Fiddler Classic
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 12 Aug 2016, 09:45 AM

The amount of times I am restarting fiddler and adding the same URLs or processes to filter out is getting a bit mundane. I have Outlook, Skype running which all clutter up the list.  Also IE is running.  I just want to focus on a single URL within a session.

Is there a filter list where I can save the filters to and easily switch on switch off this?

 

 

 

 

15 Answers, 1 is accepted

Sort by
0
Tsviatko Yovtchev
Telerik team
answered on 22 Aug 2016, 03:56 PM
Hello,

Normally Fiddler persists filters on restart. Is this not working for you? 

Or is it that you are frequently switching between a number of different filters and want these saved?

Regards,
Tsviatko Yovtchev
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Paul
Top achievements
Rank 1
answered on 05 Sep 2016, 08:02 AM

Hi Tsviatko,

It doesn't seem to be persisting for me.

I am adding filters using Right-Click then Filter Now context menu.  I don't really want to see anything to/from www.telerik.com for example.  The same with the Outlook process.  I have to readd these everytime.  Would be good if I didn't.  Unless there is a different way to do this.

Regards

Paul

 

 

0
Tsviatko Yovtchev
Telerik team
answered on 14 Sep 2016, 05:24 PM
Hello,

Sorry for the late response.

By default Fiddler will try saving your filters in your MyDocuments\Fiddler2\Filters\LastSession.ffx . Is it possible that Fiddler does not have write access to this location?

You can also save/load custom filter sets from the Actions button in the Filters tab. Does that work for you?

Regards,
Tsviatko Yovtchev
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Paul
Top achievements
Rank 1
answered on 27 Sep 2016, 01:00 PM

Hi Tsviatko ,

My LastSession.ffx has not been changed since 10th June 2016.  In that time I have ran fiddler many times. 

Fiddler having write access?  Would that not be my user not having access?  I've tried running as administrator and my normal account.

As for the Filters tab, I am not sure what is going on here.  I have the following Hide the following Hosts:

www.telerik.com; nexus.officeapps.live.com; a.company-target.com;

But yet it still shows them when I click on the Actions->Run Filterset now.

Thanks

Paul

 

 

 

0
Tsviatko Yovtchev
Telerik team
answered on 30 Sep 2016, 03:24 PM
Hi,

That's weird. Could you move the ffx file to a different location? Maybe another program locked it. Let's see whether Fiddler would be able to create it again.

Regards,
Tsviatko Yovtchev
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
CH
Top achievements
Rank 1
answered on 12 May 2017, 09:46 AM
Hi my Fiddler does not remember Filters settings too. I am referring to the Filters at the bottom, not the Filters on the right. Every time I restart Fiddler, I have to right-click many items to filter them again.
0
Rory
Top achievements
Rank 1
answered on 04 Aug 2017, 11:33 AM

I have the same issue.  I would love to have a way for them to persist.

I see this and believe its not possible: https://fiddler.ideas.aha.io/ideas/FID-I-114

0
Troy
Top achievements
Rank 1
answered on 05 Feb 2018, 11:38 AM
I have been wanting this as well.  There has to be a way, doesn't there??
0
Alexander
Telerik team
answered on 19 Feb 2018, 12:29 PM
Hi,

Currently, the Quick Filters (the ones created by right clicking on session and selecting "Filter now") cannot be saved between sessions. A workaround for this is using the "Filters" tab, which can be saved and restored between sessions. Also multiple filter sets are possible.

Regards,
Alexander
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
BillVo
Top achievements
Rank 1
answered on 24 Apr 2019, 05:57 PM
It seems where "Filter Now" can exclude named processes, Filters tab cannot. Is that correct?
0
BillVo
Top achievements
Rank 1
answered on 24 Apr 2019, 06:09 PM

The "Client Process: Show only traffic from" setting on Filter tab cannot saved/loaded.

0
Simeon
Telerik team
answered on 30 Apr 2019, 02:24 PM
Hello Bill,

You are correct. However, you could achieve the same functionality with the FiddlerScript:
static function OnPeekAtRequestHeaders(oSession: Session) {
    var sProc = ("" + oSession["x-ProcessInfo"]).ToLower();
    if (!sProc.StartsWith("chrome")) oSession.Ignore();
}

Regards,
Simeon
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Brandon
Top achievements
Rank 1
answered on 23 May 2019, 02:37 PM
I have implemented similar behavior in the customize rules script.  It uses three different files for saving filters.  This suited my needs but obviously could be easily expanded to suit any number of scenarios.  They all contain a line delimited list of strings.  File 1(CustomUrlStartsWithFilters.dat) contains strings that should be filtered when the url.StartsWith(string).  File 2(CustomUrlEndsWithFilters.dat): contains strings that should be filtered when the url.EndsWith(string).  File 3(CustomHostFilters.dat) contains strings that should be filtered when the HostNameIs(string).  All that is needed is to create these three files in the [MyDocuments]\Fiddler2\Scripts\Filters folder (or anywhere you want to put it).  Paste this code over the OnPeekAtRequestHeaders method:         
        public static void OnPeekAtRequestHeaders(Session oSession) 
        {
var line = "";
var customFilterFileDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\Fiddler2\\Scripts\\Filters\\";

var filterFileName = customFilterFileDirectory + "CustomUrlStartsWithFilters.dat";

using(var filterFile = new StreamReader(File.OpenRead(filterFileName)))
{
while((line = filterFile.ReadLine()) != null)
{
if(oSession.url.StartsWith(oSession.hostname + line))
{
FiddlerApplication.Log.LogFormat("Custom Filter(UrlStartsWith)::  Url: " + oSession.url + " starts with: " + line);
oSession["ui-hide"] = "hide urls that startwith";
}
}
}

var hostFilterFileName = customFilterFileDirectory + "CustomHostFilters.dat";

using(var hostFile = new StreamReader(File.OpenRead(hostFilterFileName)))
{
while((line = hostFile.ReadLine()) != null)
{
if(oSession.HostnameIs(line))
{
FiddlerApplication.Log.LogFormat("Custom Filter(HostNameIs)::  Host name is: " + oSession.hostname);
oSession["ui-hide"] = "hide those hosts";
}
}
}

var urlEndsWithFilterFileName = customFilterFileDirectory + "CustomUrlEndsWithFilters.dat";

using (var endsWithFile = new StreamReader(File.OpenRead(urlEndsWithFilterFileName)))
{
while ((line = endsWithFile.ReadLine()) != null)
{
if (oSession.url.EndsWith(line))
{
FiddlerApplication.Log.LogFormat("Custom Filter(UrlEndsWith)::  Url: " + oSession.url + " ends with: " + line);
oSession["ui-hide"] = "hide urls that endwith";
}
}
}
        }
0
Brandon
Top achievements
Rank 1
answered on 08 Aug 2019, 02:46 PM
Same code as above.  Formatted for readability
 
public static void OnPeekAtRequestHeaders(Session oSession)
{
    var line = "";
    var customFilterFileDirectory =
           Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
           + "\\Fiddler2\\Scripts\\Filters\\";
 
    var filterFileName = customFilterFileDirectory + "CustomUrlStartsWithFilters.dat";
 
    using (var filterFile = new StreamReader(File.OpenRead(filterFileName)))
    {
        while ((line = filterFile.ReadLine()) != null)
        {
            if (oSession.url.StartsWith(oSession.hostname + line))
            {
                FiddlerApplication.Log.LogFormat(
                      "Custom Filter(UrlStartsWith)::  Url: " + oSession.url +
                      " starts with: " + line);
 
                oSession["ui-hide"] = "hide urls that startwith";
            }
        }
    }
 
    var hostFilterFileName = customFilterFileDirectory + "CustomHostFilters.dat";
 
    using (var hostFile = new StreamReader(File.OpenRead(hostFilterFileName)))
    {
        while ((line = hostFile.ReadLine()) != null)
        {
            if (oSession.HostnameIs(line))
            {
                FiddlerApplication.Log.LogFormat(
                       "Custom Filter(HostNameIs)::  Host name is: " + oSession.hostname);
 
                oSession["ui-hide"] = "hide those hosts";
            }
        }
    }
 
    var urlEndsWithFilterFileName = customFilterFileDirectory + "CustomUrlEndsWithFilters.dat";
 
    using (var endsWithFile = new StreamReader(File.OpenRead(urlEndsWithFilterFileName)))
    {
        while ((line = endsWithFile.ReadLine()) != null)
        {
            if (oSession.url.EndsWith(line))
            {
                FiddlerApplication.Log.LogFormat(
                       "Custom Filter(UrlEndsWith)::  Url: " + oSession.url +
                       " ends with: " + line);
 
                oSession["ui-hide"] = "hide urls that endwith";
            }
        }
    }
}
0
Messy
Top achievements
Rank 1
answered on 04 Feb 2020, 06:19 AM
[quote]Paul said:

The amount of times I am restarting fiddler and adding the same URLs or processes to filter out is getting a bit mundane. I have Outlook, Skype running which all clutter up the list. Also IE is running. I just want to focus on a single URL within a session.

Is there a filter list where I can save the filters to and easily switch on switch off this?

[/quote]

Many thanks for that complete information!

Tags
Fiddler Classic
Asked by
Paul
Top achievements
Rank 1
Answers by
Tsviatko Yovtchev
Telerik team
Paul
Top achievements
Rank 1
CH
Top achievements
Rank 1
Rory
Top achievements
Rank 1
Troy
Top achievements
Rank 1
Alexander
Telerik team
BillVo
Top achievements
Rank 1
Simeon
Telerik team
Brandon
Top achievements
Rank 1
Messy
Top achievements
Rank 1
Share this question
or