[elektro] MPLAB 8 új Device felvétele

Andras kyrk.5.dpg.hu at freemail.hu
Thu Jan 7 00:37:41 CET 2021


Helló,

marhára idegesített, hogy a régi MPLAB 8-as néhány új PIC32-est nem kezel. Holott nekem csak annyi kellene, hogy ki lehessen választani a legördülő listából és tudjak fordítani meg makefile-t exportálni. Debuggolni nem is kellene.

Addig hergeltem magam, amig sikerült megtalálnom, hogy hol tárolja azt a filét amiben a lista van, hogy mit kezel. Egy DLL tolti be neki a filet (MPDevice.dll). Ez a ket file lesz az: masterdb.mcc masterdb_procid.mcc 

Persze kodolva van. De gHydraval belenezve a beltolto DLL-be miutan megtalaltam hol olvassa es irja ki dekodolva a filet kierult, hogy siman XOR-olva van csak. Innentol mar csak egy lepes volt irni egy XOR-olo meg De-XORolo programot (last a level vegen). Copy pastelem benne par sort es lass csodat. MPLAB 8-ban megjelen az uj opcio. Kivalasztom es fordit is. A forditonak ugye tenyleg csak annyi kell, hogy melyik proci. Az osszes tobbi sallang amit meg beallit ott az most nekem nem fontos. Majd megnezem, ha a debugger kezeli, lehet arra is ra lehetne venni, az MPLAB 8-ast hogy debuggolja.






using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {//De-Xor
                byte[] fileReadIn = File.ReadAllBytes("masterdb.mcc");
                byte[] fileWriteOut = fileReadIn;
                //string xorValue = "Sometimes, he would accuse chestnuts of being lazy, the kind of generalmalaise that only the genius possess and the insane lament.MMMM";
                string xorValue = "Sometimes, he would accuse chestnuts of being lazy, the kind of general malaise that only the genius possess and the insane lament.";
                byte[] xorValueByte = Encoding.ASCII.GetBytes(xorValue);
                int y = 0;
                int len = xorValue.Length;

                for (int x = 0; x < fileReadIn.Length; x++)
                {
                    fileWriteOut[x] = (byte)(fileReadIn[x] ^ xorValueByte[y]);
                    y++;
                    if (y >= len)
                    {
                        y = 0;
                    }
                }
                File.WriteAllBytes("masterdb.mcc.txt", fileWriteOut);
            }
            catch { }
            try
            {//De-Xor
                byte[] fileReadIn = File.ReadAllBytes("masterdb_procid.mcc");
                byte[] fileWriteOut = fileReadIn;
                //string xorValue = "Sometimes, he would accuse chestnuts of being lazy, the kind of generalmalaise that only the genius possess and the insane lament.MMMM";
                string xorValue = "Sometimes, he would accuse chestnuts of being lazy, the kind of general malaise that only the genius possess and the insane lament.";
                byte[] xorValueByte = Encoding.ASCII.GetBytes(xorValue);
                int y = 0;
                int len = xorValue.Length;

                for (int x = 0; x < fileReadIn.Length; x++)
                {
                    fileWriteOut[x] = (byte)(fileReadIn[x] ^ xorValueByte[y]);
                    y++;
                    if (y >= len)
                    {
                        y = 0;
                    }
                }
                File.WriteAllBytes("masterdb_procid.mcc.txt", fileWriteOut);
            }
            catch { }
            try
            {//En-Xor
                byte[] fileReadIn = File.ReadAllBytes("masterdb.mcc.txt_new");
                byte[] fileWriteOut = fileReadIn;
                //string xorValue = "Sometimes, he would accuse chestnuts of being lazy, the kind of generalmalaise that only the genius possess and the insane lament.MMMM";
                string xorValue = "Sometimes, he would accuse chestnuts of being lazy, the kind of general malaise that only the genius possess and the insane lament.";
                byte[] xorValueByte = Encoding.ASCII.GetBytes(xorValue);
                int y = 0;
                int len = xorValue.Length;

                for (int x = 0; x < fileReadIn.Length; x++)
                {
                    fileWriteOut[x] = (byte)(fileReadIn[x] ^ xorValueByte[y]);
                    y++;
                    if (y >= len)
                    {
                        y = 0;
                    }
                }
                File.WriteAllBytes("masterdb.mcc.txt_new.mcc", fileWriteOut);

            }
            catch { }
            
            try {//De-Xor
                byte[] fileReadIn = File.ReadAllBytes("masterdb_procid.mcc.txt_new");
                byte[] fileWriteOut = fileReadIn;
                //string xorValue = "Sometimes, he would accuse chestnuts of being lazy, the kind of generalmalaise that only the genius possess and the insane lament.MMMM";
                string xorValue = "Sometimes, he would accuse chestnuts of being lazy, the kind of general malaise that only the genius possess and the insane lament.";
                byte[] xorValueByte = Encoding.ASCII.GetBytes(xorValue);
                int y = 0;
                int len = xorValue.Length;

                for (int x = 0; x < fileReadIn.Length; x++)
                {
                    fileWriteOut[x] = (byte)(fileReadIn[x] ^ xorValueByte[y]);
                    y++;
                    if (y >= len)
                    {
                        y = 0;
                    }
                }
                File.WriteAllBytes("masterdb_procid.mcc.txt_new.mcc", fileWriteOut);
            }
            catch { }
        }

    }
}




More information about the Elektro mailing list