From 35a943ae092e5f11e4b72d460b41109913ca625f Mon Sep 17 00:00:00 2001 From: Robbie Pitts Date: Sun, 11 Oct 2020 23:04:46 -0400 Subject: [PATCH] v0.1.4 --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/main.rs | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 01503ee..3fa7b48 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -100,7 +100,7 @@ dependencies = [ [[package]] name = "kpup" -version = "0.1.3" +version = "0.1.4" dependencies = [ "libproc", "nix", diff --git a/Cargo.toml b/Cargo.toml index 6058dc0..9bb8fa7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kpup" -version = "0.1.3" +version = "0.1.4" authors = ["Robbie Pitts "] edition = "2018" license = "MIT" diff --git a/src/main.rs b/src/main.rs index a6630fc..fd7f39a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -90,6 +90,7 @@ fn get_port_from_socket(socket: SocketFDInfo) -> i32 { // Below is copypasta from a libproc test; don't actually understand it 😅 // Change endianess and cut off because insi_lport is network endian and 16bit width. let mut current_port = 0; + current_port |= info.tcpsi_ini.insi_lport >> 8 & 0x00ff; current_port |= info.tcpsi_ini.insi_lport << 8 & 0xff00;