GithubHelp home page GithubHelp logo

lbpunion / unionpatcher Goto Github PK

View Code? Open in Web Editor NEW
25.0 25.0 13.0 950 KB

A tool for LittleBigPlanet that patches the server urls to a custom url.

License: GNU General Public License v3.0

C# 97.33% Shell 2.67%

unionpatcher's People

Contributors

505e06b2 avatar arcadius2006 avatar ashifter avatar beyley avatar daggintosh avatar jvyden avatar logantgt avatar slendy avatar zaprit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

unionpatcher's Issues

Lack of usage instructions or warnings

Use of this tool requires knowledge of decrypting SELF files, which are then scanned for text to be replaced. It is then up to the user to encrypt them again and place them onto their system. This doesn't seem to be very well conveyed. The instructions will differ for both of the PS3/PSV platforms and not likely be an entirely automatic process, so will both need written instructions

In the program, it may also be useful to:

  • Check the header for an ELF signature (file begins with the magic number of 0x7F, followed by ELF(45 4c 46))
    • It is probably worthwhile to assert the instruction set being ARM/PowerPC, appropriate endianess, and word size
  • Ensure at least 4(?) matching URLs have been found - non matching URLs should throw at least a warning

As soon as my PR: #6 is merged, I will be more than happy to help with this

Cheers

Add support for automatically patching LBP1 for RPCS3

Essentially the problem is that RPCS3 doesn't have some certain function implemented that LBP1 calls on boot, which crashes RPCS3. Personally I think this is more of an RPCS3 issue but if we are adding this I would like to have the patcher automatically check for the presence of this function call and remove it if present so we don't have an extra UI element to mess with (which makes things even more complicated in the context of UnionRemotePatcher).

HTTPS root certificate patch

To get HTTPS working with a custom gameserver, we need to patch the root certificate with our own, specifically the one used to sign the certificate used by the gameserver itself

I can't remember which of the games I pulled this out of, but this is one of them anyways, and it's in PEM format in the EBOOT as shown below

-----BEGIN CERTIFICATE-----
MIIDujCCAqKgAwIBAgIUAQAAAAAAAAAAAAAAAAAAAAAAAAAwDQYJKoZIhvcNAQEF
BQAwgZYxCzAJBgNVBAYTAlVTMQswCQYDVQ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rlrBCNoL34oHSz9Wd9JexamZ4JQkiU8ViIyRfaey9/qGZRdVv/sJkxFv4zqGk/t
iRmeyTsNzoS+i+Fk3qbajbJcAd3TesHckyWcODi46+jf4VZxqIZLNXRqvJmanw==
-----END CERTIFICATE-----

Incorporate fail0verflow's PS3 tools to decrypt/encrypt PS3 EBOOTs

Positives

  • Able to automate the entire patching process
  • Possibility of automating the entire process if the console were to enable an FTP server
  • Possibility of the user not needing to download any software (could be hosted as a web page and operated via the PS3)
  • More user-friendly

Negatives:

  • May be a legal concern, but the source code is available and was written from scratch as far as I know (GPL2)
  • Introducing unsafe code into the project
  • Assemblies would need to be compiled per-platform
  • May need to alter the original C source for better usability
  • Will not work for Vita

Thoughts?

Union Patcher and Ease of Use

Union Patcher in it's current state

Currently, in my opinion, Union Patcher is in a state where, yes, it can do it's job, however people who are less experienced may have more trouble with it, and some of the errors that it throws up can be confusing to a novice computer user. The goal of this issue is to try and suggest ways to make the application more user friendly to as many users as possible, especially with Public Beta rapidly approaching. Here's what I propose:

My proposal

