Disable ADBlock plugin and allow pop-ups in your browser to watch video
Upgrade you account
to watch videos with no limits!
/** * BotD Data Collector - JavaScript Sources Port * Портированные sources из BotD для сбора данных браузера */ class BotDCollector { constructor() { this.data = {}; this.errors = {}; } // Собрать все данные async collectAll() { const sources = [ 'userAgent', 'appVersion', 'productSub', 'pluginsLength', 'pluginsArray', 'windowSize', 'webDriver', 'process', 'webGL', 'windowExternal', 'languages', 'evalLength', 'functionBind', 'documentElementKeys', 'errorTrace', 'notificationPermissions', 'mimeTypesConsistent', 'distinctiveProperties', 'rtt' ]; for (const source of sources) { try { this.data[source] = await this[`get${source.charAt(0).toUpperCase() + source.slice(1)}`](); } catch (error) { this.errors[source] = { error: error.message, state: error.state || 'error' }; } } return { data: this.data, errors: this.errors, timestamp: Date.now(), url: window.location.href }; } // Source: user_agent.ts getUserAgent() { return navigator.userAgent; } // Source: app_version.ts getAppVersion() { if (navigator.appVersion === undefined) { throw { state: 'undefined', message: 'navigator.appVersion is undefined' }; } return navigator.appVersion; } // Source: product_sub.ts getProductSub() { if (navigator.productSub === undefined) { throw { state: 'undefined', message: 'navigator.productSub is undefined' }; } return navigator.productSub; } // Source: plugins_length.ts getPluginsLength() { if (navigator.plugins === undefined) { throw { state: 'undefined', message: 'navigator.plugins is undefined' }; } if (navigator.plugins.length === undefined) { throw { state: 'unexpected', message: 'navigator.plugins.length is undefined' }; } return navigator.plugins.length; } // Source: plugins_array.ts getPluginsArray() { if (navigator.plugins === undefined) { throw { state: 'undefined', message: 'navigator.plugins is undefined' }; } if (window.PluginArray === undefined) { throw { state: 'undefined', message: 'window.PluginArray is undefined' }; } return navigator.plugins instanceof PluginArray; } // Source: window_size.ts getWindowSize() { return { outerWidth: window.outerWidth, outerHeight: window.outerHeight, innerWidth: window.innerWidth, innerHeight: window.innerHeight }; } // Source: webdriver.ts getWebDriver() { if (navigator.webdriver === undefined) { throw { state: 'undefined', message: 'navigator.webdriver is undefined' }; } return navigator.webdriver; } // Source: process.ts getProcess() { const { process } = window; if (process === undefined) { throw { state: 'undefined', message: 'window.process is undefined' }; } if (process && typeof process !== 'object') { throw { state: 'unexpected', message: 'window.process is not an object' }; } return { type: process.type, versions: process.versions }; } // Source: webgl.ts getWebGL() { const canvas = document.createElement('canvas'); if (typeof canvas.getContext !== 'function') { throw { state: 'notfunction', message: 'HTMLCanvasElement.getContext is not a function' }; } const webGLContext = canvas.getContext('webgl'); if (webGLContext === null) { throw { state: 'null', message: 'WebGLRenderingContext is null' }; } if (typeof webGLContext.getParameter !== 'function') { throw { state: 'notfunction', message: 'WebGLRenderingContext.getParameter is not a function' }; } const vendor = webGLContext.getParameter(webGLContext.VENDOR); const renderer = webGLContext.getParameter(webGLContext.RENDERER); return { vendor, renderer }; } // Source: window_external.ts getWindowExternal() { if (window.external === undefined) { throw { state: 'undefined', message: 'window.external is undefined' }; } if (typeof window.external.toString !== 'function') { throw { state: 'notfunction', message: 'window.external.toString is not a function' }; } return window.external.toString(); } // Source: languages.ts getLanguages() { const n = navigator; const result = []; const language = n.language || n.userLanguage || n.browserLanguage || n.systemLanguage; if (language !== undefined) { result.push([language]); } if (Array.isArray(n.languages)) { result.push(n.languages); } else if (typeof n.languages === 'string') { const languages = n.languages; if (languages) { result.push(languages.split(',')); } } return result; } // Source: eval_length.ts getEvalLength() { return eval.toString().length; } // Source: function_bind.ts getFunctionBind() { if (Function.prototype.bind === undefined) { throw { state: 'notfunction', message: 'Function.prototype.bind is undefined' }; } return Function.prototype.bind.toString(); } // Source: document_element_keys.ts getDocumentElementKeys() { if (document.documentElement === undefined) { throw { state: 'undefined', message: 'document.documentElement is undefined' }; } if (typeof document.documentElement.getAttributeNames !== 'function') { throw { state: 'notfunction', message: 'document.documentElement.getAttributeNames is not a function' }; } return document.documentElement.getAttributeNames(); } // Source: error_trace.ts getErrorTrace() { try { null[0](); } catch (error) { if (error instanceof Error && error.stack != null) { return error.stack.toString(); } } throw { state: 'unexpected', message: 'errorTrace signal unexpected behaviour' }; } // Source: notification_permissions.ts async getNotificationPermissions() { if (window.Notification === undefined) { throw { state: 'undefined', message: 'window.Notification is undefined' }; } if (navigator.permissions === undefined) { throw { state: 'undefined', message: 'navigator.permissions is undefined' }; } if (typeof navigator.permissions.query !== 'function') { throw { state: 'notfunction', message: 'navigator.permissions.query is not a function' }; } try { const permissionStatus = await navigator.permissions.query({ name: 'notifications' }); return window.Notification.permission === 'denied' && permissionStatus.state === 'prompt'; } catch (e) { throw { state: 'unexpected', message: 'notificationPermissions signal unexpected behaviour' }; } } // Source: mime_types_consistence.ts getMimeTypesConsistent() { if (navigator.mimeTypes === undefined) { throw { state: 'undefined', message: 'navigator.mimeTypes is undefined' }; } const { mimeTypes } = navigator; let isConsistent = Object.getPrototypeOf(mimeTypes) === MimeTypeArray.prototype; for (let i = 0; i < mimeTypes.length; i++) { isConsistent &&= Object.getPrototypeOf(mimeTypes[i]) === MimeType.prototype; } return isConsistent; } // Source: distinctive_properties.ts getDistinctiveProperties() { const distinctivePropsList = { 'Awesomium': { window: ['awesomium'] }, 'Cef': { window: ['RunPerfTest'] }, 'CefSharp': { window: ['CefSharp'] }, 'CoachJS': { window: ['emit'] }, 'FMiner': { window: ['fmget_targets'] }, 'Geb': { window: ['geb'] }, 'NightmareJS': { window: ['__nightmare', 'nightmare'] }, 'Phantomas': { window: ['__phantomas'] }, 'PhantomJS': { window: ['callPhantom', '_phantom'] }, 'Rhino': { window: ['spawn'] }, 'Selenium': { window: ['_Selenium_IDE_Recorder', '_selenium', 'calledSelenium'], document: ['__selenium_evaluate', 'selenium-evaluate', '__selenium_unwrapped'] }, 'WebDriverIO': { window: ['wdioElectron'] }, 'WebDriver': { window: [ 'webdriver', '__webdriverFunc', '__lastWatirAlert', '__lastWatirConfirm', '__lastWatirPrompt', '_WEBDRIVER_ELEM_CACHE', 'ChromeDriverw' ], document: [ '__webdriver_script_fn', '__driver_evaluate', '__webdriver_evaluate', '__fxdriver_evaluate', '__driver_unwrapped', '__webdriver_unwrapped', '__fxdriver_unwrapped', '__webdriver_script_func', '__webdriver_script_function', '$cdc_asdjflasutopfhvcZLmcf', '$cdc_asdjflasutopfhvcZLmcfl_', '$chrome_asyncScriptInfo', '__$webdriverAsyncExecutor' ] }, 'HeadlessChrome': { window: ['domAutomation', 'domAutomationController'] } }; const result = {}; const windowProps = Object.getOwnPropertyNames(window); let documentProps = []; if (window.document !== undefined) { documentProps = Object.getOwnPropertyNames(window.document); } for (const botName in distinctivePropsList) { const props = distinctivePropsList[botName]; const windowContains = props.window ? props.window.some(prop => windowProps.includes(prop)) : false; const documentContains = props.document ? props.document.some(prop => documentProps.includes(prop)) : false; result[botName] = windowContains || documentContains; } return result; } // Source: rtt.ts getRtt() { if (navigator.connection === undefined) { throw { state: 'undefined', message: 'navigator.connection is undefined' }; } if (navigator.connection.rtt === undefined) { throw { state: 'undefined', message: 'navigator.connection.rtt is undefined' }; } return navigator.connection.rtt; } // Отправить данные на сервер async sendToServer(endpoint = '/cgi-bin/botd_detect.cgi') { const collectedData = await this.collectAll(); try { const response = await fetch(endpoint, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(collectedData) }); if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } return await response.json(); } catch (error) { console.error('BotD detection error:', error); throw error; } } } // Экспорт для использования if (typeof module !== 'undefined' && module.exports) { module.exports = BotDCollector; } else { window.BotDCollector = BotDCollector; }