Created
October 17, 2016 19:18
-
-
Save daniellizik-sc/ed0c296d2c115a69843c7e741b6d4331 to your computer and use it in GitHub Desktop.
crx
This file contains 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
[ | |
{ | |
"matches": ["verical.com"], | |
"script": "_implementing/verical.dev.js", | |
"block": ["d16fk4ms6rqz1v.cloudfront.net/capture/verical.js"], | |
"devtools": ["logErr", "neverExceedLimit"] | |
}, | |
{ | |
"matches": ["23andme.com"], | |
"script": "23andme.js", | |
"block": ["d16fk4ms6rqz1v.cloudfront.net/capture/23andme.js"], | |
"devtools": ["autoIdle"] | |
}, | |
{ | |
"matches": ["sunandski.com"], | |
"script": "sc_sunandski.js", | |
"block": ["d16fk4ms6rqz1v.cloudfront.net/capture/sc_sunandski.js"], | |
"devtools": ["logErr", "blankSession"] | |
}, | |
{ | |
"matches": ["fitbit.com"], | |
"script": "_implementing/fitbit.dev.js", | |
"block": [ | |
"d16fk4ms6rqz1v.cloudfront.net/capture/UAT/FITBIT.js", | |
"//d16fk4ms6rqz1v.cloudfront.net/capture/UAT/FITBIT.js", | |
"https://d16fk4ms6rqz1v.cloudfront.net/capture/UAT/FITBIT.js", | |
"http://d16fk4ms6rqz1v.cloudfront.net/capture/UAT/FITBIT.js", | |
"d16fk4ms6rqz1v.cloudfront.net/capture/FITBIT.js", | |
"//d16fk4ms6rqz1v.cloudfront.net/capture/FITBIT.js", | |
"https://d16fk4ms6rqz1v.cloudfront.net/capture/FITBIT.js", | |
"http://d16fk4ms6rqz1v.cloudfront.net/capture/FITBIT.js" | |
], | |
"devtools": ["logErr", "neverExceedLimit", "v1Error"] | |
}, | |
{ | |
"matches": ["ahs.com"], | |
"script": "americanhomeshield.js", | |
"block": [ | |
"d16fk4ms6rqz1v.cloudfront.net/capture/americanhomeshield.js", | |
"http://d16fk4ms6rqz1v.cloudfront.net/capture/americanhomeshield.js", | |
"https://d16fk4ms6rqz1v.cloudfront.net/capture/americanhomeshield.js" | |
], | |
"devtools": ["neverExceedLimit"] | |
}, | |
{ | |
"matches": ["gaia.com"], | |
"script": "gaia2.js", | |
"block": ["https://d16fk4ms6rqz1v.cloudfront.net/capture/gaia2.js"], | |
"devtools": [] | |
}, | |
{ | |
"matches": ["pandora.net"], | |
"script": "sc_uspandora.js", | |
"block": [ | |
"http://d16fk4ms6rqz1v.cloudfront.net/capture/sc_uspandora.js", | |
"https://d16fk4ms6rqz1v.cloudfront.net/capture/sc_uspandora.js", | |
"d16fk4ms6rqz1v.cloudfront.net/capture/sc_uspandora.js" | |
], | |
"devtools": ["logErr", "neverExceedLimit"] | |
}, | |
{ | |
"matches": [ | |
"cart.autopartswarehouse.com", | |
"checkout.autopartswarehouse.com", | |
"autopartswarehouse" | |
], | |
"script": "sc_autopartswarehouse.js", | |
"block": [ | |
"https://d16fk4ms6rqz1v.cloudfront.net/capture/sc_autopartswarehouse.js", | |
"//d16fk4ms6rqz1v.cloudfront.net/capture/sc_autopartswarehouse.js" | |
], | |
"devtools": ["logErr", "neverExceedLimit", "aps"] | |
}, | |
{ | |
"matches": ["insightvacations.com"], | |
"script": "insightvacations.js", | |
"block": [ | |
"https://d2zah9y47r7bi2.cloudfront.net/releases/current/tracker.js", | |
"http://d2zah9y47r7bi2.cloudfront.net/releases/current/tracker.js", | |
"//d2zah9y47r7bi2.cloudfront.net/releases/current/tracker.js", | |
"https://d16fk4ms6rqz1v.cloudfront.net/capture/insightvacations.js", | |
"//d16fk4ms6rqz1v.cloudfront.net/capture/insightvacations.js", | |
"d16fk4ms6rqz1v.cloudfront.net/capture/insightvacations.js" | |
], | |
"devtools": ["logErr", "neverExceedLimit", "insight", "postmessage"] | |
} | |
] |
This file contains 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
{ | |
v1Error: () => { | |
const origin = __sco.v1runtime; | |
__sco.v1runtime = function(e) { | |
console.log('%c[v1runtime error]', 'color:white;background:blue;font-weight:900;'); | |
console.log(e); | |
origin.apply(__sco, arguments); | |
}; | |
}, | |
fitbit: () => { | |
setTimeout(() => document.dispatchEvent( new MouseEvent('mouseout', {clientX: 9999}) ), 3000); | |
}, | |
ahs: () => { | |
setTimeout(() => document.dispatchEvent( new MouseEvent('mouseout', {clientX: 9999}) ), 4000); | |
setTimeout(() => document.querySelector('#wrapper-sc label').click(), 5500); | |
setTimeout(() => document.querySelector('#wrapper-sc .emb-sc').value = '+17033043555', 6500); | |
setTimeout(() => document.querySelector('#wrapper-sc .send-sc').click(), 8000); | |
setTimeout(() => location.assign(location.href), 9000); | |
}, | |
postmessage: () => { | |
window.addEventListener('message', e => { | |
console.log(JSON.stringify(e, null, 2)); | |
}); | |
}, | |
gai2a: () => { | |
setTimeout(() => document.querySelector('a.home-banner__signup').click(), 4000); | |
setTimeout(() => { | |
let btn = document.querySelectorAll('.plan__button'); | |
let random = Math.floor(Math.random() * 2) + 0; | |
console.warn('%c' + random + ' btn', 'color:blue;font-weight:900;') | |
btn[random].click(); | |
}, 5500); | |
setTimeout(() => console.log('%c' + __sco.currentSubscriptionLevel, 'color:blue;font-weight:900;'), 7000); | |
setTimeout(() => document.dispatchEvent( new MouseEvent('mouseout', {clientX: 9999}) ), 7000); | |
}, | |
onerror: () => { | |
setInterval(() => { | |
window.onerror = (e) => console.log(e, e.stack) | |
}, 1000); | |
}, | |
basketSpy: () => { | |
const origin = _scs; | |
window.__logs = []; | |
_scs = function(...args) { | |
let err = new Error(); | |
let stack = err.stack; | |
let trace = stack.replace('Error', '').split(/[\r\n]/g).slice(1).map(s => s.replace(/^\s{4}/g, '')); | |
let result = origin.apply(this, args); | |
if (stack.includes('__sco.scraper.statusone') && stack.includes('_scs')) { | |
console.log(result, trace) | |
} | |
window.__logs.push({ trace, item: result }); | |
return result; | |
}; | |
}, | |
blankSession: () => { | |
const origin = __sco.management.setsession; | |
__sco.management.setsession = function(data) { | |
let hasBasket = data.hasOwnProperty('b'); | |
let clone = Object.assign({}, data, { | |
b: { c: '', i: [], v: '' }, | |
s: data.s || { i: '', m: '' } | |
}); | |
return origin.call(this, hasBasket === true ? clone : data); | |
}; | |
}, | |
logErr: () => { | |
const origin = __sco.error; | |
__sco.error = function(msg) { | |
const stack = new Error().stack.replace('Error', ''); | |
console.log(`%c[sco err]: ${JSON.stringify(arguments)}`, 'color:red'); | |
console.log(stack) | |
return origin.call(this, `[sc-dev] ${msg}`); | |
}; | |
}, | |
neverExceedLimit: () => { | |
setInterval(() => { | |
if (window.__sco) { | |
if (__sco.osr) { | |
if (__sco.osr.activePageConfig) { | |
__sco.osr.exceedsLimit = false; | |
__sco.osr.activePageConfig.limitFrequency = false; | |
} | |
} | |
} | |
}, 50); | |
}, | |
osrSplitOverride: () => { | |
function reduceConfig(config) { | |
let templates = config.pageConfigs.reduce((a, page) => { | |
let filters = page.pageInstances.reduce((b, instance) => { | |
let f = instance.filters.map(fl => ({ | |
// page: page.name, | |
// pages: page.validPages, | |
name: instance.instanceName, | |
keyword: fl.keyword, | |
templateId: fl.templates.osr, | |
instanceId: instance.id | |
})); | |
return b.concat(f); | |
}, []); | |
return a.concat(filters); | |
}, []); | |
return { data: templates, clientId: config.clientId }; | |
} | |
let hasMeld = false; | |
let meldInterval = setInterval(() => { | |
if (hasMeld === true) | |
return clearInterval(meldInterval); | |
if (window.__sco) { | |
if (__sco.osr) { | |
if (hasMeld === false) { | |
hasMeld = true; | |
meld.around(__sco.management, 'intersend', (m) => { | |
let args = m.args; | |
if (args[0] === 'GET' && args[1].includes('osr')) { | |
let origin = args[3]; | |
args[3] = function(e) { | |
let osrconfig = e.target.responseText | |
let res = JSON.parse(osrconfig) | |
let reduced = reduceConfig(res).data; | |
let json = JSON.stringify(reduced, null, 2); | |
let templateId = prompt(`enter template id to render from\n\n${json}`); | |
let obj = reduced.filter(o => o.templateId == templateId)[0]; | |
origin({ | |
target: { responseText: osrconfig } | |
}); | |
meld.around(__sco.osr, 'getActiveInstanceConfig', (mm) => { | |
let instance = __sco.osr.activePageConfig.pageInstances.filter(i => i.id === obj.instanceId).pop(); | |
__sco.osr.activePageConfig.splitTests = {}; | |
__sco.osr.activePageConfig.splitTests[instance.instanceId] = 100; | |
return instance; | |
}); | |
} | |
} | |
m.proceed(); | |
}); | |
} | |
} | |
} | |
}, 100); | |
}, | |
autoIdle: () => { | |
setInterval(() => { | |
if (window.__sco) { | |
if (__sco.osr) { | |
if (__sco.osr.activePageConfig) { | |
if (__sco.osr.activePageConfig.inactivityDuration > 0) { | |
__sco.osr.activePageConfig.inactivityDuration = 5; | |
} | |
} | |
} | |
} | |
}, 50); | |
}, | |
autoOsr: () => { | |
setTimeout(() => document.dispatchEvent( new MouseEvent('mouseout', {clientX: 9999}) ), 4000); | |
}, | |
autoEmb: () => { | |
const email = '[email protected]'; | |
setTimeout(() => document.dispatchEvent( new MouseEvent('mouseout', {clientX: 9999}) ), 3000); | |
setTimeout(() => document.querySelector('.emb-sc').value = email, 4000); | |
setTimeout(() => document.querySelector('.send-sc.btn-sc').click(), 4500); | |
}, | |
autoRefresh: () => { | |
setTimeout(() => location.assign(location.href), 6000); | |
}, | |
cleanLog: () => { | |
const filter = 'VeApps'; | |
const origin = console; | |
const methods = ['log', 'info', 'warn', 'error']; | |
const log = function(...args) { | |
console.log(1, args) | |
const argv = args.filter(a => { | |
if (typeof a === 'string' && a.includes(filter)) | |
return false; | |
else if (typeof a !== 'string') | |
return true; | |
}); | |
origin.apply(this, argv); | |
}; | |
methods.forEach(m => console[m] = log.bind(console)); | |
}, | |
basketSpec: () => { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment