[JX] Share source code VBNet - Unpack file Pak jx1, jx2, kiếm thế, phong thần 3 b
Hello & Welcome to our community. Is this your first visit? Đăng Ký
Follow us on
Follow us on Facebook Follow us on Twitter Linked In Flickr Watch us on YouTube My Space Blogger
 
Kết quả 1 đến 1 của 1
  1. #1
    Thành Viên GameDev24's Avatar
    Ngày tham gia
    Jan 2024
    Bài viết
    9
    Thanks
    3
    Thanked 6 Times in 4 Posts

    Icon10 Share source code VBNet - Unpack file Pak jx1, jx2, kiếm thế, phong thần 3 b

    Như tiêu đề đây là code unpack được file trong pak. Còn muốn biết nó file gì thì cần dev thêm
    Code:
    'https://www.clbgamesvn.com/diendan/showthread.php?t=314825
    Imports System
    Imports System.Collections
    Imports System.IO
    Imports System.IO.Compression
    Imports System.Runtime
    Imports System.Text
    Imports System.Text.RegularExpressions
    
    
    Module Program
    
        Public br As BinaryReader
        Public input As String
        Sub Main(args As String())
            If args.Count = 0 Then
                Console.WriteLine("Tool UnPack - 2CongLC.vn :: 2024")
            Else
                input = args(0)
            End If
            Dim p As String = Nothing
            If IO.File.Exists(input) Then
    
                br = New BinaryReader(File.OpenRead(input))
                Dim signature As String = New String(br.ReadChars(4)) ' Offset = 0, Length = 4
                Dim count As Int32 = br.ReadInt32 ' Offset = 4, Length = 4
                Dim index As Int32 = br.ReadInt32 ' Offset = 8, Length = 4
                Dim data As Int32 = br.ReadInt32 ' Offset = 12, Length = 4
                Dim crc32 As Int32 = br.ReadInt32 ' Offset = 16, Length = 4
                Dim reserved As Byte() = br.ReadBytes(12) 'Offset = 20, Length = 12
    
                Console.WriteLine("sig : {0}", signature)
                Console.WriteLine("count : {0}", count)
                Console.WriteLine("index : {0}", index)
                Console.WriteLine("data : {0}", data)
                Console.WriteLine("crc32 : {0}", crc32)
    
                br.BaseStream.Seek(index, SeekOrigin.Begin) 'br.BaseStream.Position = index
                Dim subfiles As New List(Of FileData)()
                For i As Int32 = 0 To count - 1
                    subfiles.Add(New FileData)
                Next
    
                p = Path.GetDirectoryName(input) & "\" & Path.GetFileNameWithoutExtension(input)
                Directory.CreateDirectory(p)
    
                For Each fd As FileData In subfiles
                    Console.WriteLine("File ID : {0} - File Offset : {1} - File Size : {2} - IsCompress : {3}", fd.id, fd.offset, fd.size, fd.isCompress)
    
                    br.BaseStream.Position = fd.offset
    
                    Using bw As New BinaryWriter(File.Create(p & "//" & fd.id))
                        bw.Write(br.ReadBytes(fd.size))
                    End Using
                Next
    
                Console.WriteLine("unpack done!!!")
            End If
            Console.ReadLine()
        End Sub
    
        Class FileData
            Public id As Int64 'Length = 4
            Public offset As Int32 'Length = 4
            Public size As Int32 'Length = 4
            Public compressed As Byte() 'Length = 3
            Public isCompress As Byte 'Length = 1     
            Public Sub New()
                id = br.ReadInt32
                offset = br.ReadInt32
                size = br.ReadInt32
                compressed = br.ReadBytes(3)
                isCompress = br.ReadByte
            End Sub
        End Class
    
    
        Public Function Hash(ByVal fileName As String) As UInt64
            Dim id As UInt64 = 0
            Dim index As Int32 = 0
            For Each c As Char In fileName
                If (AscW(c) >= AscW("A")) AndAlso (AscW(c) <= AscW("Z")) Then
                    id = (id + (++index) * (AscW(c) + AscW("a") - AscW("A"))) Mod &H8000000BUI * &HFFFFFFEF
                Else
                    id = (id + (++index) * AscW(c)) Mod &H8000000BUI * &HFFFFFFEF
                End If
            Next
            Return (id Xor &H12345678)
        End Function
    
    End Module
    Khách viếng thăm hãy cùng GameDev24 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  2. Các thành viên gởi lời cảm ơn đến GameDev24 vì bài viết này !

    SaoThaiBinh72 (06-06-24)

 

 

Các Chủ đề tương tự

  1. Trả lời: 1
    Bài viết cuối: 06-06-24, 12:38 PM
  2. [JX] Share Tool Unpack Pak Jx2
    Bởi phuhieu92 trong diễn đàn Releases
    Trả lời: 2
    Bài viết cuối: 06-07-20, 01:37 AM
  3. Chia sẻ lại các tool mã hóa giải mã các webgame cũ được code = VBNet
    Bởi MrChuCong trong diễn đàn CHUYÊN ĐỀ WEB GAMES
    Trả lời: 2
    Bài viết cuối: 15-05-20, 11:48 PM
  4. Share All File .txt Unpack File .pak ( Settings , Skill , Ui )
    Bởi ohishu trong diễn đàn Võ Lâm Truyền Kỳ (Jx Server)
    Trả lời: 18
    Bài viết cuối: 06-05-13, 12:54 AM
  5. UNPACK dữ liệu spr.pak hay image.pak = thủ công
    Bởi Čħīċķėň trong diễn đàn Guides - Kho Lưu trữ
    Trả lời: 21
    Bài viết cuối: 23-10-10, 09:27 PM

Quyền viết bài

  • Bạn Không thể gửi Chủ đề mới
  • Bạn Không thể Gửi trả lời
  • Bạn Không thể Gửi file đính kèm
  • Bạn Không thể Sửa bài viết của mình
  •  
Múi giờ GMT +7. Bây giờ là 09:39 AM.
vBulletin®, Copyright ©2000-2011, Jelsoft Enterprises Ltd.
CLBGamesVN không chịu trách nhiệm về Luật Bản Quyền của các tài liệu, bài viết v.v...được đăng tải trên diễn đàn này.
Diễn đàn phát triển dưới sự đóng góp của tất cả thành viên. BQT chỉ là những người thành lập ra sân chơi, quản lý và duy trì về mặt kỹ thuật, nội dung khi hợp lệ.