janoglezcampos / rust_syscalls

Single stub direct and indirect syscalling with runtime SSN resolving for windows.
185 stars 26 forks source link

Bugfix incorrect crate reference #2

Closed cirosec closed 1 year ago

cirosec commented 1 year ago
mod poc {
    use rust_syscalls::syscall;
    pub fn poc() {
        unsafe { syscall!("NtClose", -1) };
    }
}

fn main() {
    poc::poc();
}

Results in:

error[E0433]: failed to resolve: unresolved import
 --> src/main.rs:4:18
  |
4 |         unsafe { syscall!("NtClose", -1) };
  |                  ^^^^^^^^^^^^^^^^^^^^^^^
  |                  |
  |                  unresolved import
  |                  help: a similar path exists: `rust_syscalls::syscall`
  |
  = note: this error originates in the macro `syscall` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0433`.