Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // made by @ImShotZz
- using System;
- using System.IO;
- namespace CrossMapMaker
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("== CrossMapMaker [@ImShotZz] ==");
- string current_path = Directory.GetCurrentDirectory();
- string crossmap_path = current_path + "\\crossmap.txt";
- string crosstable_path = current_path + "\\crosstable.txt";
- string output_path = current_path + "\\new_crossmap.txt";
- Console.WriteLine("crossmap: [" + crossmap_path + "]");
- Console.WriteLine("crosstable: [" + crosstable_path + "]\n");
- if (File.Exists(output_path))
- {
- Console.WriteLine("[" + output_path + "] already exists!");
- Console.ReadKey();
- return;
- }
- TextWriter file = new StreamWriter(output_path);
- string[] crossmap = System.IO.File.ReadAllLines(crossmap_path);
- string[] crosstable = System.IO.File.ReadAllLines(crosstable_path);
- int hashes_fixed = 0;
- foreach(string original_map in crossmap)
- {
- string[] orginal_hash = original_map.Split('=');
- foreach(string new_map in crosstable)
- {
- string[] new_hash = new_map.Split('=');
- if(orginal_hash[1] == new_hash[0])
- {
- // match found
- string output = orginal_hash[0] + ", " + new_hash[1] + ",";
- file.WriteLine(output);
- hashes_fixed++;
- }
- }
- }
- Console.WriteLine("Fixed [" + hashes_fixed + "] hashes!\n");
- Console.WriteLine("Success! new crossmap is located at [" + output_path + "]");
- Console.ReadKey();
- file.Close();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement