From 392aa0f5c5ab3b4268ca001a01a04f604cd39c24 Mon Sep 17 00:00:00 2001 From: Duarte Silva Date: Thu, 14 May 2015 13:52:51 +0100 Subject: [PATCH 1/2] Fix the compilation under Linux with MinGW cross-compiler. --- pafish/vbox.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pafish/vbox.c b/pafish/vbox.c index a62f971..2e0fbd0 100644 --- a/pafish/vbox.c +++ b/pafish/vbox.c @@ -1,6 +1,7 @@ #define _WIN32_WINNT 0x0501 /* _WIN32_WINNT_WINXP */ +#include #include #include #include @@ -152,7 +153,6 @@ int vbox_sysfile2(int writelogs) { * NIC MAC check **/ int vbox_mac() { - #if defined(_IPTYPES_H) && defined(_IPHLPAPI_H) WSADATA WSD; int res = FALSE; @@ -181,10 +181,6 @@ int vbox_mac() { WSACleanup(); } return res; - #else - #warning "vbox_mac() function was not built in!" - return -1; - #endif } /** From 84060717c1cb959006bc9c2a2eb63a4b14fdad21 Mon Sep 17 00:00:00 2001 From: Duarte Silva Date: Fri, 15 May 2015 15:53:23 +0100 Subject: [PATCH 2/2] Removed unnecessary handling code. --- pafish/main.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/pafish/main.c b/pafish/main.c index c3e9d9a..ac23e85 100644 --- a/pafish/main.c +++ b/pafish/main.c @@ -312,19 +312,12 @@ int main(void) else print_not_traced(); printf("[*] Looking for a MAC address starting with 08:00:27 ... "); - switch (vbox_mac()) { - case TRUE: - write_log("VirtualBox traced using MAC address starting with 08:00:27"); - print_traced(); - write_trace("hi_virtualbox"); - break; - case FALSE: - print_not_traced(); - break; - case -1: - print_warning("NOT BUILT"); - break; + if (vbox_mac() == TRUE) { + write_log("VirtualBox traced using MAC address starting with 08:00:27"); + print_traced(); + write_trace("hi_virtualbox"); } + else print_not_traced(); printf("[*] Looking for pseudo devices ... "); if (vbox_devices(TRUE) == TRUE) {