You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main.rs
+95-5Lines changed: 95 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,9 @@ use std::path::PathBuf;
6
6
7
7
use clap::{ArgAction,Parser,Subcommand};
8
8
use indicatif::ProgressIterator;
9
-
use pelite::{pe32, pe64,Wrap};
9
+
use pelite::image::{IMAGE_DATA_DIRECTORY,IMAGE_DIRECTORY_ENTRY_BASERELOC,IMAGE_DIRECTORY_ENTRY_DEBUG,IMAGE_DIRECTORY_ENTRY_EXPORT,IMAGE_DIRECTORY_ENTRY_IMPORT,IMAGE_DIRECTORY_ENTRY_TLS,IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE,IMAGE_DLLCHARACTERISTICS_GUARD_CF,IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA,IMAGE_DLLCHARACTERISTICS_NO_SEH,IMAGE_DLLCHARACTERISTICS_NX_COMPAT};
10
+
use pelite::pe::Pe;
11
+
use pelite::{pe32, pe64,FileMap,Wrap};
10
12
11
13
mod process;
12
14
@@ -27,7 +29,25 @@ struct Args {
27
29
28
30
#[derive(Debug,Subcommand)]
29
31
enumCommands{
30
-
32
+
/// Print image info.
33
+
Info{
34
+
/// Path to the image you want to enable/disable ASLR for.
35
+
#[arg(short, long)]
36
+
image:PathBuf,
37
+
},
38
+
/// Set the ASLR bit on the specified image.
39
+
SetAslr{
40
+
/// Path to the image you want to enable/disable ASLR for.
0 commit comments