Created
September 4, 2023 20:26
-
-
Save smx-smx/759fe8e5ef555020c86ef39c7b0230d2 to your computer and use it in GitHub Desktop.
Soundcloud Scrub Login bypass (UserScript)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name soundcloud | |
// @namespace https://soundcloud.com/ | |
// @version 0.1 | |
// @include http*://*soundcloud.com* | |
// @description try to take over the world! | |
// @author You | |
// @icon https://www.google.com/s2/favicons?domain=soundcloud.com | |
// @grant none | |
// @run-at document-start | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
function hookedSignupModule(e, t, n){ | |
e.exports = { | |
shouldBlockScrubbing: function (e) { return false; }, | |
pauseAndPromptSignup: function () {} | |
} | |
} | |
function makeDummyProxy(){ | |
var target = function(){}; | |
return new Proxy(target, { | |
get: function(target, p, receiver){ | |
return makeDummyProxy(); | |
}, | |
apply: function(target, thisArg, args){ | |
return makeDummyProxy(); | |
} | |
}); | |
} | |
function proxyPush(realPush){ | |
return new Proxy(realPush, { | |
apply: function(target, thisArg, args){ | |
var item = args[0]; | |
var moduleId = item[0][0]; | |
var exports = item[1]; | |
for(var ordinal in exports){ | |
var vtable = {}; | |
var fproxy = makeDummyProxy(false); | |
if(typeof(exports[ordinal]) === 'function'){ | |
try { | |
exports[ordinal](vtable, {}, fproxy); | |
} catch(e){ | |
//console.warn(`Skipping module ${moduleId}, ordinal ${ordinal}`); | |
} | |
if(!('exports' in vtable)) continue; | |
if(typeof(vtable.exports) !== 'object') continue; | |
if(!('shouldBlockScrubbing' in vtable.exports)) continue; | |
exports[ordinal] = hookedSignupModule; | |
} | |
} | |
return Reflect.apply(target, thisArg, args); | |
} | |
}); | |
} | |
var webpackProxy = []; | |
window.webpackJsonp = new Proxy(webpackProxy, { | |
get: function(tgt, propName, receiver){ | |
var prop = Reflect.get(tgt, propName, receiver); | |
if(propName === "push"){ | |
return proxyPush(prop); | |
} | |
return prop; | |
} | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks! It works LOL