Skip to content

Commit 7db277b

Browse files
get rid of nightly features, update README
1 parent 907ebc0 commit 7db277b

File tree

5 files changed

+34
-8
lines changed

5 files changed

+34
-8
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@v4
1919

20-
- uses: dtolnay/rust-toolchain@nightly
20+
- uses: dtolnay/rust-toolchain@stable
2121

2222
- run: cargo run --release

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "anonlink"
3-
version = "0.1.2"
3+
version = "0.1.3"
44
authors = ["StackOverflowExcept1on"]
55
edition = "2021"
66
description = "Command line tool to automatically patch link.exe to remove Rich PE Header"

README.md

+27
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,30 @@ version of compiler and number of C/C++ source files
1212

1313
For more advanced
1414
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+
```

src/ext.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ pub trait OutputExt: Sized {
88
impl OutputExt for Output {
99
#[inline]
1010
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+
}
1516
}
1617
}
1718

src/main.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(exit_status_error)]
2-
31
use iced_x86::{Code, Decoder, DecoderOptions};
42
use pelite::pe64::{Pe, PeFile};
53
use std::io::{Read, Seek, Write};

0 commit comments

Comments
 (0)