mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-22 03:32:12 -08:00
Compare commits
15 Commits
7513a1202d
...
b0a9f3c1b6
Author | SHA1 | Date | |
---|---|---|---|
|
b0a9f3c1b6 | ||
|
2f0a054bfe | ||
|
7f33a1d2fa | ||
|
07ed316f9f | ||
|
d659e0fa41 | ||
|
4732ee54f7 | ||
|
745a11e5bb | ||
|
e51eefa611 | ||
|
bd67015210 | ||
|
93bca16ebb | ||
|
1614b63ae1 | ||
|
aef5e02f19 | ||
|
040ca971e8 | ||
|
f68165c66f | ||
|
0348e83ffe |
36
README.md
36
README.md
@ -126,42 +126,6 @@ Builds for macOS may not work on Windows/Linux and vice-versa.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### Athena's Shield
|
|
||||||
|
|
||||||
The Extra File Verification System
|
|
||||||
|
|
||||||
Athena’s Shield prevents the use of unapproved mods in HeliosLauncher by verifying the integrity of each mod from the distribution, blocking unauthorized changes, and ensuring a secure, reliable gaming experience.
|
|
||||||
|
|
||||||
**How to active this ?**
|
|
||||||
|
|
||||||
```console
|
|
||||||
> npm run athshield
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
Would you like to activate Athena's Shield? (yes/no): yes
|
|
||||||
Would you like to activate debug mode? (yes/no): yes
|
|
||||||
Would you like to hide or block the menu? (hide/block): block
|
|
||||||
|
|
||||||
Athena's Shield activated. Menu blocked.
|
|
||||||
```
|
|
||||||
|
|
||||||
You can choose whether Athena's Shield hides the mod category or blocks interaction with the drop-in mod.
|
|
||||||
|
|
||||||
```console
|
|
||||||
▄▄▄ ▄▄▄█████▓ ██░ ██ ▓█████ ███▄ █ ▄▄▄ ██████ ██████ ██░ ██ ██▓▓█████ ██▓ ▓█████▄
|
|
||||||
▒████▄ ▓ ██▒ ▓▒▓██░ ██▒▓█ ▀ ██ ▀█ █ ▒████▄ ▒██ ▒ ▒██ ▒ ▓██░ ██▒▓██▒▓█ ▀ ▓██▒ ▒██▀ ██▌
|
|
||||||
▒██ ▀█▄ ▒ ▓██░ ▒░▒██▀▀██░▒███ ▓██ ▀█ ██▒▒██ ▀█▄ ░ ▓██▄ ░ ▓██▄ ▒██▀▀██░▒██▒▒███ ▒██░ ░██ █▌
|
|
||||||
░██▄▄▄▄██░ ▓██▓ ░ ░▓█ ░██ ▒▓█ ▄ ▓██▒ ▐▌██▒░██▄▄▄▄██ ▒ ██▒ ▒ ██▒░▓█ ░██ ░██░▒▓█ ▄ ▒██░ ░▓█▄ ▌
|
|
||||||
▓█ ▓██▒ ▒██▒ ░ ░▓█▒░██▓░▒████▒▒██░ ▓██░ ▓█ ▓██▒▒██████▒▒ ▒██████▒▒░▓█▒░██▓░██░░▒████▒░██████▒░▒████▓
|
|
||||||
▒▒ ▓▒█░ ▒ ░░ ▒ ░░▒░▒░░ ▒░ ░░ ▒░ ▒ ▒ ▒▒ ▓▒█░▒ ▒▓▒ ▒ ░ ▒ ▒▓▒ ▒ ░ ▒ ░░▒░▒░▓ ░░ ▒░ ░░ ▒░▓ ░ ▒▒▓ ▒
|
|
||||||
▒ ▒▒ ░ ░ ▒ ░▒░ ░ ░ ░ ░░ ░░ ░ ▒░ ▒ ▒▒ ░░ ░▒ ░ ░ ░ ░▒ ░ ░ ▒ ░▒░ ░ ▒ ░ ░ ░ ░░ ░ ▒ ░ ░ ▒ ▒
|
|
||||||
░ ▒ ░ ░ ░░ ░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░░ ░ ▒ ░ ░ ░ ░ ░ ░ ░
|
|
||||||
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Visual Studio Code
|
### Visual Studio Code
|
||||||
|
|
||||||
All development of the launcher should be done using [Visual Studio Code][vscode].
|
All development of the launcher should be done using [Visual Studio Code][vscode].
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
const fs = require('fs')
|
|
||||||
const path = require('path')
|
|
||||||
|
|
||||||
// Chemin vers le fichier de configuration
|
|
||||||
const configPath = path.join(__dirname, 'variables.athshield')
|
|
||||||
|
|
||||||
// Classe pour gérer Athena's Shield
|
|
||||||
class AthenaShield {
|
|
||||||
constructor() {
|
|
||||||
this.config = this.loadConfig()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Charger les variables depuis le fichier
|
|
||||||
loadConfig() {
|
|
||||||
const rawData = fs.readFileSync(configPath)
|
|
||||||
return JSON.parse(rawData.toString())
|
|
||||||
}
|
|
||||||
|
|
||||||
// Récupérer le statut d'Athena's Shield
|
|
||||||
get status() {
|
|
||||||
return this.config.athenaShieldActivated
|
|
||||||
}
|
|
||||||
|
|
||||||
// Récupérer la visibilité du menu
|
|
||||||
get type() {
|
|
||||||
return this.config.menuVisibility
|
|
||||||
}
|
|
||||||
|
|
||||||
// Récupérer le mode debug
|
|
||||||
get debug() {
|
|
||||||
return this.config.debug
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Exporter une instance de la classe
|
|
||||||
const athenaShieldInstance = new AthenaShield()
|
|
||||||
module.exports = athenaShieldInstance
|
|
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"athenaShieldActivated": false,
|
|
||||||
"menuVisibility": "visible",
|
|
||||||
"debug": "false"
|
|
||||||
}
|
|
@ -2,32 +2,27 @@ const fs = require('fs')
|
|||||||
const readline = require('readline')
|
const readline = require('readline')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
|
||||||
// Path to the configuration file
|
const configPath = path.join(__dirname, 'variables.json')
|
||||||
const configPath = path.join(__dirname, 'variables.athshield')
|
|
||||||
|
|
||||||
// Load the variables from the file
|
|
||||||
function loadConfig() {
|
function loadConfig() {
|
||||||
const rawData = fs.readFileSync(configPath)
|
const rawData = fs.readFileSync(configPath)
|
||||||
return JSON.parse(rawData.toString()) // Convert Buffer to string
|
return JSON.parse(rawData.toString())
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save the variables to the file
|
|
||||||
function saveConfig(config) {
|
function saveConfig(config) {
|
||||||
const data = JSON.stringify(config, null, 2)
|
const data = JSON.stringify(config, null, 2)
|
||||||
fs.writeFileSync(configPath, data)
|
fs.writeFileSync(configPath, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the readline interface
|
|
||||||
const rl = readline.createInterface({
|
const rl = readline.createInterface({
|
||||||
input: process.stdin,
|
input: process.stdin,
|
||||||
output: process.stdout
|
output: process.stdout
|
||||||
})
|
})
|
||||||
|
|
||||||
// Function to ask questions to the user
|
|
||||||
function startCLI() {
|
function startCLI() {
|
||||||
const config = loadConfig()
|
const config = loadConfig()
|
||||||
|
|
||||||
rl.question('Would you like to activate Athena\'s Shield? (yes/no): ', (answer) => {
|
rl.question('Would you like to activate extra file verification? (yes/no): ', (answer) => {
|
||||||
if (answer.trim().startsWith('//')) {
|
if (answer.trim().startsWith('//')) {
|
||||||
console.log('This is a comment; the line is ignored.')
|
console.log('This is a comment; the line is ignored.')
|
||||||
rl.close()
|
rl.close()
|
||||||
@ -35,10 +30,10 @@ function startCLI() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (answer.toLowerCase() === 'yes') {
|
if (answer.toLowerCase() === 'yes') {
|
||||||
config.athenaShieldActivated = true
|
config.extraFileVerifActivated = true
|
||||||
|
|
||||||
rl.question('Would you like to activate debug mode? (yes/no): ', (debugAnswer) => {
|
rl.question('Would you like to activate debug mode? (yes/no): ', (debugAnswer) => {
|
||||||
config.debug = debugAnswer.toLowerCase() === 'yes' // Set debug to true or false
|
config.debug = debugAnswer.toLowerCase() === 'yes'
|
||||||
|
|
||||||
rl.question('Would you like to hide or block the menu? (hide/block): ', (menuAnswer) => {
|
rl.question('Would you like to hide or block the menu? (hide/block): ', (menuAnswer) => {
|
||||||
if (menuAnswer.trim().startsWith('//')) {
|
if (menuAnswer.trim().startsWith('//')) {
|
||||||
@ -48,29 +43,27 @@ function startCLI() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (menuAnswer.toLowerCase() === 'hide') {
|
if (menuAnswer.toLowerCase() === 'hide') {
|
||||||
config.menuVisibility = 'hidden' // Set to 'hidden'
|
config.menuVisibility = 'hidden'
|
||||||
console.log('Athena\'s Shield activated. Menu hidden.')
|
console.log('Extra file verification activated. Menu hidden.')
|
||||||
} else if (menuAnswer.toLowerCase() === 'block') {
|
} else if (menuAnswer.toLowerCase() === 'block') {
|
||||||
config.menuVisibility = 'blocked' // Set to 'blocked'
|
config.menuVisibility = 'blocked'
|
||||||
console.log('Athena\'s Shield activated. Menu blocked.')
|
console.log('Extra file verification activated. Menu blocked.')
|
||||||
} else {
|
} else {
|
||||||
console.log('Invalid option for the menu.')
|
console.log('Invalid option for the menu.')
|
||||||
rl.close()
|
rl.close()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save the modified configuration
|
|
||||||
saveConfig(config)
|
saveConfig(config)
|
||||||
rl.close()
|
rl.close()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else if (answer.toLowerCase() === 'no') {
|
} else if (answer.toLowerCase() === 'no') {
|
||||||
console.log('Athena\'s Shield not activated. Closing the CLI.')
|
console.log('Extra file verification not activated. Closing the CLI.')
|
||||||
config.athenaShieldActivated = false
|
config.extraFileVerifActivated = false
|
||||||
config.menuVisibility = 'visible' // Reset to default
|
config.menuVisibility = 'visible'
|
||||||
config.debug = 'false'
|
config.debug = false
|
||||||
|
|
||||||
// Save the modified configuration
|
|
||||||
saveConfig(config)
|
saveConfig(config)
|
||||||
rl.close()
|
rl.close()
|
||||||
} else {
|
} else {
|
||||||
@ -80,5 +73,4 @@ function startCLI() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// Launch the CLI
|
|
||||||
startCLI()
|
startCLI()
|
30
app/assets/extraverif/parserExtraverif.js
Normal file
30
app/assets/extraverif/parserExtraverif.js
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
const fs = require('fs')
|
||||||
|
const path = require('path')
|
||||||
|
|
||||||
|
const configPath = path.join(__dirname, 'variables.json')
|
||||||
|
|
||||||
|
class ExtraFileVerification {
|
||||||
|
constructor() {
|
||||||
|
this.config = this.loadConfig()
|
||||||
|
}
|
||||||
|
|
||||||
|
loadConfig() {
|
||||||
|
const rawData = fs.readFileSync(configPath)
|
||||||
|
return JSON.parse(rawData.toString())
|
||||||
|
}
|
||||||
|
|
||||||
|
get status() {
|
||||||
|
return this.config.extraFileVerifActivated
|
||||||
|
}
|
||||||
|
|
||||||
|
get type() {
|
||||||
|
return this.config.menuVisibility
|
||||||
|
}
|
||||||
|
|
||||||
|
get debug() {
|
||||||
|
return this.config.debug
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const ExtraFileVerificationInstance = new ExtraFileVerification()
|
||||||
|
module.exports = ExtraFileVerificationInstance
|
6
app/assets/extraverif/variables.json
Normal file
6
app/assets/extraverif/variables.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"extraFileVerifActivated": false,
|
||||||
|
"menuVisibility": "visible",
|
||||||
|
"debug": false
|
||||||
|
|
||||||
|
}
|
@ -437,36 +437,6 @@ async function downloadJava(effectiveJavaOptions, launchAfter = true) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @Name dlAsync Function
|
|
||||||
* @returns {Promise<void>}
|
|
||||||
*
|
|
||||||
* @author Sandro642
|
|
||||||
* @Cheating Athena's Shield
|
|
||||||
*
|
|
||||||
* @Added whitelist for mods
|
|
||||||
* @Added support for the new HeliosLauncher version
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Reviewed on 10.26.2024 expires on XX.XX.2025
|
|
||||||
* @Bugs discovereds: 0
|
|
||||||
* @Athena's Shield
|
|
||||||
* @Sandro642
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
// ▄▄▄ ▄▄▄█████▓ ██░ ██ ▓█████ ███▄ █ ▄▄▄ ██████ ██████ ██░ ██ ██▓▓█████ ██▓ ▓█████▄
|
|
||||||
// ▒████▄ ▓ ██▒ ▓▒▓██░ ██▒▓█ ▀ ██ ▀█ █ ▒████▄ ▒██ ▒ ▒██ ▒ ▓██░ ██▒▓██▒▓█ ▀ ▓██▒ ▒██▀ ██▌
|
|
||||||
// ▒██ ▀█▄ ▒ ▓██░ ▒░▒██▀▀██░▒███ ▓██ ▀█ ██▒▒██ ▀█▄ ░ ▓██▄ ░ ▓██▄ ▒██▀▀██░▒██▒▒███ ▒██░ ░██ █▌
|
|
||||||
// ░██▄▄▄▄██░ ▓██▓ ░ ░▓█ ░██ ▒▓█ ▄ ▓██▒ ▐▌██▒░██▄▄▄▄██ ▒ ██▒ ▒ ██▒░▓█ ░██ ░██░▒▓█ ▄ ▒██░ ░▓█▄ ▌
|
|
||||||
// ▓█ ▓██▒ ▒██▒ ░ ░▓█▒░██▓░▒████▒▒██░ ▓██░ ▓█ ▓██▒▒██████▒▒ ▒██████▒▒░▓█▒░██▓░██░░▒████▒░██████▒░▒████▓
|
|
||||||
// ▒▒ ▓▒█░ ▒ ░░ ▒ ░░▒░▒░░ ▒░ ░░ ▒░ ▒ ▒ ▒▒ ▓▒█░▒ ▒▓▒ ▒ ░ ▒ ▒▓▒ ▒ ░ ▒ ░░▒░▒░▓ ░░ ▒░ ░░ ▒░▓ ░ ▒▒▓ ▒
|
|
||||||
// ▒ ▒▒ ░ ░ ▒ ░▒░ ░ ░ ░ ░░ ░░ ░ ▒░ ▒ ▒▒ ░░ ░▒ ░ ░ ░ ░▒ ░ ░ ▒ ░▒░ ░ ▒ ░ ░ ░ ░░ ░ ▒ ░ ░ ▒ ▒
|
|
||||||
// ░ ▒ ░ ░ ░░ ░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░░ ░ ▒ ░ ░ ░ ░ ░ ░ ░
|
|
||||||
// ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
|
|
||||||
// ░
|
|
||||||
|
|
||||||
// Keep reference to Minecraft Process
|
// Keep reference to Minecraft Process
|
||||||
let proc
|
let proc
|
||||||
// Is DiscordRPC enabled
|
// Is DiscordRPC enabled
|
||||||
@ -487,7 +457,7 @@ async function dlAsync(login = true) {
|
|||||||
// launching the game.
|
// launching the game.
|
||||||
|
|
||||||
const loggerLaunchSuite = LoggerUtil.getLogger('LaunchSuite')
|
const loggerLaunchSuite = LoggerUtil.getLogger('LaunchSuite')
|
||||||
const loggerLanding = LoggerUtil.getLogger('Landing')
|
const loggerLanding = LoggerUtil.getLogger('dlAsync')
|
||||||
setLaunchDetails(Lang.queryJS('landing.dlAsync.loadingServerInfo'))
|
setLaunchDetails(Lang.queryJS('landing.dlAsync.loadingServerInfo'))
|
||||||
|
|
||||||
let distro
|
let distro
|
||||||
@ -512,8 +482,8 @@ async function dlAsync(login = true) {
|
|||||||
|
|
||||||
// --------- Mod Verification Logic ---------
|
// --------- Mod Verification Logic ---------
|
||||||
|
|
||||||
if (athShield.status) {
|
if (extraFileVerif.status) {
|
||||||
loggerLanding.info(Lang.queryJS('landing.dlAsync.AthShield.usingAthShield'))
|
loggerLanding.info(Lang.queryJS('landing.dlAsync.extraFileVerif.usingExtraFileVerif'))
|
||||||
|
|
||||||
const modsDir = path.join(ConfigManager.getDataDirectory(), 'instances', serv.rawServer.id, 'mods')
|
const modsDir = path.join(ConfigManager.getDataDirectory(), 'instances', serv.rawServer.id, 'mods')
|
||||||
|
|
||||||
@ -530,8 +500,8 @@ async function dlAsync(login = true) {
|
|||||||
if (mdl.rawModule.name.endsWith('.jar')) {
|
if (mdl.rawModule.name.endsWith('.jar')) {
|
||||||
const modPath = path.join(modsDir, mdl.rawModule.name)
|
const modPath = path.join(modsDir, mdl.rawModule.name)
|
||||||
const modIdentity = mdl.rawModule.identity || mdl.rawModule.artifact.MD5
|
const modIdentity = mdl.rawModule.identity || mdl.rawModule.artifact.MD5
|
||||||
if (athShield.debug) {
|
if (extraFileVerif.debug) {
|
||||||
loggerLanding.info(Lang.queryJS('landing.dlAsync.AthShield.distributionIdentityError', {
|
loggerLanding.info(Lang.queryJS('landing.dlAsync.extraFileVerif.distributionIdentityError', {
|
||||||
'moduleName': mdl.rawModule.name,
|
'moduleName': mdl.rawModule.name,
|
||||||
'moduleIdentity': modIdentity
|
'moduleIdentity': modIdentity
|
||||||
}))
|
}))
|
||||||
@ -543,17 +513,16 @@ async function dlAsync(login = true) {
|
|||||||
|
|
||||||
// Function to extract mod identity from the jar file
|
// Function to extract mod identity from the jar file
|
||||||
const extractModIdentity = (filePath) => {
|
const extractModIdentity = (filePath) => {
|
||||||
if (athShield.debug) {
|
if (extraFileVerif.debug) {
|
||||||
loggerLanding.info(Lang.queryJS('landing.dlAsync.AthShield.modIdentityExtraction', {'filePath': filePath}))
|
loggerLanding.info(Lang.queryJS('landing.dlAsync.extraFileVerif.modIdentityExtraction', {'filePath': filePath}))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fall back to a hash if no identity is found
|
|
||||||
const fileBuffer = fs.readFileSync(filePath)
|
const fileBuffer = fs.readFileSync(filePath)
|
||||||
const hashSum = crypto.createHash('md5') // Use MD5 to match the distribution configuration
|
const hashSum = crypto.createHash('md5') // Use MD5 to match the distribution configuration
|
||||||
hashSum.update(fileBuffer)
|
hashSum.update(fileBuffer)
|
||||||
const hash = hashSum.digest('hex')
|
const hash = hashSum.digest('hex')
|
||||||
if (athShield.debug) {
|
if (extraFileVerif.debug) {
|
||||||
loggerLanding.info(Lang.queryJS('landing.dlAsync.AthShield.identityNotFoundUsingHash', {
|
loggerLanding.info(Lang.queryJS('landing.dlAsync.extraFileVerif.identityNotFoundUsingHash', {
|
||||||
'filePath': filePath,
|
'filePath': filePath,
|
||||||
'hash': hash
|
'hash': hash
|
||||||
}))
|
}))
|
||||||
@ -564,7 +533,7 @@ async function dlAsync(login = true) {
|
|||||||
|
|
||||||
// Validate mods function
|
// Validate mods function
|
||||||
const validateMods = () => {
|
const validateMods = () => {
|
||||||
loggerLanding.info(Lang.queryJS('landing.dlAsync.AthShield.startingModValidation'))
|
loggerLanding.info(Lang.queryJS('landing.dlAsync.extraFileVerif.startingModValidation'))
|
||||||
const installedMods = fs.readdirSync(modsDir)
|
const installedMods = fs.readdirSync(modsDir)
|
||||||
let valid = true
|
let valid = true
|
||||||
|
|
||||||
@ -573,17 +542,17 @@ async function dlAsync(login = true) {
|
|||||||
|
|
||||||
// Skip validation for mods in the excluded list
|
// Skip validation for mods in the excluded list
|
||||||
if (EXCLUDED_MODS.includes(mod)) {
|
if (EXCLUDED_MODS.includes(mod)) {
|
||||||
loggerLanding.info(Lang.queryJS('landing.dlAsync.AthShield.modValidationBypassed', {'mod': mod}))
|
loggerLanding.info(Lang.queryJS('landing.dlAsync.extraFileVerif.modValidationBypassed', {'mod': mod}))
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
const expectedIdentity = distroMods[modPath]
|
const expectedIdentity = distroMods[modPath]
|
||||||
loggerLanding.info(Lang.queryJS('landing.dlAsync.AthShield.validatingMod', {'mod': mod}))
|
loggerLanding.info(Lang.queryJS('landing.dlAsync.extraFileVerif.validatingMod', {'mod': mod}))
|
||||||
|
|
||||||
if (expectedIdentity) {
|
if (expectedIdentity) {
|
||||||
const modIdentity = extractModIdentity(modPath)
|
const modIdentity = extractModIdentity(modPath)
|
||||||
if (athShield.debug) {
|
if (extraFileVerif.debug) {
|
||||||
loggerLanding.info(Lang.queryJS('landing.dlAsync.AthShield.expectedAndCalculatedIdentity', {
|
loggerLanding.info(Lang.queryJS('landing.dlAsync.extraFileVerif.expectedAndCalculatedIdentity', {
|
||||||
'expectedIdentity': expectedIdentity,
|
'expectedIdentity': expectedIdentity,
|
||||||
'mod': mod,
|
'mod': mod,
|
||||||
'modIdentity': modIdentity
|
'modIdentity': modIdentity
|
||||||
@ -591,8 +560,8 @@ async function dlAsync(login = true) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (modIdentity !== expectedIdentity) {
|
if (modIdentity !== expectedIdentity) {
|
||||||
if (athShield.debug) {
|
if (extraFileVerif.debug) {
|
||||||
loggerLanding.error(Lang.queryJS('landing.dlAsync.AthShield.modIdentityMismatchError', {
|
loggerLanding.error(Lang.queryJS('landing.dlAsync.extraFileVerif.modIdentityMismatchError', {
|
||||||
'mod': mod,
|
'mod': mod,
|
||||||
'expectedIdentity': expectedIdentity,
|
'expectedIdentity': expectedIdentity,
|
||||||
'modIdentity': modIdentity
|
'modIdentity': modIdentity
|
||||||
@ -603,26 +572,26 @@ async function dlAsync(login = true) {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
loggerLanding.warn(Lang.queryJS('landing.dlAsync.AthShield.expectedIdentityNotFound', {'mod': mod}))
|
loggerLanding.warn(Lang.queryJS('landing.dlAsync.extraFileVerif.expectedIdentityNotFound', {'mod': mod}))
|
||||||
valid = false
|
valid = false
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
loggerLanding.info(Lang.queryJS('landing.dlAsync.AthShield.modValidationCompleted'))
|
loggerLanding.info(Lang.queryJS('landing.dlAsync.extraFileVerif.modValidationCompleted'))
|
||||||
return valid
|
return valid
|
||||||
}
|
}
|
||||||
|
|
||||||
// Perform mod validation before proceeding
|
// Perform mod validation before proceeding
|
||||||
if (!validateMods()) {
|
if (!validateMods()) {
|
||||||
const errorMessage = Lang.queryJS('landing.dlAsync.AthShield.invalidModsDetectedMessage', {'folder': ConfigManager.getNameDataPath()})
|
const errorMessage = Lang.queryJS('landing.dlAsync.extraFileVerif.invalidModsDetectedMessage', {'folder': ConfigManager.getNameDataPath()})
|
||||||
loggerLanding.error(errorMessage)
|
loggerLanding.error(errorMessage)
|
||||||
showLaunchFailure(errorMessage, null)
|
showLaunchFailure(errorMessage, null)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
loggerLanding.info(Lang.queryJS('landing.dlAsync.AthShield.notUsingAthShield'))
|
loggerLanding.info(Lang.queryJS('landing.dlAsync.extraFileVerif.notUsingExtraFileVerif'))
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------- End of Mod Verification Logic ---------
|
// --------- End of Mod Verification Logic ---------
|
||||||
@ -681,7 +650,7 @@ async function dlAsync(login = true) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
loggerLaunchSuite.info(Lang.queryJS('landing.dlAsync.AthShield.downloadingFiles'))
|
loggerLaunchSuite.info(Lang.queryJS('landing.dlAsync.notUsingExtraFileVerif.downloadingFiles'))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove download bar.
|
// Remove download bar.
|
||||||
|
@ -3,7 +3,7 @@ const os = require('os')
|
|||||||
const semver = require('semver')
|
const semver = require('semver')
|
||||||
|
|
||||||
const DropinModUtil = require('./assets/js/dropinmodutil')
|
const DropinModUtil = require('./assets/js/dropinmodutil')
|
||||||
const athShield = require('./assets/athshield/parserAthShield')
|
const extraFileVerif = require('./assets/extraverif/parserExtraverif')
|
||||||
const { MSFT_OPCODE, MSFT_REPLY_TYPE, MSFT_ERROR } = require('./assets/js/ipcconstants')
|
const { MSFT_OPCODE, MSFT_REPLY_TYPE, MSFT_ERROR } = require('./assets/js/ipcconstants')
|
||||||
|
|
||||||
const settingsState = {
|
const settingsState = {
|
||||||
@ -722,10 +722,10 @@ function manageModCategory() {
|
|||||||
const modsButton = document.querySelector('button[rSc="settingsTabMods"]')
|
const modsButton = document.querySelector('button[rSc="settingsTabMods"]')
|
||||||
const dropInMods = document.getElementById('settingsDropinModsContainer')
|
const dropInMods = document.getElementById('settingsDropinModsContainer')
|
||||||
|
|
||||||
if (athShield.type === 'hidden') {
|
if (extraFileVerif.type === 'hidden') {
|
||||||
// Hide the Mods navigation button
|
// Hide the Mods navigation button
|
||||||
modsButton.style.display = 'none'
|
modsButton.style.display = 'none'
|
||||||
} else if (athShield.type === 'blocked') {
|
} else if (extraFileVerif.type === 'blocked') {
|
||||||
// Hide the drop-in mods elements
|
// Hide the drop-in mods elements
|
||||||
dropInMods.style.display = 'none'
|
dropInMods.style.display = 'none'
|
||||||
}
|
}
|
||||||
|
@ -215,7 +215,7 @@ gameExited = "Game process exited with code {code}."
|
|||||||
gameErrorDuringLaunch = "Error during game launch {error}."
|
gameErrorDuringLaunch = "Error during game launch {error}."
|
||||||
waintingLaunchingGame = "Waiting for game window..."
|
waintingLaunchingGame = "Waiting for game window..."
|
||||||
|
|
||||||
[js.landing.dlAsync.AthShield]
|
[js.landing.dlAsync.extraFileVerif]
|
||||||
distributionIdentityError = "Expected Identity from Distribution for {moduleName}: {moduleIdentity}."
|
distributionIdentityError = "Expected Identity from Distribution for {moduleName}: {moduleIdentity}."
|
||||||
modIdentityExtraction = "Extracting identity for mod at: {filePath}."
|
modIdentityExtraction = "Extracting identity for mod at: {filePath}."
|
||||||
identityNotFoundUsingHash = "No identity found in manifest for {filePath}, using hash: {hash}"
|
identityNotFoundUsingHash = "No identity found in manifest for {filePath}, using hash: {hash}"
|
||||||
@ -226,10 +226,10 @@ expectedAndCalculatedIdentity = "Expected Identity: {expectedIdentity}, Calculat
|
|||||||
modIdentityMismatchError = "Mod identity mismatch! Mod: {mod}, Expected: {expectedIdentity}, Found: {modIdentity}"
|
modIdentityMismatchError = "Mod identity mismatch! Mod: {mod}, Expected: {expectedIdentity}, Found: {modIdentity}"
|
||||||
expectedIdentityNotFound = "No expected identity found for mod: {mod}. Marking as invalid."
|
expectedIdentityNotFound = "No expected identity found for mod: {mod}. Marking as invalid."
|
||||||
modValidationCompleted = "Mod validation completed."
|
modValidationCompleted = "Mod validation completed."
|
||||||
invalidModsDetectedMessage = "Athena's Shield has detected invalid mods. Please delete the {folder} folder and restart the launcher."
|
invalidModsDetectedMessage = "Extra file verification has detected invalid mods. Please delete the {folder} folder and restart the launcher."
|
||||||
downloadingFiles = "No invalid files, skipping download."
|
downloadingFiles = "No invalid files, skipping download."
|
||||||
usingAthShield = "Athena's Shield activated, Resource usage..."
|
usingExtraFileVerif = "Extra file verification activated, Resource usage..."
|
||||||
notUsingAthShield = "Athena's Shield deactivated, Not using resources..."
|
notUsingExtraFileVerif = "Extra file verification deactivated, Not using resources..."
|
||||||
|
|
||||||
[js.landing.news]
|
[js.landing.news]
|
||||||
checking = "Checking for News"
|
checking = "Checking for News"
|
||||||
|
Binary file not shown.
@ -1,16 +1,16 @@
|
|||||||
**Documentation: Athena's Shield for HeliosLauncher**
|
**Documentation: ExtraFileVerification for HeliosLauncher**
|
||||||
|
|
||||||
### Introduction
|
### Introduction
|
||||||
HeliosLauncher is a game launcher for Minecraft developed by Daniel Scalzi, designed to provide a secure and optimized gaming experience. To maintain game integrity and prevent unauthorized or altered mods, I have implemented a new security system called Athena's Shield.
|
HeliosLauncher is a game launcher for Minecraft developed by Daniel Scalzi, designed to provide a secure and optimized gaming experience. To maintain game integrity and prevent unauthorized or altered mods, I have implemented a new security system called ExtraFileVerification.
|
||||||
|
|
||||||
### Purpose of Athena's Shield
|
### Purpose of ExtraFileVerification
|
||||||
The main purpose of Athena's Shield is to ensure that only authorized and verified mods are used with HeliosLauncher. This system checks the integrity of installed mods to prevent any modifications or additions of malicious or unapproved mods.
|
The main purpose of ExtraFileVerification is to ensure that only authorized and verified mods are used with HeliosLauncher. This system checks the integrity of installed mods to prevent any modifications or additions of malicious or unapproved mods.
|
||||||
|
|
||||||
### Key Features
|
### Key Features
|
||||||
|
|
||||||
**Installed Mod Validation:**
|
**Installed Mod Validation:**
|
||||||
|
|
||||||
- Before launching the game, Athena's Shield verifies the mods present in the HeliosLauncher mods folder.
|
- Before launching the game, ExtraFileVerification verifies the mods present in the HeliosLauncher mods folder.
|
||||||
- Each mod is validated by comparing its name and hash (digital fingerprint) with expected data in the distribution.
|
- Each mod is validated by comparing its name and hash (digital fingerprint) with expected data in the distribution.
|
||||||
- If a mod does not meet validation criteria, game launch is stopped, and an error message is displayed.
|
- If a mod does not meet validation criteria, game launch is stopped, and an error message is displayed.
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ The main purpose of Athena's Shield is to ensure that only authorized and verifi
|
|||||||
|
|
||||||
**Modification Management:**
|
**Modification Management:**
|
||||||
|
|
||||||
- Athena's Shield also verifies changes to mods. For instance, if a mod is deleted, replaced, or renamed, it will be detected.
|
- ExtraFileVerification also verifies changes to mods. For instance, if a mod is deleted, replaced, or renamed, it will be detected.
|
||||||
- Hash verification ensures that mods have not been altered since their initial download.
|
- Hash verification ensures that mods have not been altered since their initial download.
|
||||||
|
|
||||||
**Error Messages and Instructions:**
|
**Error Messages and Instructions:**
|
||||||
@ -31,18 +31,18 @@ The main purpose of Athena's Shield is to ensure that only authorized and verifi
|
|||||||
|
|
||||||
### User Benefits
|
### User Benefits
|
||||||
|
|
||||||
- **Enhanced Security:** By preventing unauthorized mods and verifying integrity, Athena's Shield protects users from malicious mods.
|
- **Enhanced Security:** By preventing unauthorized mods and verifying integrity, ExtraFileVerification protects users from malicious mods.
|
||||||
- **Reliable Gaming Experience:** Ensures that only tested and validated mods are used, guaranteeing a stable and trouble-free gaming experience.
|
- **Reliable Gaming Experience:** Ensures that only tested and validated mods are used, guaranteeing a stable and trouble-free gaming experience.
|
||||||
- **Ease of Use:** Users are guided with clear messages and instructions to help resolve any potential conflicts, simplifying problem-solving.
|
- **Ease of Use:** Users are guided with clear messages and instructions to help resolve any potential conflicts, simplifying problem-solving.
|
||||||
|
|
||||||
### Conclusion
|
### Conclusion
|
||||||
Athena's Shield is a significant step toward enhancing the security and integrity of HeliosLauncher. With this integration, I ensure that every Minecraft user enjoys a safe and reliable gaming experience, without compromising on quality or security.
|
ExtraFileVerification is a significant step toward enhancing the security and integrity of HeliosLauncher. With this integration, I ensure that every Minecraft user enjoys a safe and reliable gaming experience, without compromising on quality or security.
|
||||||
|
|
||||||
If you have any questions or need further clarification about Athena's Shield, feel free to contact me.
|
If you have any questions or need further clarification about ExtraFileVerification, feel free to contact me.
|
||||||
|
|
||||||
**The only way to bypass Athena's Shield would be through advanced cryptography knowledge, involving signature copying or hash modification.**
|
**The only way to bypass ExtraFileVerification would be through advanced cryptography knowledge, involving signature copying or hash modification.**
|
||||||
|
|
||||||
The creation and verification of Athena's Shield are currently complete, though additional improvements may be made in the future, as with any project.
|
The creation and verification of ExtraFileVerification are currently complete, though additional improvements may be made in the future, as with any project.
|
||||||
|
|
||||||
Respectfully,
|
Respectfully,
|
||||||
**SORIA Sandro (Sandro642)**
|
**SORIA Sandro (Sandro642)**
|
@ -18,7 +18,7 @@
|
|||||||
"dist:mac": "npm run dist -- -m",
|
"dist:mac": "npm run dist -- -m",
|
||||||
"dist:linux": "npm run dist -- -l",
|
"dist:linux": "npm run dist -- -l",
|
||||||
"lint": "eslint --config .eslintrc.json .",
|
"lint": "eslint --config .eslintrc.json .",
|
||||||
"athshield": "node app/assets/athshield/athshield.js"
|
"extraverif": "node app/assets/extraverif/extraverif.js"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "20.x.x"
|
"node": "20.x.x"
|
||||||
@ -26,7 +26,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@electron/remote": "^2.1.2",
|
"@electron/remote": "^2.1.2",
|
||||||
"adm-zip": "^0.5.16",
|
"adm-zip": "^0.5.16",
|
||||||
"crypto": "^1.0.1",
|
|
||||||
"discord-rpc-patch": "^4.0.1",
|
"discord-rpc-patch": "^4.0.1",
|
||||||
"ejs": "^3.1.10",
|
"ejs": "^3.1.10",
|
||||||
"ejs-electron": "^3.0.0",
|
"ejs-electron": "^3.0.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user