Skip to content

Instantly share code, notes, and snippets.

@ShellWen
Created May 11, 2023 05:49
Show Gist options
  • Save ShellWen/092ea9ec29f2a77bd6752a163c4b38a3 to your computer and use it in GitHub Desktop.
Save ShellWen/092ea9ec29f2a77bd6752a163c4b38a3 to your computer and use it in GitHub Desktop.
Emby Web Crack
/**
* Usage:
* webPreferences: {
...
preload: path.join(__dirname, 'emby-web-crack.js'),
},
*/
const fetch_ = window.fetch
window.fetch = async (input, options) => {
// modify the request here
console.log(input)
let response = await fetch_(input, options)
const url = input
let obj = null
if (url.indexOf('/admin/service/registration/validateDevice') != -1) {
obj = {
cacheExpirationDays: 365,
message: 'Device Valid',
resultCode: 'GOOD',
}
} else if (url.indexOf('/admin/service/appstore/register') != -1) {
obj = {
featId: '',
registered: true,
expDate: '2099-01-01',
key: '',
}
} else if (url.indexOf('/admin/service/registration/validate') != -1) {
obj = {
featId: '',
registered: true,
expDate: '2099-01-01',
key: '',
}
} else if (url.indexOf('/admin/service/registration/getStatus') != -1) {
obj = {
planType: 'Cracked',
deviceStatus: '',
subscriptions: [],
}
} else if (url.indexOf('/admin/service/supporter/retrievekey') != -1) {
obj = {
Success: false,
ErrorMessage: 'Supporter not found',
}
}
if (obj != null) {
response = new Response(JSON.stringify(obj), {
status: 200,
statusText: 'OK',
headers: response.headers,
})
}
return response
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment