File tree 5 files changed +34
-8
lines changed
5 files changed +34
-8
lines changed Original file line number Diff line number Diff line change 17
17
steps :
18
18
- uses : actions/checkout@v4
19
19
20
- - uses : dtolnay/rust-toolchain@nightly
20
+ - uses : dtolnay/rust-toolchain@stable
21
21
22
22
- run : cargo run --release
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " anonlink"
3
- version = " 0.1.2 "
3
+ version = " 0.1.3 "
4
4
authors = [" StackOverflowExcept1on" ]
5
5
edition = " 2021"
6
6
description = " Command line tool to automatically patch link.exe to remove Rich PE Header"
Original file line number Diff line number Diff line change @@ -12,3 +12,30 @@ version of compiler and number of C/C++ source files
12
12
13
13
For more advanced
14
14
users: [ The Undocumented Microsoft "Rich" Header] ( https://bytepointer.com/articles/the_microsoft_rich_header.htm )
15
+
16
+
17
+ ### Installing from [ crates.io] ( https://crates.io/crates/anonlink )
18
+
19
+ ``` bat
20
+ cargo install anonlink
21
+ ```
22
+
23
+ ### Building
24
+
25
+ ``` bat
26
+ cargo build --release
27
+ ```
28
+
29
+ ### Usage
30
+
31
+ ``` bat
32
+ :: run as administrator!
33
+ cargo run --release
34
+ ```
35
+
36
+ ```
37
+ linker path: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.41.34120\bin\Hostx64\x64\link.exe
38
+ Found call instruction at address 140051A96
39
+ Found add instruction at address 140051AAA
40
+ Patching bytes [03, CF] => [90, 90]
41
+ ```
Original file line number Diff line number Diff line change @@ -8,10 +8,11 @@ pub trait OutputExt: Sized {
8
8
impl OutputExt for Output {
9
9
#[ inline]
10
10
fn exit_result ( self ) -> io:: Result < Self > {
11
- self . status
12
- . exit_ok ( )
13
- . map_err ( |_| io:: Error :: from ( io:: ErrorKind :: InvalidInput ) ) ?;
14
- Ok ( self )
11
+ if self . status . success ( ) {
12
+ Ok ( self )
13
+ } else {
14
+ Err ( io:: Error :: from ( io:: ErrorKind :: InvalidInput ) )
15
+ }
15
16
}
16
17
}
17
18
Original file line number Diff line number Diff line change 1
- #![ feature( exit_status_error) ]
2
-
3
1
use iced_x86:: { Code , Decoder , DecoderOptions } ;
4
2
use pelite:: pe64:: { Pe , PeFile } ;
5
3
use std:: io:: { Read , Seek , Write } ;
You can’t perform that action at this time.
0 commit comments