Skip to content

Instantly share code, notes, and snippets.

@ericlaw1979
Created February 22, 2016 21:46
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ericlaw1979/f4ad91f5d7b3379ad237 to your computer and use it in GitHub Desktop.
Hashes
public static ContextAction("Show Hashes")
function doHash(arrSess: Session[])
{
for (var i: int=0; i<arrSess.Length; i++)
{
FiddlerObject.alert(
"_MD5_\n"+arrSess[i].GetResponseBodyHash("md5") + "\n\n" +
"_SHA1_\n"+arrSess[i].GetResponseBodyHash("sha1") + "\n\n" +
"_SHA256_\n"+arrSess[i].GetResponseBodyHash("sha256") + "\n"
);
}
}
ContextAction("VirusTotal")
public static
function doVTCheck(arrSess: Session[])
{
for (var i: int=0; i<arrSess.Length; i++)
{
var oS = arrSess[i];
if (oS.bHasResponse)
{
Utilities.LaunchHyperlink(String.Format(
"https://www.virustotal.com/en/file/{0}/analysis/",
oS.GetResponseBodyHash("sha256").Replace("-","")));
}
}
}
@ericlaw1979
Copy link
Author

ericlaw1979 commented May 2, 2017

C# version:

[ContextAction("Show Hashes")]
public static void doHash( Session[] arrSess) {
	for (int i=0; i < arrSess.Length; i++) {
		FiddlerObject.alert(
			"_MD5_\n"+arrSess[i].GetResponseBodyHash("md5") + "\n\n" +
			"_SHA1_\n"+arrSess[i].GetResponseBodyHash("sha1") + "\n\n" +
			"_SHA256_\n"+arrSess[i].GetResponseBodyHash("sha256") + "\n"           
			);
	}
}  

[ContextAction("VirusTotal")]    
public static void doVTCheck(Session[] arrSess) { 
	for (int i=0; i<arrSess.Length; i++) {
		var oS = arrSess[i];
		if (oS.bHasResponse) {
			Utilities.LaunchHyperlink(String.Format(
				"https://www.virustotal.com/en/file/{0}/analysis/",
				oS.GetResponseBodyHash("sha256").Replace("-","")));   
		}
	}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment