Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions UtilityScripts/HomebrewStore/Main.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
scriptTitle = "Homebrew Store"
scriptAuthor = "Derf / Cheato"
scriptVersion = 4.0
scriptVersion = 5
scriptDescription = "Download homebrew from ConsoleMods.org and other repos!"
scriptIcon = "icon.png"
scriptPermissions = { "http", "sql", "filesystem" }
Expand Down Expand Up @@ -422,10 +422,11 @@ function HandleInstallation(selection, destinationPath, type)
-- Download files
local dlpath = "";
local successfulMove = false;
local tmpRandomString = math.random(1,100000000);
if string.match(dataurl, ".7z") then
dlpath = downloadsPath .. "tmp.7z";
dlpath = downloadsPath .. "tmp-" .. tmpRandomString .. ".7z";
else
dlpath = downloadsPath .. "tmp.bin";
dlpath = downloadsPath .. "tmp-" .. tmpRandomString .. ".bin";
end

Script.SetStatus("Downloading content (" .. current_part_index .. "/" .. total_parts .. ")...");
Expand Down Expand Up @@ -464,7 +465,7 @@ function HandleInstallation(selection, destinationPath, type)
Script.SetProgress(loadingProgress+7);
Script.SetStatus("Moving content (" .. current_part_index .. "/" .. total_parts .. ")...");
partFileName = string.match(dataurl, "^.*/([^/]+)$");
successfulMove = FileSystem.CopyFile(absoluteDownloadsPath .. "tmp.bin", destinationFullPath .. partFileName, true, CopyProgressRoutine);
successfulMove = FileSystem.CopyFile(absoluteDownloadsPath .. "tmp-" .. tmpRandomString .. ".bin", destinationFullPath .. partFileName, true, CopyProgressRoutine);
Script.SetProgress(loadingProgress+9);
end

Expand Down
21 changes: 20 additions & 1 deletion UtilityScripts/XefuSpoofer/Main.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
scriptTitle = "Xefu Spoofer"
scriptAuthor = "Derf"
scriptVersion = "4"
scriptVersion = "5"
scriptDescription = "Forces original Xbox games to use your selected xefu version. Compatibility list: ConsoleMods.org/fusion"
scriptIcon = "icon.png"
scriptPermissions = { "filesystem" }
Expand All @@ -13,6 +13,10 @@ xefubackup_folder = "Hddx:\\Compatibility\\XefuBackup\\";
function main()
print("-- " .. scriptTitle .. " Started...");

if ParentalControlIsSet() == true then
Script.ShowMessageBox("WARNING","Parental Controls are enabled on your console.\n\nThis will likely prevent original Xbox games from booting!\n\nTo remove Parental Controls, visit:\nhttps://consolemods.org/wiki/Parental_Lock","OK");
end

if init() == false then
goto scriptend;
end
Expand All @@ -23,6 +27,21 @@ function main()
::scriptend::
end

-- Thanks jrobiche for this function!
function ParentalControlIsSet()
-- Required Script Permissions: filesystem
-- Params: None
-- Returns:
-- true - if PC is set
-- false - if PC is not set
-- nil - if there was an issue loading the data containing PC information
local data=io.open("System:\\MobileB.dat", "rb"):read(67)
if data ~= nil then
return (string.byte(string.sub(data, 66, 67)) & 0x80) >> 7 == 1
end
return nil
end

function xefu_files_all_present(path)
if not (FileSystem.FileExists( path .. "xefu.xex" )
and FileSystem.FileExists( path .. "xefu2.xex" )
Expand Down