C# Класс PeNet.PeFile

This class represents a Portable Executable (PE) file and makes the different header and properties accessible.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Buff byte[]

Открытые методы

Метод Описание
GetCrlUrlList ( ) : CrlUrlList

Get an object which holds information about the Certificate Revocation Lists of the signing certificate if any is present.

GetFileType ( ) : string

Returns if the PE file is a EXE, DLL and which architecture is used (32/64). Architectures: "I386", "AMD64", "UNKNOWN" DllOrExe: "DLL", "EXE", "UNKNOWN"

Is32BitPeFile ( string file ) : bool

Returns if the file is a PE file and 32 Bit.

Is64BitPeFile ( string file ) : bool

Returns if the file is a PE file and 64 Bit.

IsPEFile ( string file ) : bool

Tests is a file is a PE file based on the MZ header. It is not checked if the PE file is correct in all other parts.

IsValidCertChain ( bool online ) : bool

Checks if cert is from a trusted CA with a valid certificate chain.

IsValidPEFile ( string file ) : bool

Tries to parse the PE file and checks all directories.

PeFile ( byte buff ) : System

Create a new PeFile object.

PeFile ( string peFile ) : System

Create a new PeFile object.

ToString ( ) : string

Creates a string representation of the objects properties.

Описание методов

GetCrlUrlList() публичный Метод

Get an object which holds information about the Certificate Revocation Lists of the signing certificate if any is present.
public GetCrlUrlList ( ) : CrlUrlList
Результат CrlUrlList

GetFileType() публичный Метод

Returns if the PE file is a EXE, DLL and which architecture is used (32/64). Architectures: "I386", "AMD64", "UNKNOWN" DllOrExe: "DLL", "EXE", "UNKNOWN"
public GetFileType ( ) : string
Результат string

Is32BitPeFile() публичный статический Метод

Returns if the file is a PE file and 32 Bit.
public static Is32BitPeFile ( string file ) : bool
file string Path to a possible PE file.
Результат bool

Is64BitPeFile() публичный статический Метод

Returns if the file is a PE file and 64 Bit.
public static Is64BitPeFile ( string file ) : bool
file string Path to a possible PE file.
Результат bool

IsPEFile() публичный статический Метод

Tests is a file is a PE file based on the MZ header. It is not checked if the PE file is correct in all other parts.
public static IsPEFile ( string file ) : bool
file string Path to a possible PE file.
Результат bool

IsValidCertChain() публичный Метод

Checks if cert is from a trusted CA with a valid certificate chain.
public IsValidCertChain ( bool online ) : bool
online bool Check certificate chain online or off-line.
Результат bool

IsValidPEFile() публичный статический Метод

Tries to parse the PE file and checks all directories.
public static IsValidPEFile ( string file ) : bool
file string Path to a possible PE file.
Результат bool

PeFile() публичный Метод

Create a new PeFile object.
public PeFile ( byte buff ) : System
buff byte A PE file a byte array.
Результат System

PeFile() публичный Метод

Create a new PeFile object.
public PeFile ( string peFile ) : System
peFile string Path to a PE file.
Результат System

ToString() публичный Метод

Creates a string representation of the objects properties.
public ToString ( ) : string
Результат string

Описание свойств

Buff публичное свойство

The PE binary as a byte array.
public byte[] Buff
Результат byte[]