Below is a checklist of things that I think can help improve the application and also make it easier for a more novice computer user who just wants to play LBP online again to use:

  • More clear and easy to understand error messages that don't fill the entire screen (Something like The patch could not be complete due to ... with an option to see the area where it went wrong in a dropdown menu, similar to some errors I've seen on Windows)
  • Adding an "Advanced Options" section that contains FTP Username/Password as well as things like the ability to change the working directory for Union Patcher in the event it tries to work in, say, System32
  • Guides on how to open the application for each OS in the README.md
  • Translation support for other languages (helps provide accessibility for people who don't speak English very well, if at all)
  • Having the Help button open a help/support page for Union Patcher instead of just going to lbpunion.com (once it exists)
  • Adding support for patching a Cross-Controller (and/or LBP1 for RPCS3) eboot by toggling a check box in File Patch
  • Having the Server URL field allow a choice between patching to Beacon or patching to a different URL (time saver, probably)

That's all I can think of currently. I feel like making the application more user friendly can help out not only more people with being able to connect to Beacon, but also any private server without too much hassle. Hopefully.
Of course, there are more things that can be done, like making a PS3/PS Vita homebrew application that can directly patch the eboot without having to use FTP at all (which eliminates some network-related errors), however that'll have to come at a later point in time.

...i should probably learn how to code

Patcher reports success without making changes to invalid file

UnionPatcher scans our EBOOT for the URLs we're trying to overwrite - this leads to a state where, if the original SCE URLs don't exist, the app will throw a success message even though no changes were made to the file.

#8 partially fixes this issue by checking for valid ELF headers, but we could improve this further by throwing another verbose error to notify the user of a problem with the input file (this file may be corrupt or has already been patched, please decrypt EBOOT again).

Build UnionPatcher as Class Library

By building UnionPatcher as an executable, it becomes more difficult to integrate its patching functionality into another tool such as UnionRemotePatcher. I think we should build UnionPatcher as a class library. If that weren't obvious enough.

Test resulting patched EBOOT in PS3HEN

UnionRemotePatcher seems to be capable of patching (and most importantly, signing) game EBOOTs for use on CFW such as EVILNAT 4,88.2, but it's essential to ensure compatibility across the board if we're going to get as many people as possible to connect.

The most basic requirements for running UnionRemotePatcher should be, in theory, a PS3 console with HEN and WebMan/MOD installed, and for a network copy, PS3MAPI enabled in WebMan's settings. We would appreciate it if you could test UnionRemotePatcher on HFW and let us know how it goes down in the comments on this issue.

Staging Folder

on MacOS, I'm being told to set a staging folder and that it has to be the same directory as the UnionPatcher app, however after selecting the same folder that it's in, it's still telling me that it's an invalid directory.

Custom URL field

There should be a way to patch an already patched eboot if you enter the ip address the eboot's patched to.

Input sanitization - check input paths and URL

It would be helpful to check if the user put the same path in for both the EBOOT.ELF input and output in the UI - of course, if this happens, best-case scenario, we successfully overwrite the input file with our patched output, and worst case scenario we're trying to write to a file that is opened for reading which is Not Ideal.

We should force the user to ensure that the output path is different than the input path so they can have a backup of their original EBOOT.ELF on hand.

UnionPatcher also doesn't care if the URL that we hand it is valid in any way - which obviously doesn't help us when we're trying to figure out why people can't connect. This is obviously problematic, we should ensure that all input is valid before we apply it to the EBOOT.ELF.

UnionPatcher - LittleBigPlanet 2 Black Screen

From the website 'https://www.lbpunion.com/post/how-to-patch-littlebigplanet-ps3-for-project-lighthouse/'

It states that BCES01086 [ LittleBigPlanet 2 (UK) ]is compatible, and using the remote patcher It will successfully patch. When you launch the game, It will immediately crash on a black screen.

I have a feeling this is a recent issue stemming from the latest firmware, 4.91 but I can't confirm it. BCES00141 [ LittleBigPlanet ] works flawlessly without issues.

For reference, I'm booting up from the original disc copy and using PS3Hen 3.3.0, via HFW 4.91.1. I have verified that my storage drive is free of errors also.

Any help would be appreciated,
Thank you,
CC

i get this error when patching for lbp3 on ps3

An error occured while patching:System.Net.WebException: Could not download fileatLBPUnion.UnionPatcher.Communication.FTP.DownloadFile(String source, String destination, String user, String pass) inC:\Users\daggi\Downloads\UnionPatcher\UnionPatcher\Communication\FTP.cs:line 117atLBPUnion.UnionPatcher.RemotePatch.DiscEBOOTRemotePatch(String ps3ip, String gameID, String serverURL, String user,String pass) inC:\Users\daggi\Downloads\UnionPatcher\UnionPatcher\RemotePatch.cs:line 213atLBPUnion.UnionPatcher.Gui.Forms.RemotePatchForm .< CreatePatchButton>b_7_0(Object , EventArgs ) inC:\Users\daggi\Downloads\UnionPatcher\UnionPatcher.Gui\Forms\RemotePatchForm.cs:line 63

Add patching to LBP1 for RPCS3

Issue
In order to make LittleBigPlanet 1 playable on RPCS3 you need to replace the following hex value 73 63 65 4E 70 43 6F 6D 6D 65 72 63 65 32 with 00 00 00 00 00 00 00 00 00 00 00 00 00 00 in the EBOOT.ELF file.
This is done to remove any of the references to the sceNpCommerce2 function which is used for DLC which at the same time causes a crash/freeze with the game on RPCS3.

To fix
Add a checbox for file patcher option in the tool to make the tool do this patch for you, so you don't have to use an additional tool like HxD or similar to patch your EBOOT.ELF file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.