Skip to content

Instantly share code, notes, and snippets.

@kimusan
Forked from dualfade/fingerprint.js
Created February 16, 2023 10:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kimusan/54667ddc44ad376164599e8b78633ea9 to your computer and use it in GitHub Desktop.
Save kimusan/54667ddc44ad376164599e8b78633ea9 to your computer and use it in GitHub Desktop.
fingerprint.js
// find javascript gadgets --
// forked => https://gist.github.com/nikitastupin/b3b64a9f8c0eb74ce37626860193eaec
// ref => https://github.com/BlackFan/client-side-prototype-pollution
// ref => https://portswigger.net/web-security/cross-site-scripting/cheat-sheet#prototype-pollution
// updated; @dualfade --
// start --
// check for known gadgets --
(() => {
// gadgets --
let gadgets = [];
if (typeof _satellite !== "undefined") {
gadgets.push("Adobe Dynamic Tag Management");
}
if (typeof BOOMR !== "undefined") {
gadgets.push("Akamai Boomerang");
}
if (typeof goog !== "undefined" && typeof goog.basePath !== "undefined") {
gadgets.push("Closure");
}
if (typeof DOMPurify !== "undefined") {
gadgets.push("DOMPurify");
}
if (typeof window.embedly !== "undefined") {
gadgets.push("Embedly Cards");
}
if (
typeof $ !== "undefined" &&
typeof $.fn !== "undefined" &&
typeof $.fn.jquery !== "undefined"
) {
gadgets.push("jQuery ");
}
if (typeof filterXSS !== "undefined") {
gadgets.push("js-xss");
}
if (typeof ko !== "undefined" && typeof ko.version !== "undefined") {
gadgets.push("Knockout.js");
}
if (
typeof _ !== "undefined" &&
typeof _.template !== "undefined" &&
typeof _.VERSION !== "undefined"
) {
gadgets.push("Lodash <= 4.17.15");
}
if (typeof Marionette !== "undefined") {
gadgets.push("Marionette.js / Backbone.js");
}
if (typeof recaptcha !== "undefined") {
gadgets.push("Google reCAPTCHA");
}
if (typeof sanitizeHtml !== "undefined") {
gadgets.push("sanitize-html");
}
if (
typeof analytics !== "undefined" &&
typeof analytics.SNIPPET_VERSION !== "undefined"
) {
gadgets.push("Segment Analytics.js");
}
if (typeof Sprint !== "undefined") {
gadgets.push("Sprint.js");
}
if (typeof SwiftypeObject != "undefined") {
gadgets.push("Swiftype Site Search (uses jQuery BBQ)");
}
if (typeof utag !== "undefined" && typeof utag.id !== "undefined") {
gadgets.push("Tealium Universal Tag");
}
if (typeof twq !== "undefined" && typeof twq.version !== "undefined") {
gadgets.push("Twitter Universal Website Tag");
}
if (typeof wistiaEmbeds !== "undefined") {
gadgets.push("Wistia Embedded Video");
}
if (typeof $ !== "undefined" && typeof $.zepto !== "undefined") {
gadgets.push("Zepto.js");
}
//NOTE: pp gadgets --
//NOTE: + portswigger proto pollution gadgets --
if (typeof wistiaEmbeds !== "undefined") {
gadgets.push("Wistia Embedded Video");
}
if (
typeof $ !== "undefined" &&
typeof $.fn !== "undefined" &&
typeof $.fn.jquery !== "undefined"
) {
gadgets.push("$(x).off jQuery");
}
if (
typeof $ !== "undefined" &&
typeof $.fn !== "undefined" &&
typeof $.fn.jquery !== "undefined"
) {
gadgets.push("$(html) jQuery");
}
if (
typeof $ !== "undefined" &&
typeof $.fn !== "undefined" &&
typeof $.fn.jquery !== "undefined"
) {
gadgets.push("$.get jQuery >= 3.0.0");
}
if (
typeof $ !== "undefined" &&
typeof $.fn !== "undefined" &&
typeof $.fn.jquery !== "undefined"
) {
gadgets.push("$.getScript jQuery >= 3.4.0");
}
if (
typeof $ !== "undefined" &&
typeof $.fn !== "undefined" &&
typeof $.fn.jquery !== "undefined"
) {
gadgets.push("$.getScript jQuery 3.0.0 - 3.3.1");
}
if (typeof recaptcha !== "undefined") {
gadgets.push("Google reCAPTCHA");
}
if (typeof twq !== "undefined" && typeof twq.version !== "undefined") {
gadgets.push("Twitter Universal Website Tag");
}
if (typeof utag !== "undefined" && typeof utag.id !== "undefined") {
gadgets.push("Tealium Universal Tag");
}
if (typeof BOOMR !== "undefined") {
gadgets.push("Akamai Boomerang");
}
if (typeof sanitizeHtml !== "undefined") {
gadgets.push("sanitize-html");
}
if (typeof filterXSS !== "undefined") {
gadgets.push("js-xss");
}
if (typeof DOMPurify !== "undefined") {
gadgets.puhs("DOMPurify <= 2.0.12");
}
if (typeof DOMPurify !== "undefined") {
gadgets.push("DOMPurify <= 2.0.12");
}
if (typeof goog !== "undefined" && typeof goog.basePath !== "undefined") {
gadgets.push("Closure");
}
if (typeof goog !== "undefined" && typeof goog.basePath !== "undefined") {
gadgets.push("Closure");
}
if (typeof Marionette !== "undefined") {
if (
typeof Backbone !== "undefined" &&
typeof Backbone.VERSION !== "undefined"
) {
gadgets.push("Marionette.js / Backbone.js");
}
}
if (typeof _satellite !== "undefined") {
gadgets.push("Adobe Dynamic Tag Management");
}
if (typeof window.embedly !== "undefined") {
gadgets.push("Embedly Cards");
}
if (
typeof analytics !== "undefined" &&
typeof analytics.SNIPPET_VERSION !== "undefined"
) {
gadgets.push("Segment Analytics.js");
}
// Knockout.js --
// no working fingerprint yet --
// if () {
// }
// log --
console.log(gadgets);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment