Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
91f6797d51 | ||
|
|
930c30677f | ||
|
|
b8e22740e2 |
14
README.md
14
README.md
@@ -2,18 +2,24 @@
|
||||
|
||||
A simple and efficient server emulator for DVDFab products; including DVDFab, StreamFab, MusicFab and more...
|
||||
|
||||
## Mirrors
|
||||
|
||||
_**I do not have a GitHub repository for this project. If you see this project on GitHub, it is an unofficial mirror. The only official source is [The CDM-Project](https://cdm-project.com).**_
|
||||
|
||||
## Installation
|
||||
|
||||
Download the distribution (`DVDFabServerEmulator.zip`) and unpack it to a directory you can easily access.
|
||||
Download the [latest distribution (`DVDFabServerEmulator.zip`)](https://cdm-project.com/Deja/DVDFabServerEmulator/releases/latest) and unpack it to a directory you can easily access.
|
||||
|
||||
Afterwards, run the runtime script (`start.bat`) and enjoy! You can now install and use any DVDFab software locally without having to connect to external authentication servers.
|
||||
Afterwards, run the runtime script (`start.bat`) and enjoy! You can now install and use any DVDFab software locally without having to connect to any external authentication servers.
|
||||
|
||||
Please note that you will need to keep the emulator/proxy running whilst using DVDFab software.
|
||||
|
||||
It is recommended to run the clean-up script (`stop.bat`) to disconnect from the local proxy after you're done using it, as it can interfere with other programs.
|
||||
_**It is a requirement for you to press (`CTRL-C`) to disconnect from the local proxy after you're done using it, as it can interfere with other programs.**_
|
||||
|
||||
_If you closed the emulator without pressing (`CTRL-C`), you can run the clean-up script (`stop.bat`)._
|
||||
|
||||
## Notes
|
||||
|
||||
This project is not affiliated with StreamFab or any other subsidiary of DVDFab, and does not contain any copyrighted work.
|
||||
|
||||
This software is only intended to allow legitimately licensed users of the DVDFab software suite to use their rightfully purchased software without having to connect to an external authentication server, it is not intended to promote or encourage piracy of any kind, and should only be used by legitimate owners of DVDFab software.
|
||||
This software is only intended to allow legitimately licensed users of the DVDFab software suite to use their rightfully purchased software without having to connect to any external authentication servers, it is not intended to promote or encourage piracy of any kind, and should only be used by legitimate owners of DVDFab software.
|
||||
|
||||
49
index.js
49
index.js
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
DVDFab Server Emulator v1.1.1
|
||||
DVDFab Server Emulator v1.1.2
|
||||
*/
|
||||
|
||||
// Libraries
|
||||
@@ -11,35 +11,34 @@ const mockttp = require('mockttp');
|
||||
// Classes
|
||||
class Session {
|
||||
constructor() {
|
||||
this.DOMAINS = ['hotmail.com', 'gmail.com', 'yahoo.com', 'outlook.com', 'protonmail.com', 'yandex.com'];
|
||||
this.CHARACTERS = 'abcdefghijklmnopqrstuvwxyz0123456789.-';
|
||||
this.email = null;
|
||||
this.machine_id = null;
|
||||
this.emailDomains = ['hotmail.com', 'gmail.com', 'yahoo.com', 'outlook.com', 'protonmail.com', 'yandex.com'];
|
||||
this.emailCharacters = 'abcdefghijklmnopqrstuvwxyz0123456789.-';
|
||||
this.currentEmail = null;
|
||||
this.currentMachineId = null;
|
||||
this.usage = 0;
|
||||
this.update();
|
||||
this.generateNewIdentity();
|
||||
}
|
||||
|
||||
generateRandomString(length) {
|
||||
return Array(length).fill(null).map(() => this.CHARACTERS.charAt(Math.floor(Math.random() * this.CHARACTERS.length))).join('');
|
||||
return Array(length).fill(null).map(() => this.emailCharacters.charAt(Math.floor(Math.random() * this.emailCharacters.length))).join('');
|
||||
}
|
||||
|
||||
generateMacAddress() {
|
||||
const bytes = Array.from({ length: 12 }, () => Math.floor(Math.random() * 256));
|
||||
const mac1 = bytes.slice(0, 6).map(b => b.toString(16).padStart(2, '0')).join('-');
|
||||
const mac2 = bytes.slice(6).map(b => b.toString(16).padStart(2, '0')).join('-');
|
||||
return `${mac1}:${mac2}`;
|
||||
const macBytes = Array.from({ length: 12 }, () => Math.floor(Math.random() * 256));
|
||||
const firstMac = macBytes.slice(0, 6).map(_ => _.toString(16).padStart(2, '0')).join('-');
|
||||
const secondMac = macBytes.slice(6).map(_ => _.toString(16).padStart(2, '0')).join('-');
|
||||
return `${firstMac}:${secondMac}`;
|
||||
}
|
||||
|
||||
update() {
|
||||
const length = Math.floor(Math.random() * 10) + 5;
|
||||
this.email = `${this.generateRandomString(length)}@${this.DOMAINS[Math.floor(Math.random() * this.DOMAINS.length)]}`;
|
||||
this.machine_id = this.generateMacAddress();
|
||||
generateNewIdentity() {
|
||||
this.currentEmail = `${this.generateRandomString(Math.floor(Math.random() * 10) + 5)}@${this.emailDomains[Math.floor(Math.random() * this.emailDomains.length)]}`;
|
||||
this.currentMachineId = this.generateMacAddress();
|
||||
}
|
||||
|
||||
patchBoundary(data) {
|
||||
if (this.usage === 3) {
|
||||
this.usage = 0;
|
||||
this.update();
|
||||
this.generateNewIdentity();
|
||||
}
|
||||
|
||||
const macRegex = /^([0-9a-f]{2}-){5}[0-9a-f]{2}(:([0-9a-f]{2}-){5}[0-9a-f]{2})?/;
|
||||
@@ -49,9 +48,9 @@ class Session {
|
||||
for (const key in data) {
|
||||
const value = data[key];
|
||||
if (macRegex.test(value)) {
|
||||
data[key] = this.machine_id;
|
||||
data[key] = this.currentMachineId;
|
||||
} else if (emailRegex.test(value)) {
|
||||
data[key] = this.email;
|
||||
data[key] = this.currentEmail;
|
||||
} else if (subscriptionRegex.test(value)) {
|
||||
data[key] = 'trial';
|
||||
}
|
||||
@@ -183,15 +182,19 @@ ticket.push('TM:0');
|
||||
console.log(' +=============================================================+');
|
||||
console.log(' | DVDFab Server Emulator has started... |');
|
||||
console.log(' | You may now use any DVDFab software. |');
|
||||
console.log(' | Press CTRL-C or close this window to stop the emulator. |');
|
||||
console.log(' | Press CTRL-C to stop the emulator. |');
|
||||
console.log(' | You can safely ignore any errors. |');
|
||||
console.log(' +=============================================================+');
|
||||
console.log(' | If you have any problems with your network after |');
|
||||
console.log(' | disconnecting from the local proxy, please run the |');
|
||||
console.log(' | \'stop.bat\' script. |');
|
||||
console.log(' +=============================================================+');
|
||||
console.log(' | If you got this script from anywhere apart from |');
|
||||
console.log(' | The CDM-Project, you likely have a malicious copy. |');
|
||||
console.log(' +=============================================================+');
|
||||
console.log();
|
||||
console.log(' !-------------------------------------------------------------!');
|
||||
console.log(' ! !!!!!!!!! READ THIS OR YOU WILL SUFFER, LITERALLY !!!!!!!!! !');
|
||||
console.log(' !-------------------------------------------------------------!');
|
||||
console.log(' ! ONCE YOU ARE READY, DO NOT JUST CLOSE THE EMULATOR! !');
|
||||
console.log(' ! Using CTRL-C will properly disconnect you from the proxy. !');
|
||||
console.log(' ! If you used the CLOSE BUTTON, run the \'stop.bat\' script. !');
|
||||
console.log(' !-------------------------------------------------------------!');
|
||||
console.log();
|
||||
})();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dvdfabserveremulator",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"description": "A simple and efficient server emulator for DVDFab products; including DVDFab, StreamFab, MusicFab and more...",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
12
start.bat
12
start.bat
@@ -1,6 +1,16 @@
|
||||
@echo off
|
||||
if "%~1"=="-FIXED_CTRL_C" (
|
||||
SHIFT
|
||||
) ELSE (
|
||||
CALL <NUL %0 -FIXED_CTRL_C %*
|
||||
GOTO :EOF
|
||||
)
|
||||
cd /d %~dp0
|
||||
@call npm install
|
||||
setx http_proxy "http://localhost:8000"
|
||||
setx https_proxy "http://localhost:8000"
|
||||
start node %~dp0"index.js"
|
||||
cls
|
||||
node .
|
||||
setx http_proxy ""
|
||||
setx https_proxy ""
|
||||
exit /b 0
|
||||
|
||||
2
stop.bat
2
stop.bat
@@ -1,5 +1,5 @@
|
||||
@echo off
|
||||
taskkill /f /im node.exe*
|
||||
taskkill /f /im "node.exe*"
|
||||
setx http_proxy ""
|
||||
setx https_proxy ""
|
||||
exit /b 0
|
||||
|
||||
@@ -1 +1 @@
|
||||
6194
|
||||
6195
|
||||
Reference in New Issue
Block a user