Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
asivery committed Nov 29, 2024
1 parent 09de6e5 commit bf90ef3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
19 changes: 10 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"jconv": "^0.1.5",
"jsbi": "^3.2.5",
"msgpackr": "^1.9.5",
"netmd-exploits": "^0.5.4",
"netmd-exploits": "^0.5.8",
"netmd-js": "^4.2.0",
"netmd-tocmanip": "^0.1.5",
"networkwm-js": "^0.1.0",
Expand Down
13 changes: 13 additions & 0 deletions src/wmd/original/services/interfaces/netmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ import {
CachedSectorControlDownload,
ConsoleLogger,
MonoSPUpload,
DisableDiscDetection,
} from 'netmd-exploits';
import netmdExploits from 'netmd-exploits';
import netmdTocmanip from 'netmd-tocmanip';
Expand Down Expand Up @@ -85,6 +86,7 @@ export enum ExploitCapability {
himdFullMode,
readRam,
uploadMonoSP,
disableDiscSwapDetection,
}

export type CodecFamily = 'SP' | 'MONO' | 'LP2' | 'LP4' | HiMDCodecName;
Expand Down Expand Up @@ -295,6 +297,7 @@ export interface NetMDFactoryService {

enableHiMDFullMode(): Promise<void>;
enableMonoUpload(enable: boolean): Promise<void>;
setDiscSwapDetection(enable: boolean): Promise<void>;
}

// Compatibility methods. Do NOT use these unless absolutely necessary!!
Expand Down Expand Up @@ -820,6 +823,7 @@ class NetMDFactoryUSBService implements NetMDFactoryService {
bind(SPUpload, ExploitCapability.uploadAtrac1);
bind(HiMDUSBClassOverride, ExploitCapability.himdFullMode);
bind(MonoSPUpload, ExploitCapability.uploadMonoSP);
bind(DisableDiscDetection, ExploitCapability.disableDiscSwapDetection);
if (!this.exploitStateManager.device.isHimd) {
// Non-HiMD devices can read the RAM using normal commands
capabilities.push(ExploitCapability.readRam);
Expand Down Expand Up @@ -996,4 +1000,13 @@ class NetMDFactoryUSBService implements NetMDFactoryService {
await this.exploitStateManager.unload(MonoSPUpload);
}
}

@asyncMutex
async setDiscSwapDetection(enable: boolean) {
if(enable){
await this.exploitStateManager.require(DisableDiscDetection);
} else {
await this.exploitStateManager.unload(DisableDiscDetection);
}
}
}

0 comments on commit bf90ef3

Please sign in to comment.