sensepost / ntcrack

Left To My Own Devices - NT hash tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error[E0425]: cannot find value `ret` in this scope

ttev opened this issue · comments

commented

Hello,

I have an issue when I try to install ntrack. I follow the readme, download and install rustup on my win11 and when i want to build i have an error[E0425].


cargo build --release
Updating crates.io index
Downloaded hash_hasher v2.0.3
Downloaded ripline v0.1.0
Downloaded page_size v0.4.2
Downloaded memmap2 v0.5.5
Downloaded crossbeam-channel v0.5.6
Downloaded crossbeam-utils v0.8.11
Downloaded libc v0.2.127
Downloaded once_cell v1.13.0
Downloaded cfg-if v1.0.0
Downloaded num_cpus v1.13.1
Downloaded hex v0.4.3
Downloaded bytecount v0.6.3
Downloaded memchr v2.5.0
Downloaded bstr v0.2.17
Downloaded winapi v0.3.9
Downloaded 15 crates (2.5 MB) in 1.90s (largest was winapi at 1.2 MB)
Compiling memchr v2.5.0
Compiling crossbeam-utils v0.8.11
Compiling winapi v0.3.9
Compiling libc v0.2.127
Compiling cfg-if v1.0.0
Compiling once_cell v1.13.0
Compiling bytecount v0.6.3
Compiling hex v0.4.3
Compiling num_cpus v1.13.1
Compiling memmap2 v0.5.5
Compiling hash_hasher v2.0.3
Compiling crossbeam-channel v0.5.6
Compiling bstr v0.2.17
Compiling ripline v0.1.0
Compiling page_size v0.4.2
Compiling ntcrack v0.1.0 (C:\Users\admin.rt\App\ntcrack-main)
error[E0425]: cannot find value ret in this scope
--> src\main.rs:62:13
|
62 | assert!(ret == 0, "mincore failed with error {}", ret);
| ^^^ not found in this scope

error[E0425]: cannot find value ret in this scope
--> src\main.rs:62:55
|
62 | assert!(ret == 0, "mincore failed with error {}", ret);
| ^^^ not found in this scope

For more information about this error, try rustc --explain E0425.
error: could not compile ntcrack due to 2 previous errors


rustc --explain E0425
An unresolved name was used.

Erroneous code examples:

something_that_doesnt_exist::foo;
// error: unresolved name something_that_doesnt_exist::foo

// or:

trait Foo {
fn bar() {
Self; // error: unresolved name Self
}
}

// or:

let x = unknown_variable; // error: unresolved name unknown_variable

Please verify that the name wasn't misspelled and ensure that the
identifier being referred to is valid for the given situation. Example:

enum something_that_does_exist {
Foo,
}

commented

Ok no problems,

So i try on my mac m1 and this time i succed to install (with a warning) it but i still have an issue when i want to lauch the tool.

When i build it i have this warning :

cargo build --release
warning: field is never read: pages
--> src/main.rs:163:5
|
163 | pages: usize,
| ^^^^^^^^^^^^
|
= note: #[warn(dead_code)] on by default

Then i try to lauch the tools and i have an issue :

./target/release/ntcrack files/some_ntds.ntds files/some_passsword.txt
thread 'main' panicked at 'called Result::unwrap() on an Err value: OddLength', src/main.rs:128:69
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

I will try on my laptop toomorow on ubuntu 22 and see if it's work

You need to pass it a list of raw hashes [1], so strip them out of that ntds with grep -oi "[a-f0-9]\{32\}" files/some_ntds.ntds > some_ntds.hashes

[1] mentioned at top of docs https://github.com/sensepost/ntcrack#invocation

commented

My bad, it's work.
Thank you :)