Advertisement
BaSs_HaXoR

GSC Injector + Packed GSC [Source]

Feb 2nd, 2015
1,432
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.57 KB | None | 0 0
  1. # @Original Post: http://pastebin.com/2VgUAVgk        
  2. ####################################################################################################
  3. public static byte[] Bytes;
  4.         public static int ByteLength;
  5.         public static int MALLOC = 0x10050000;
  6.  
  7.         private void button1_Click(object sender, EventArgs e)
  8.         {
  9.             var file = new OpenFileDialog { Filter = "GSC File|*.gsc" };
  10.             uint offset = InjectTolocation(textBox1.Text);
  11.             if (file.ShowDialog() == DialogResult.OK)
  12.             {
  13.                 string fileName = file.FileName;
  14.                 try
  15.                 {
  16.                     Bytes = System.IO.File.ReadAllBytes(fileName);
  17.                     ByteLength = Bytes.Length;
  18.                 }
  19.                 catch (System.IO.IOException)
  20.                 {
  21.                     this.Close();
  22.                 }
  23.             }
  24.             int WriteOffset = SpacetoInject();
  25.             PS3.SetMemory((uint)WriteOffset, Bytes);
  26.             PS3.Extensions.WriteInt32(offset + 8, WriteOffset);
  27.             MessageBox.Show("GSC Injected");
  28.         }
  29.  
  30.         public static uint InjectTolocation(string location)
  31.         {
  32.             RPC.Call(0x18ac04, new object[] { 0x10040000, 0x33, location, 1, -1 });
  33.             return PS3.Extensions.ReadUInt32(0x10040000);
  34.         }
  35.  
  36.         public static int SpacetoInject()
  37.         {
  38.             return (MALLOC = (MALLOC + ByteLength) + 100);
  39.         }
  40.  
  41.  
  42. /*/-----------------------------------------------------------------------
  43. Convert your .gsc to .BIN then drop it in to resources in your vs project
  44.  
  45. Then This to Inject it.
  46. Code:
  47. private void metroButton1_Click(object sender, EventArgs e)
  48.         {
  49.             uint num = InjectTolocation("maps/mp/gametypes/_clientids.gsc");
  50.             try
  51.             {
  52.                 Bytes = Resources._clientids;
  53.                 ByteLength = Bytes.Length;
  54.             }
  55.             catch
  56.             {
  57.             }
  58.             int input = SpacetoInject();
  59.             PS3.SetMemory((uint) input, Bytes);
  60.             WriteInt32(num + 8, input);
  61.            
  62.         }
  63. -----------------------------------------------------------------------/*/
  64. ####################################################################################################
  65. /*
  66. @Credits: http://www.nextgenupdate.com/forums/call-duty-black-ops-2-gsc-mods-scripts/786110-tut-how-pack-gsc-your-very-own-injector.html
  67. Kiwi_Modz
  68. */
  69. ####################################################################################################
  70. //BaSs_HaXoR
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement