Skip to content

Instantly share code, notes, and snippets.

💭
Working on Microsoft Edge

Eric Lawrence ericlaw1979

💭
Working on Microsoft Edge
Block or report user

Report or block ericlaw1979

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ericlaw1979
ericlaw1979 / META CACHING Directives.ms
Created Mar 2, 2020
MeddlerScript test case. Only IE and Edge 18 and below support META cache-control and META pragma https://crbug.com/2763 https://html.spec.whatwg.org/multipage/semantics.html#pragma-directives
View META CACHING Directives.ms
/*
Only IE and Edge 18 and below support META cache-control and META pragma
https://crbug.com/2763
https://html.spec.whatwg.org/multipage/semantics.html#pragma-directives
*/
import Meddler;
import System;
import System.Net.Sockets;
import System.Windows.Forms;
View META CACHING Directives.ms
/*
Only IE and Edge 18 and below support META cache-control and META pragma
https://crbug.com/2763
https://html.spec.whatwg.org/multipage/semantics.html#pragma-directives
*/
import Meddler;
import System;
import System.Net.Sockets;
import System.Windows.Forms;
View META CACHING Directives.ms
/*
Only IE and Edge 18 and below support META cache-control and META pragma
https://crbug.com/2763
https://html.spec.whatwg.org/multipage/semantics.html#pragma-directives
*/
import Meddler;
import System;
import System.Net.Sockets;
import System.Windows.Forms;
View ServerSentEvents.ms
import Meddler;
import System;
import System.Net.Sockets;
import System.Windows.Forms;
class Handlers
{
static function OnConnection(oSession: Session)
{
try {
@ericlaw1979
ericlaw1979 / RegisterForDirectInvoke.reg
Created Sep 25, 2019
This registry script registers a new file type `.fuzzle` with the MIME-type `application/x-fuzzle` and instructs IE and Edge that the file should be opened using the DirectInvoke mechanism.
View RegisterForDirectInvoke.reg
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.fuzzle]
"Content Type"="application/x-fuzzle"
@="FuzzleProgID"
[HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/x-fuzzle]
"Extension"=".fuzzle"
[HKEY_CLASSES_ROOT\FuzzleProgID]
@ericlaw1979
ericlaw1979 / EpochConverter.js
Created Aug 14, 2019
FiddlerScript unix epoch datetime converter
View EpochConverter.js
//Scroll to just inside class Handlers and add the following block:
public static ToolsAction("E&poch Analyzer")
function showTime() {
var s = FiddlerScript.prompt("Enter an Epoch time", DateTimeOffset.Now.ToUnixTimeSeconds(), "Epoch Analyzer");
try {
var sec= Int64.Parse(s);
var dt: DateTimeOffset = DateTimeOffset.FromUnixTimeSeconds(sec);
FiddlerScript.alert("Unix Epoch time "+s+" is:\n\tLocal:\t"+dt.ToLocalTime().ToString()+"\n\tGMT:\t"+dt.ToString());
}
View IOAVScanner.cs
/*
This sample shows how to implement the IOfficeAntiVirus interface in C#
The resulting object, once registered, will calculate the file hash (SHA256/Sha1/MD5) for each file downloaded by Chrome, Edge, and Internet Explorer.
In order to successfully register this object, we'll use REGASM to register the assembly, then run a registry script to add the IOfficeAntiVirus
component category, and we'll delete the "Discardable\PostSetup" cache of known IOfficeAntiVirus implementations so that the next call to the IOfficeAntiVirus
providers will find our new object.
Eric Lawrence
View reattachFiddlerscript.js
// Click Rules > Customize Rules. Scroll to OnBoot() and inside the function add:
static function OnBoot() {
FiddlerApplication.oProxy.add_DetachedUnexpectedly(DoReattach);
//...
// Just before the OnBoot function, add the following new functions:
static function DoReattach(o: Object, ea: EventArgs) {
FiddlerObject.UI.sbpInfo.Text = "Scheduling automatic reattach at " + new Date();
@ericlaw1979
ericlaw1979 / ShowSameSiteCookieInfo.js
Last active Oct 1, 2019
FiddlerScript function adds a SSCookie column to show the SameSite attribute for Set-Cookie response headers
View ShowSameSiteCookieInfo.js
public static BindUIColumn("SSCookie", 60, 5)
function FillSSCookieInfoColumn(oS: Session): String {
if (oS.state < SessionStates.ReadingResponse) return "";
if (!oS.ResponseHeaders.Exists("Set-Cookie")) return "";
var sbVals = new System.Text.StringBuilder();
for (var i=0; i<oS.ResponseHeaders.Count(); i++){
var thisHeader = oS.ResponseHeaders[i];
if (!StringExtensions.OICEquals(thisHeader.Name, "Set-Cookie")) continue;
if (!StringExtensions.OICContains(thisHeader.Value, "samesite")) { sbVals.Append("+ "); continue; }
@ericlaw1979
ericlaw1979 / FiddlerClientCertPicker.cs
Created May 1, 2019
Fiddler client certificate picker extension
View FiddlerClientCertPicker.cs
using System;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using Fiddler;
[assembly: Fiddler.RequiredVersion("2.5.0.0")]
namespace ClientCertPicker
{
public class ClientCertPicker: IFiddlerExtension
{
You can’t perform that action at this time.