Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.IO;
- using System.Net;
- using System.Web;
- using System.Windows.Forms;
- using System.Threading;
- using System.Diagnostics;
- namespace _1._12__BIN_SELF_Builder
- {
- class Program
- {
- public static bool isDefault;
- public static bool isViewingFiles;
- public static bool fileLoaded;
- public static FileFunctions.BigEndianWriter bw = new FileFunctions.BigEndianWriter(new MemoryStream(File.ReadAllBytes(Directory.GetCurrentDirectory() + "/default_mp.elf")));
- //public static FileStream stream = File.Open(Directory.GetCurrentDirectory() + "/default_mp.elf", FileMode.Open);
- static void Main(string[] args)
- {
- Console.Title = "BIN/SELF Builder CoD Ghosts";
- setDefault();
- runProcess();
- }
- public static void setDefault()
- {
- isDefault = true;
- isViewingFiles = false;
- Console.Clear();
- // string filePath = stream.Name;
- // string getExtension = Path.GetExtension(filePath);
- Console.WriteLine("Welcome: " + System.Environment.MachineName + " " + "To Ghosts BIN/SELF File Builder");
- Console.WriteLine("");
- Console.WriteLine("-----Modifications-------------Important--------------------File-Infos----------");
- Console.WriteLine("|wallhack |load.....loads .elf file |File Name: ");
- Console.WriteLine("|steadyaim |self.....builds .self |File Size: ");
- Console.WriteLine("|redboxes |bin......builds .bin |Last Edited: ");
- Console.WriteLine("|norecoil |bles.....builds for BLES |File Type: ");
- Console.WriteLine("|chromeplayers |blus.....builds for BLUS |File Path: ");
- Console.WriteLine("");
- Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- }
- public static void ThreadProc()
- {
- }
- public static void runProcess()
- {
- string command = Console.ReadLine().ToLower();
- if (command == "load")
- {
- viewFileScreen();
- }
- if (command == "wallhack")
- {
- applyWallhack();
- }
- if(command == "bin")
- {
- buildDebugBin();
- }
- }
- public static void applyWallhack()
- {
- Thread.Sleep(200);
- setDefault();
- int myMod = 0x38C000;
- bw.BaseStream.Position = 0x00169850;
- bw.Write(myMod);
- bw.Close();
- Thread.Sleep(200);
- setDefault();
- Console.ReadLine();
- }
- public static void buildDebugBin()
- {
- Thread.Sleep(200);
- setDefault();
- if (File.Exists("DebugBIN.bat"))
- {
- System.Threading.Thread loading = new System.Threading.Thread(new System.Threading.ThreadStart(ThreadProc));
- Process pro = new Process();
- pro.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
- pro.StartInfo.FileName = "DebugBIN.bat";
- pro.Start();
- Console.WriteLine("Your Modified .BIN has been built");
- }
- else
- {
- Console.WriteLine("You need to make sure you have the batch file !");
- }
- Thread.Sleep(200);
- setDefault();
- Console.ReadLine();
- }
- public static void viewFileScreen()
- {
- isViewingFiles = true;
- isDefault = false;
- Console.Clear();
- System.Threading.Thread.Sleep(100);
- Console.WriteLine("");
- Console.WriteLine(" List of ELF Files in Current Directory:");
- Console.WriteLine("");
- Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- string[] filePaths = Directory.GetFiles(Directory.GetCurrentDirectory(), "*.elf");
- for (int i = 0; i < filePaths.Length; ++i)
- {
- string path = filePaths[i];
- Console.WriteLine(" " + i.ToString() + ". " + System.IO.Path.GetFileName(path));
- }
- Console.WriteLine("");
- Console.WriteLine(" Enter File Number to Load into Program:");
- Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- for (int i = 0; i < filePaths.Length; ++i)
- {
- string path = filePaths[i];
- string fileNum = Console.ReadLine().ToLower();
- if (fileNum == i.ToString())
- {
- FileStream load = File.Open(path, FileMode.Open);
- setDefault();
- Console.WriteLine("File Successfully Loaded, Ready To add modifications");
- fileLoaded = true;
- System.Threading.Thread.Sleep(1555);
- setDefault();
- // fileName = path;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement