From a260c5b70a6a81760e474edb4fcceb097960a18e Mon Sep 17 00:00:00 2001 From: huoxue1 <3343780376@qq.com> Date: Mon, 31 Jul 2023 18:55:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=B5=84=E6=BA=90=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/peparse_example.dart | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/example/peparse_example.dart b/example/peparse_example.dart index 199f1c5..0343464 100644 --- a/example/peparse_example.dart +++ b/example/peparse_example.dart @@ -1,29 +1,9 @@ - - - -import 'dart:io'; - import '../lib/peparse.dart'; void main() { const filepath = "D:\\software\\qq\\Bin\\QQ.exe"; - File file = File(filepath); - var data = ReaderSeeker(file.readAsBytesSync()); - var header = ImageDocHeader(data); - print(header.toString()); - data.seek(header.elfanew); - var nt = ImageNtHeaders32(data); - print(nt.toString()); - print(data.position); - var sections = []; - for (var i = 0; i < nt.fileHeader.numberOfSections; i++) { - sections.add(ImageSectionHeader(data)); - } - - for (var section in sections) { - print(section.toString()); - } - + var pe = PeFile.parseFile(filepath); + print(pe.toString()); }