Register for your free account! | Forgot your password?

Go Back   elitepvpers > Shooter > WarRock > WarRock Guides, Tutorials & Modifications
You last visited: Today at 06:52

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



WarRock Item script (seriously working) - Nexon 13.03.2013 - Flcdparser.exe source

Discussion on WarRock Item script (seriously working) - Nexon 13.03.2013 - Flcdparser.exe source within the WarRock Guides, Tutorials & Modifications forum part of the WarRock category.

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2011
Posts: 4
Received Thanks: 0
Smile WarRock Item script (seriously working) - Nexon 13.03.2013 - Flcdparser.exe source

Flcdparser.exe

this is the code use in:
WarRock Item script (seriously working) - Nexon 13.03.2013 - YouTube


hahaha help me fix the code

this is C#

here.s the error

Code:
Error	1	The type or namespace name 'FileCodeListDocument' could not be found (are you missing a using directive or an assembly reference?)	C:\Users\Yuri\documents\visual studio 2010\Projects\param1\param1\Program.cs	47	17	param1
Error	2	The type or namespace name 'FileCodeListDocument' could not be found (are you missing a using directive or an assembly reference?)	C:\Users\Yuri\documents\visual studio 2010\Projects\param1\param1\Program.cs	47	54	param1
Just post your Fixed Code ok

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
namespace fcldParser
{
    class Program
    {
        /*
Header:
    File Format (4 bytes, usually: "FCLD") / File Version (4 bytes, eg. 0x00F51300) / Hex [CD CC 8C 3F] / File Count (4 bytes, eg. 0x71C6 // big endian)
 
File Entry:
    Filename Length (int) / File Name / Hex [00 00] / Unknown Data (6 bytes) / Hex [01] / Unknown Data (8 bytes, long?) / Hex [00]
        */
 
        /*[StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Explicit, CharSet = CharSet.Ansi)]
        public struct FCLDEntry
        {
            [MarshalAs(UnmanagedType.I8, SizeConst=6), FieldOffset(2)]
            public long Version;
            [FieldOffset(8)]
            public int HeaderChecksum;
            [FieldOffset(12)]
            public int FileCount;
        }*/
 
        static string bytesToString(byte[] mInput)
        {
            string mReturn = string.Empty;
            for (int iIndex = 0; iIndex < mInput.Length; iIndex++)
                mReturn += mInput[iIndex].ToString("X2").ToString() + " ";
            return mReturn.Substring(0, mReturn.Length - 1);
        }
 
