C# Class PeNet.PeFile

This class represents a Portable Executable (PE) file and makes the different header and properties accessible.
Afficher le fichier Open project: secana/PeNet Class Usage Examples

Méthodes publiques

Свойство Type Description
Buff byte[]

Méthodes publiques

Méthode Description
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.

Method Details

GetCrlUrlList() public méthode

Get an object which holds information about the Certificate Revocation Lists of the signing certificate if any is present.
public GetCrlUrlList ( ) : CrlUrlList
Résultat CrlUrlList

GetFileType() public méthode

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
Résultat string

Is32BitPeFile() public static méthode

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.
Résultat bool

Is64BitPeFile() public static méthode

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.
Résultat bool

IsPEFile() public static méthode

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.
Résultat bool

IsValidCertChain() public méthode

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.
Résultat bool

IsValidPEFile() public static méthode

Tries to parse the PE file and checks all directories.
public static IsValidPEFile ( string file ) : bool
file string Path to a possible PE file.
Résultat bool

PeFile() public méthode

Create a new PeFile object.
public PeFile ( byte buff ) : System
buff byte A PE file a byte array.
Résultat System

PeFile() public méthode

Create a new PeFile object.
public PeFile ( string peFile ) : System
peFile string Path to a PE file.
Résultat System

ToString() public méthode

Creates a string representation of the objects properties.
public ToString ( ) : string
Résultat string

Property Details

Buff public_oe property

The PE binary as a byte array.
public byte[] Buff
Résultat byte[]