Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Working on Microsoft Edge

Eric Lawrence ericlaw1979

💭
Working on Microsoft Edge
View GitHub Profile
@ericlaw1979
ericlaw1979 / TypeTheClipboard.vbs
Created Feb 18, 2021
Types the contents of the clipboard to the focused text area three seconds after invocation (useful for using sites/apps that block CTRL+V paste). Useful as a script launched from [SlickRun](https://bayden.com/slickrun)
View TypeTheClipboard.vbs
set WshShell = WScript.CreateObject("WScript.Shell")
WScript.Sleep 3000
'Hackery to get the clipboard's contents
Set objHTML = CreateObject("htmlfile")
text = objHTML.ParentWindow.ClipboardData.GetData("text")
WshShell.SendKeys text
@ericlaw1979
ericlaw1979 / ShowOriginalSessionID.js
Created Dec 1, 2020
Show the pre-save sessionID in a column for loaded Fiddler SAZ files
View ShowOriginalSessionID.js
public BindUIColumn("OrigID", 50 /*width*/, 1 /*order*/, true/*sortNumerically*/)
static function ShowOriginalID(oS: Session): String {
return oS["x-OriginalSessionID"];
}
View gist:0daa972269eb4c2efacf068c06173a10
// https://groups.google.com/d/msg/httpfiddler/BNnW_Y9jxCQ/eIaQsKhInPoJ
// https://microsite.omniture.com/t2/help/en_US/sc/implement/index.html#Sample_Product_Strings
public BindUITab("ReadTiming", true)
static function readsReport(arrSess: Session[]):String {
var oSB: System.Text.StringBuilder = new System.Text.StringBuilder();
oSB.Append("<html><head></head><body>");
for (var i:int = 0; i<arrSess.Length; i++)
{
var sClt:String = arrSess[i].Timers.ClientReads.ToString();
var sSrv:String = arrSess[i].Timers.ServerReads.ToString();
@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