        static void Main(string[] args)
        {
            //string mFileName = Console.ReadLine();
            string mBasePath = @"D:\Downloads\G1 Client\";
            mBasePath = @"C:\Users\Felix\Documents\WarRock\Warrock EU\";
            string mFileName = mBasePath + @"data\Global.FCL";
            if (System.IO.File.Exists(mFileName))
            {
                FileCodeListDocument iDocument = new FileCodeListDocument(mFileName);
                Console.WriteLine("Parsing document...");
                iDocument.parseDocument();
                Console.WriteLine("Document parsed");
                Console.WriteLine("Now exporting readable data...");
                string mMassiveContent = "== FileCodeListDocument Header\r\n";
                mMassiveContent += iDocument.Header.Format + "/" + iDocument.Header.Version.ToString() + " [CHKSM " + iDocument.Header.HeaderChecksum.ToString("X2") + "]\r\n";
                mMassiveContent += "Total Entrys: " + iDocument.Header.FileCount.ToString() + "\r\n\r\n\r\n";
                int mCount = 0;
                var iList = new List<string>(); // polynom meet list
                var jList = new List<uint>();
                var kList = new List<uint>();
                var lList = new List<uint>();
                byte mThreads = 0;
                foreach(FCLDEntry iEntry in iDocument.Entrys)
                {
                    /*if (!iEntry.FileName.Contains("ITEMS.BIN"))
                        continue;*/
                    /*if (iEntry.FileSize < 1024)
                        continue;
                    if (iEntry.FileSize > 131072)
                        continue;*/
                    if (!System.IO.File.Exists(mBasePath + iEntry.FileName))
                        continue;
                    /*if (kList.Contains(iEntry.FileSize))
                        continue;
                    kList.Add(iEntry.FileSize);*/
                    //Console.WriteLine("File Scan [" + iEntry.FileName + "]");
                    mMassiveContent += "File: " + iEntry.FileName + "\r\n";
                    mMassiveContent += "Size: " + iEntry.FileSize + " (" + iEntry.FileSize.ToString("X2") + ") bytes\r\n";
                    mMassiveContent += "UBDump: " + bytesToString(iEntry.UnknownBytes) + "\r\n";
                    mMassiveContent += "Checksum: " + iEntry.FileChecksum.ToString("X2").PadLeft(8, '0') + "\r\n";
                    byte[] iFileBytes = System.IO.File.ReadAllBytes(mBasePath + iEntry.FileName);
                    uint mChecksum = Crc32.Compute(iFileBytes);
                    mMassiveContent += "RealChecksum: " + mChecksum.ToString("X2").PadLeft(8, '0') + "\r\n";
                    mMassiveContent += "Checksum XOR: " + (iEntry.FileChecksum ^ mChecksum).ToString("X2").PadLeft(8, '0') + "\r\n\r\n";
 
                    //var iThread = new System.Threading.Thread(new System.Threading.ThreadStart(() =>
                    //{
 
                    //Console.WriteLine("Collision Scan...");
                    //uint iChecksum = iEntry.FileChecksum ^ (BitConverter.ToUInt32(new byte[4] { iIndex, iIndex, iIndex, iIndex }, 0));
                    var iAction = new Action<uint, byte, bool>((uint mPoly, byte polyMethod, bool doReverse) =>
                        {
                            string mLog = "Trying Match @" + iEntry.FileName + " - [mPoly:" + mPoly.ToString("X2") + " / polyMethod:" + polyMethod.ToString() + " / revesed: " + doReverse.ToString() + "]\r\n";
                            byte[] baChecksum = BitConverter.GetBytes(iEntry.FileChecksum);
                            if(doReverse)
                                Array.Reverse(baChecksum);
                            uint iChecksum = BitConverter.ToUInt32(baChecksum, 0) ^ mPoly;
                            if (mChecksum == iChecksum)
                            {
                                //Console.WriteLine("i like meat");
                                if (jList.Contains(mPoly))
                                {
                                    mLog += "+ iChecksum:" + iChecksum.ToString("X2") + " / mPoly:" + mPoly.ToString("X2") + " / fileSize:" + iEntry.FileSize.ToString("X2") + " / fileChecksum:" + iEntry.FileChecksum.ToString("X2") + " / polyMethod:" + polyMethod.ToString() + "\r\n";
                                    Console.WriteLine(mLog);
                                    //Console.WriteLine(mLog);
                                    if (lList.Contains(mPoly))
                                    {
                                        Console.WriteLine("MATCHED KEY!!!");
                                        Console.ReadLine();
                                    }
                                    else
                                        lList.Add(iChecksum);
                                    iList.Add(mLog);
                                }
                                else
                                    jList.Add(mPoly);
                            }
                        });
                    var kAction = new Action<uint, byte, bool>((uint mPoly, byte polyMethod, bool doReverse) =>
                    {
                        for (byte iIndex = 0; iIndex < 32; iIndex++)
                        {
                            iAction((mPoly << iIndex) | (mPoly >> (32 - iIndex)), polyMethod, doReverse); // bit rotate
                        }
                    });
                    var jAction = new Action<bool>((bool mReverse) =>
                    {
                        for (byte cIndex = 0; cIndex < 3; cIndex++)
                        {
                            uint tukBytes = BitConverter.ToUInt32(iEntry.UnknownBytes, cIndex);
                            kAction(tukBytes, 0, mReverse);
                            kAction(tukBytes ^ (uint)iDocument.Header.HeaderChecksum, 1, mReverse);
                            kAction(tukBytes ^ mChecksum, 2, mReverse);
                            kAction(tukBytes ^ mChecksum ^ (uint)iDocument.Header.HeaderChecksum, 3, mReverse);
                            kAction(tukBytes ^ mChecksum ^ iEntry.FileChecksum, 4, mReverse);
                            kAction(tukBytes ^ mChecksum ^ iEntry.FileChecksum ^ (uint)iDocument.Header.HeaderChecksum, 5, mReverse);
                            kAction(tukBytes ^ iEntry.FileSize, 6, mReverse);
                            kAction(tukBytes ^ iEntry.FileSize ^ (uint)iDocument.Header.HeaderChecksum, 7, mReverse);
                            kAction(tukBytes ^ iEntry.FileSize ^ mChecksum, 8, mReverse);
                            kAction(tukBytes ^ iEntry.FileSize ^ mChecksum ^ (uint)iDocument.Header.HeaderChecksum, 9, mReverse);
                            kAction(tukBytes ^ iEntry.FileSize ^ iEntry.FileChecksum, 10, mReverse);
                            kAction(tukBytes ^ iEntry.FileSize ^ iEntry.FileChecksum ^ (uint)iDocument.Header.HeaderChecksum, 11, mReverse);
                            kAction(tukBytes ^ iEntry.FileSize ^ iEntry.FileChecksum ^ mChecksum, 12, mReverse);
                            kAction(tukBytes ^ iEntry.FileSize ^ iEntry.FileChecksum ^ mChecksum ^ (uint)iDocument.Header.HeaderChecksum, 13, mReverse);
                           
                            kAction(tukBytes ^ 0xffffffff, 14, mReverse);
                            kAction(tukBytes ^ (uint)iDocument.Header.HeaderChecksum ^ 0xffffffff, 15, mReverse);
                            kAction(tukBytes ^ mChecksum ^ 0xffffffff, 16, mReverse);
                            kAction(tukBytes ^ mChecksum ^ (uint)iDocument.Header.HeaderChecksum ^ 0xffffffff, 17, mReverse);
                            kAction(tukBytes ^ mChecksum ^ iEntry.FileChecksum ^ 0xffffffff, 18, mReverse);
                            kAction(tukBytes ^ mChecksum ^ iEntry.FileChecksum ^ (uint)iDocument.Header.HeaderChecksum ^ 0xffffffff, 19, mReverse);
                            kAction(tukBytes ^ iEntry.FileSize ^ 0xffffffff, 20, mReverse);
                            kAction(tukBytes ^ iEntry.FileSize ^ (uint)iDocument.Header.HeaderChecksum ^ 0xffffffff, 21, mReverse);
                            kAction(tukBytes ^ iEntry.FileSize ^ mChecksum ^ 0xffffffff, 22, mReverse);
                            kAction(tukBytes ^ iEntry.FileSize ^ mChecksum ^ (uint)iDocument.Header.HeaderChecksum ^ 0xffffffff, 23, mReverse);
                            kAction(tukBytes ^ iEntry.FileSize ^ iEntry.FileChecksum ^ 0xffffffff, 24, mReverse);
                            kAction(tukBytes ^ iEntry.FileSize ^ iEntry.FileChecksum ^ (uint)iDocument.Header.HeaderChecksum ^ 0xffffffff, 25, mReverse);
                            kAction(tukBytes ^ iEntry.FileSize ^ iEntry.FileChecksum ^ mChecksum ^ 0xffffffff, 26, mReverse);
                            kAction(tukBytes ^ iEntry.FileSize ^ iEntry.FileChecksum ^ mChecksum ^ (uint)iDocument.Header.HeaderChecksum ^ 0xffffffff, 27, mReverse);
                            //(uint)iDocument.Header.HeaderChecksum
                        }
 
                        kAction(mChecksum, 28, mReverse);
                        //kAction(mChecksum ^ iEntry.FileChecksum, 29, mReverse);
                        kAction(iEntry.FileSize, 30, mReverse);
                        kAction(iEntry.FileSize ^ mChecksum, 31, mReverse);
                        kAction(iEntry.FileSize ^ iEntry.FileChecksum, 32, mReverse);
                        kAction(iEntry.FileSize ^ iEntry.FileChecksum ^ mChecksum, 33, mReverse);
                       
                        //kAction(iEntry.FileChecksum ^ mChecksum, 34, mReverse);
                       
                        kAction(iEntry.FileSize, 35, mReverse);
                        kAction(iEntry.FileSize ^ mChecksum, 36, mReverse);
                        kAction(mChecksum, 37, mReverse);
                       
                        kAction(mChecksum ^ 0xffffffff, 38, mReverse);
                        kAction(mChecksum ^ iEntry.FileChecksum ^ 0xffffffff, 39, mReverse);
                        kAction(iEntry.FileSize ^ 0xffffffff, 40, mReverse);
                        kAction(iEntry.FileSize ^ mChecksum ^ 0xffffffff, 41, mReverse);
                        kAction(iEntry.FileSize ^ iEntry.FileChecksum ^ 0xffffffff, 42, mReverse);
                        kAction(iEntry.FileSize ^ iEntry.FileChecksum ^ mChecksum ^ 0xffffffff, 43, mReverse);
                       
                        kAction(iEntry.FileChecksum ^ mChecksum ^ 0xffffffff, 44, mReverse);
                       
                        kAction(iEntry.FileSize ^ 0xffffffff, 45, mReverse);
                        kAction(iEntry.FileSize ^ mChecksum ^ 0xffffffff, 46, mReverse);
                        kAction(mChecksum ^ 0xffffffff, 47, mReverse);
                    });
 
                    jAction(true);
                    jAction(false);
 
                    /*for (uint iIndex = 0x0; iIndex < 0xffffffff; iIndex++)
                    {
                        iAction(iIndex, 7, false);
                        if(iIndex % 0xFFFFFF == 0)
                            Console.Write(".");
                    }
                    Console.WriteLine("Finished OP1");
                    mThreads++;
                    //Console.WriteLine("Scan aborted");
                    //}));
                    //iThread.Start();*/
 
                    mCount++;
                    if (mCount >= 3500)
                        break;
                    if (mCount % 100 == 0)
                        Console.Write(".");
                }
 
                //while (mThreads != 10)
                //System.Threading.Thread.Sleep(500);
                mMassiveContent += "\r\n\r\n\r\n\r\n== Polynomial Collisions\r\n\r\n";
                foreach (string cEntry in iList)
                {
                    mMassiveContent += cEntry + "\r\n";
                    //Console.WriteLine(cEntry);
                }
                Console.WriteLine("Saving file [" + mCount.ToString() + "]...");
                if (System.IO.File.Exists(@"C:\Users\Felix\Desktop\data.dat"))
                    System.IO.File.Delete(@"C:\Users\Felix\Desktop\data.dat");
                System.IO.File.WriteAllText(@"C:\Users\Felix\Desktop\data.dat", mMassiveContent);
                Console.WriteLine("Trying to find correct CRC32Polynom. ...");
 
            }
            else
                Console.WriteLine("File not Found");
            Console.ReadLine();
        }
    }
}
windowsxp925 is offline  
Old 03/23/2013, 22:18   #2
 
blackeagle321's Avatar
 
elite*gold: 34
Join Date: Jan 2009
Posts: 2,383
Received Thanks: 577
...? explain smthg
blackeagle321 is offline  
Old 03/23/2013, 22:45   #3

 
elite*gold: 0
Join Date: Mar 2012
Posts: 3,514
Received Thanks: 1,023
Quote:
Originally Posted by blackeagle321 View Post
...? explain smthg
Er sucht eine Lösung für seine Fehler im Code.
-
closerquest.
Faultyclones is offline  
Old 03/24/2013, 13:16   #4

 
xxfabbelxx's Avatar
 
elite*gold: 900
Join Date: Apr 2009
Posts: 14,976
Received Thanks: 11,388
you'll find help here:
xxfabbelxx is offline  
Closed Thread


Similar Threads Similar Threads
[Source][PHP] WarRock Private Server Files [Working with Nexon]
07/25/2013 - WarRock - 100 Replies
Hallo. Ich Release hier die PHP Privat Server Files von Supreme. Der Server ist sehr weit und funktioniert auch mit Nexon. Download: Click me Virustotal: Click me



All times are GMT +2. The time now is 06:52.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.