Tag: Hostname

How to replace the host name in captured Fiddler trace

For the previous post had to find out how to replace the host name in the captured Fiddler trace.

To do this, open the Fiddler, go to Rules – Customize Rules. The Fiddler ScriptEditor will open.

Use following code to create new column named MaskedHostName with new host names. You can put it right after commented (green) part of the script.

public static BindUIColumn("MaskedHostName", 60)
function FillNameColumn(oS: Session): String {
if (oS.hostname.EndsWith("OtherHost1.OldDomain.com")) return "OtherHost1.NewDomain.com”;
if (oS.hostname.EndsWith("Host1.OldDomain.com")) return "Host1.NewDomain.com”;
return oS.hostname;

 If some of your host names look similar (like “OtherHost1” and “Host1”) make sure you put the longer host name to the top of the list, so its evaluated first and you don’t have both host names replaced by “Host1.NewDomain.com”