|
| 1 | +import BypassDefinition from './BypassDefinition.js'; |
| 2 | + |
| 3 | +export default class Adtival extends BypassDefinition { |
| 4 | + constructor() { |
| 5 | + super(); |
| 6 | + this.ensure_dom = true; |
| 7 | + } |
| 8 | + |
| 9 | + execute() { |
| 10 | + console.log('Adtival found!'); |
| 11 | + |
| 12 | + const executor = async () => { |
| 13 | + const El = window.livewire.components.components()[0]; |
| 14 | + |
| 15 | + const payload = { |
| 16 | + fingerprint: El.fingerprint, |
| 17 | + serverMemo: El.serverMemo, |
| 18 | + updates: [ |
| 19 | + { |
| 20 | + payload: { |
| 21 | + event: 'getData', |
| 22 | + id: 'whathappen', |
| 23 | + params: [], |
| 24 | + }, |
| 25 | + type: 'fireEvent', |
| 26 | + }, |
| 27 | + ], |
| 28 | + }; |
| 29 | + |
| 30 | + const response = await fetch( |
| 31 | + location.origin + '/livewire/message/pages.show', |
| 32 | + { |
| 33 | + headers: { |
| 34 | + 'Content-Type': 'application/json', |
| 35 | + 'X-Livewire': 'true', |
| 36 | + 'X-CSRF-TOKEN': window.livewire_token, |
| 37 | + }, |
| 38 | + method: 'POST', |
| 39 | + body: JSON.stringify(payload), |
| 40 | + } |
| 41 | + ); |
| 42 | + |
| 43 | + const json = await response.json(); |
| 44 | + |
| 45 | + // ensure URL |
| 46 | + const url = new URL(json.effects.emits[0].params[0]); |
| 47 | + |
| 48 | + this.helpers.safelyAssign(url.href); |
| 49 | + // this.helpers.unsafelyNavigate(url.href, location.href) |
| 50 | + }; |
| 51 | + |
| 52 | + // special case for sekilastekno. modbaca(?) |
| 53 | + if (RegExp(/(modebaca|sekilastekno)\.com/).exec(location.host)) { |
| 54 | + this.helpers.ifElement("form[method='post']", (a) => { |
| 55 | + console.log('addRecord...'); |
| 56 | + |
| 57 | + const input = document.createElement('input'); |
| 58 | + input.value = window.livewire_token; |
| 59 | + input.name = '_token'; |
| 60 | + input.hidden = true; |
| 61 | + a.appendChild(input); |
| 62 | + a.submit(); |
| 63 | + }); |
| 64 | + |
| 65 | + // ...same step as miuiku and vebma |
| 66 | + this.helpers.ifElement('button[x-text]', async () => { |
| 67 | + console.log('getLink..'); |
| 68 | + executor(); |
| 69 | + }); |
| 70 | + |
| 71 | + return; |
| 72 | + } |
| 73 | + |
| 74 | + // adtival getLink on miuiku |
| 75 | + this.helpers.ifElement("div[class='max-w-5xl mx-auto']", async () => { |
| 76 | + console.log('Executing..'); |
| 77 | + executor(); |
| 78 | + }); |
| 79 | + |
| 80 | + // adtival b64UrlLastPage |
| 81 | + this.helpers.ifElement("button[id='copyVideoURL']", () => { |
| 82 | + const shortID = new URLSearchParams(window.location.search).get( |
| 83 | + 'shortid' |
| 84 | + ); |
| 85 | + |
| 86 | + this.helpers.safelyAssign(atob(shortID)); |
| 87 | + }); |
| 88 | + } |
| 89 | +} |
| 90 | + |
| 91 | +export const matches = [ |
| 92 | + /movienear\.me|lewat\.club|tautan\.pro|(droidtamvan|gubukbisnis|onlinecorp)\.me|(liveshootv|modebaca|haipedia|sekilastekno|miuiku|vebma)\.com|shrink\.world|link\.mymastah\.xyz|(sportif|cararoot)\.id|healthinsider\.online/, |
| 93 | + 'www.adtival.network', |
| 94 | +]; |
0 commit comments