Hacking an Xbox360 LIVE/PIRS…
Jan.12, 2010 in
General
Ever want to take a downloaded demo/trial game and patch it to be the full version, heres how you do it… Keep in mind this is just some rough error checking, so you might want to catch errors a little differently.
Please note: You need an Xbox360 with an exploited kernel to run unsigned code. What you do with this code is not my responsibility.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | public string getTitle(string fileLocation) { try { using (StreamReader reader = new StreamReader(file)) { char[] buffer = new char[50]; reader.BaseStream.Position = 0x412L; reader.ReadBlock(buffer, 0, 50); int num = 0; foreach (char ch in buffer) { if (ch == '\0') { num++; if ((num >= 2) && (buffer[ch + '\x0001'] != ch)) { str = str + ch; num = 0; } } else { str = str + ch; num--; } } return str; } catch (Exception ex) { MessageBox.Show(String.Format("An error has occured. {0}{1}", Environment.NewLine, ex), "Unknown Error."); } } public bool isLIVEPIRS(string file) { bool isLIVEPirs = false; string type = String.Empy; using (StreamReader reader = new StreamReader(file)) { char[] buffer = new char[4]; reader.BaseStream.Position = 0L; reader.ReadBlock(buffer, 0, 4); string str = ""; foreach (char ch in buffer) { str = str + ch; } type = str; } if (type == "LIVE" || type == "PIRS") { isLIVEPirs = true; } return isLIVEPirs; } public void unlockArcade(String fileLocation) { try { if (isLIVEPIRS(fileLocation)) { DialogResult dr = MessageBox.Show( String.Format("Are you sure you would like to patch {0}?", getTitle), "Patch Notification", MessageBoxButtons.YesNo); if (dr == DialogResult.Yes) { using (FileStream stream = File.OpenWrite(file)) { stream.Seek(0x237L, SeekOrigin.Begin); stream.WriteByte(1); } } } else { MessageBox.Show("This is not the correct type of File.", "File Type Error."); } } catch (IOException err) { MessageBox.Show(String.Format("Error: {0}{1}", Environment.NewLine, err), "File Read/Write Error."); } } |
NOTE: If you would like to see an app that uses this method (where I got this code from, and I have made some edits) please see here: http://www.digitalreality.co.nz/xbox360/?p=48








