Compile sshdump and ciscodump for Windows
authorPascal Quantin <pascal.quantin@gmail.com>
Tue, 24 Nov 2015 22:03:13 +0000 (23:03 +0100)
committerAnders Broman <a.broman58@gmail.com>
Mon, 25 Apr 2016 07:22:28 +0000 (07:22 +0000)
Use libSSH 0.7.2 compiled with MinGW(32|64) and linked with zlib and gcrypt support

Change-Id: I7c17d1ba3dd1890e2f83c119f5ea851834807e43
Reviewed-on: https://code.wireshark.org/review/12117
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
18 files changed:
CMakeLists.txt
Makefile.nmake
cmake/modules/FindLIBSSH.cmake
config.nmake
debian/wireshark-common.manpages
doc/CMakeLists.txt
doc/Makefile.am
doc/Makefile.nmake
extcap.c
extcap/Makefile.nmake
extcap/ssh-base.c
extcap/sshdump.c
packaging/nsis/CMakeLists.txt
packaging/nsis/Makefile.nmake
packaging/nsis/uninstall.nsi
packaging/nsis/wireshark.nsi
tools/win-setup.ps1
ui/qt/Wireshark.pro

index 149a321139d170079178811b6a49471c37fef1d8..7706376e4ef7cbed440a14a1a0961497ad8f9104 100644 (file)
@@ -1325,6 +1325,7 @@ set(INSTALL_FILES
        ${CMAKE_BINARY_DIR}/doc/androiddump.html
        ${CMAKE_BINARY_DIR}/doc/capinfos.html
        ${CMAKE_BINARY_DIR}/doc/captype.html
        ${CMAKE_BINARY_DIR}/doc/androiddump.html
        ${CMAKE_BINARY_DIR}/doc/capinfos.html
        ${CMAKE_BINARY_DIR}/doc/captype.html
+       ${CMAKE_BINARY_DIR}/doc/ciscodump.html
        ${CMAKE_BINARY_DIR}/doc/dftest.html
        ${CMAKE_BINARY_DIR}/doc/dumpcap.html
        ${CMAKE_BINARY_DIR}/doc/editcap.html
        ${CMAKE_BINARY_DIR}/doc/dftest.html
        ${CMAKE_BINARY_DIR}/doc/dumpcap.html
        ${CMAKE_BINARY_DIR}/doc/editcap.html
index 9cc31a058680656c3b5607bc52658eed31e76634..00c5b13515625f052398e29f0517fae754dbf690 100644 (file)
@@ -819,7 +819,7 @@ randpkt_core:: help config.h version.h doxygen
        $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake librandpkt_core.lib
        cd ..
 
        $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake librandpkt_core.lib
        cd ..
 
-extcap::
+extcap:: writecap
        cd extcap
        $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake all
        cd ..
        cd extcap
        $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake all
        cd ..
@@ -1077,8 +1077,8 @@ process_libs:
 !ENDIF
 !IFDEF LIBSSH_DIR
        @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
 !ENDIF
 !IFDEF LIBSSH_DIR
        @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
-               libssh-$(LIBSSH_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws \
-               libssh-$(LIBSSH_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws.zip \
+               . \
+               libssh-0.7.2-$(WIRESHARK_TARGET_PLATFORM)ws.zip \
                "$(DOWNLOAD_TAG)" "$(WIRESHARK_TARGET_PLATFORM)"
 !ENDIF
 !IFDEF WINSPARKLE_DIR
                "$(DOWNLOAD_TAG)" "$(WIRESHARK_TARGET_PLATFORM)"
 !ENDIF
 !IFDEF WINSPARKLE_DIR
@@ -1155,6 +1155,7 @@ clean_setup:
        rm -r -f libsmi-0.4.5
        rm -r -f libsmi-0.4.8
        rm -r -f libsmi-svn-40773-win??ws
        rm -r -f libsmi-0.4.5
        rm -r -f libsmi-0.4.8
        rm -r -f libsmi-svn-40773-win??ws
+       rm -r -f libssh-0.7.2-win??ws
        rm -r -f nasm-2.00
        rm -r -f nasm-2.02
        rm -r -f nasm-2.09.08
        rm -r -f nasm-2.00
        rm -r -f nasm-2.02
        rm -r -f nasm-2.09.08
@@ -1234,6 +1235,8 @@ install-generated-files: doc
        if exist ".\extcap\randpktdump.pdb" xcopy ".\extcap\randpktdump.pdb" $(INSTALL_DIR)\extcap /d
        if exist ".\extcap\sshdump.exe" xcopy ".\extcap\sshdump.exe" $(INSTALL_DIR)\extcap /d
        if exist ".\extcap\sshdump.pdb" xcopy ".\extcap\sshdump.pdb" $(INSTALL_DIR)\extcap /d
        if exist ".\extcap\randpktdump.pdb" xcopy ".\extcap\randpktdump.pdb" $(INSTALL_DIR)\extcap /d
        if exist ".\extcap\sshdump.exe" xcopy ".\extcap\sshdump.exe" $(INSTALL_DIR)\extcap /d
        if exist ".\extcap\sshdump.pdb" xcopy ".\extcap\sshdump.pdb" $(INSTALL_DIR)\extcap /d
+       if exist ".\extcap\ciscodump.exe" xcopy ".\extcap\ciscodump.exe" $(INSTALL_DIR)\extcap /d
+       if exist ".\extcap\ciscodump.pdb" xcopy ".\extcap\ciscodump.pdb" $(INSTALL_DIR)\extcap /d
        if not exist $(INSTALL_DIR_QT)\extcap mkdir $(INSTALL_DIR_QT)\extcap
        if exist ".\extcap\androiddump.exe" xcopy ".\extcap\androiddump.exe" $(INSTALL_DIR_QT)\extcap /d
        if exist ".\extcap\androiddump.pdb" xcopy ".\extcap\androiddump.pdb" $(INSTALL_DIR_QT)\extcap /d
        if not exist $(INSTALL_DIR_QT)\extcap mkdir $(INSTALL_DIR_QT)\extcap
        if exist ".\extcap\androiddump.exe" xcopy ".\extcap\androiddump.exe" $(INSTALL_DIR_QT)\extcap /d
        if exist ".\extcap\androiddump.pdb" xcopy ".\extcap\androiddump.pdb" $(INSTALL_DIR_QT)\extcap /d
@@ -1241,6 +1244,8 @@ install-generated-files: doc
        if exist ".\extcap\randpktdump.pdb" xcopy ".\extcap\randpktdump.pdb" $(INSTALL_DIR_QT)\extcap /d
        if exist ".\extcap\sshdump.exe" xcopy ".\extcap\sshdump.exe" $(INSTALL_DIR_QT)\extcap /d
        if exist ".\extcap\sshdump.pdb" xcopy ".\extcap\sshdump.pdb" $(INSTALL_DIR_QT)\extcap /d
        if exist ".\extcap\randpktdump.pdb" xcopy ".\extcap\randpktdump.pdb" $(INSTALL_DIR_QT)\extcap /d
        if exist ".\extcap\sshdump.exe" xcopy ".\extcap\sshdump.exe" $(INSTALL_DIR_QT)\extcap /d
        if exist ".\extcap\sshdump.pdb" xcopy ".\extcap\sshdump.pdb" $(INSTALL_DIR_QT)\extcap /d
+       if exist ".\extcap\ciscodump.exe" xcopy ".\extcap\ciscodump.exe" $(INSTALL_DIR_QT)\extcap /d
+       if exist ".\extcap\ciscodump.pdb" xcopy ".\extcap\ciscodump.pdb" $(INSTALL_DIR_QT)\extcap /d
        if exist capinfos.exe xcopy capinfos.exe $(INSTALL_DIR) /d
        if exist capinfos.pdb xcopy capinfos.pdb $(INSTALL_DIR) /d
        if exist captype.exe xcopy captype.exe $(INSTALL_DIR) /d
        if exist capinfos.exe xcopy capinfos.exe $(INSTALL_DIR) /d
        if exist capinfos.pdb xcopy capinfos.pdb $(INSTALL_DIR) /d
        if exist captype.exe xcopy captype.exe $(INSTALL_DIR) /d
index db13825d895d14b8c651a9cb7d05ec70f4f0351e..46dbe0415f03b8543c1967b3f0a4440aaffb49bb 100644 (file)
@@ -86,7 +86,7 @@ else ()
       CACHE PATH "Path to libssh DLL"
     )
     file(GLOB _libssh_dll RELATIVE "${LIBSSH_DLL_DIR}"
       CACHE PATH "Path to libssh DLL"
     )
     file(GLOB _libssh_dll RELATIVE "${LIBSSH_DLL_DIR}"
-      "${LIBSSH_DLL_DIR}/ssh.dll"
+      "${LIBSSH_DLL_DIR}/libssh.dll"
     )
     set(LIBSSH_DLL ${_libssh_dll}
       # We're storing filenames only. Should we use STRING instead?
     )
     set(LIBSSH_DLL ${_libssh_dll}
       # We're storing filenames only. Should we use STRING instead?
index 96c2c090a304275ac7c3f5ea8c3edcaab07e44e4..8856e0a4ef25c1d987c933a414d98f57710cba47 100644 (file)
@@ -434,7 +434,7 @@ GCC_DLL=libgcc_s_sjlj-1.dll
 # If you don't have libssh, comment this line out so that LIBSSH_DIR
 # isn't defined.
 #
 # If you don't have libssh, comment this line out so that LIBSSH_DIR
 # isn't defined.
 #
-#LIBSSH_DIR=$(WIRESHARK_LIB_DIR)\libssh-0.7.2
+LIBSSH_DIR=$(WIRESHARK_LIB_DIR)\libssh-0.7.2-win32ws
 
 #
 # Optional: the KFW library enables kerberos/sasl/dcerpc decryption.
 
 #
 # Optional: the KFW library enables kerberos/sasl/dcerpc decryption.
@@ -674,6 +674,14 @@ GNUTLS_PKG=3.2.15-2.9
 GPGERROR_DLL=libgpg-error6-0.dll
 GCC_DLL=libgcc_s_seh-1.dll
 
 GPGERROR_DLL=libgpg-error6-0.dll
 GCC_DLL=libgcc_s_seh-1.dll
 
+#
+# Optional: libssh library is required for sshdump support
+#
+# If you don't have libssh, comment this line out so that LIBSSH_DIR
+# isn't defined.
+#
+LIBSSH_DIR=$(WIRESHARK_LIB_DIR)\libssh-0.7.2-win64ws
+
 #
 # Optional: the KFW library enables kerberos/sasl/dcerpc decryption.
 #
 #
 # Optional: the KFW library enables kerberos/sasl/dcerpc decryption.
 #
index c9a375295e86320669dd82fa0ea447cd08514952..4b7f12d3715563402120083ef56ac71b5244d82e 100644 (file)
@@ -1,4 +1,5 @@
 obj-*/doc/androiddump.1
 obj-*/doc/androiddump.1
+obj-*/doc/ciscodump.1
 obj-*/doc/sshdump.1
 obj-*/doc/randpktdump.1
 obj-*/doc/editcap.1
 obj-*/doc/sshdump.1
 obj-*/doc/randpktdump.1
 obj-*/doc/editcap.1
index d2bc082c5a8927f4afc9cfadad566e132d2bba3d..fea2fb5227334952d9824299f2069f4c558d1940 100644 (file)
@@ -97,6 +97,7 @@ set(MAN1_INSTALL_FILES
        ${CMAKE_CURRENT_BINARY_DIR}/androiddump.1
        ${CMAKE_CURRENT_BINARY_DIR}/capinfos.1
        ${CMAKE_CURRENT_BINARY_DIR}/captype.1
        ${CMAKE_CURRENT_BINARY_DIR}/androiddump.1
        ${CMAKE_CURRENT_BINARY_DIR}/capinfos.1
        ${CMAKE_CURRENT_BINARY_DIR}/captype.1
+       ${CMAKE_CURRENT_BINARY_DIR}/ciscodump.1
        ${CMAKE_CURRENT_BINARY_DIR}/dftest.1
        ${CMAKE_CURRENT_BINARY_DIR}/dumpcap.1
        ${CMAKE_CURRENT_BINARY_DIR}/editcap.1
        ${CMAKE_CURRENT_BINARY_DIR}/dftest.1
        ${CMAKE_CURRENT_BINARY_DIR}/dumpcap.1
        ${CMAKE_CURRENT_BINARY_DIR}/editcap.1
@@ -124,6 +125,7 @@ set(HTML_INSTALL_FILES
        ${CMAKE_CURRENT_BINARY_DIR}/androiddump.html
        ${CMAKE_CURRENT_BINARY_DIR}/capinfos.html
        ${CMAKE_CURRENT_BINARY_DIR}/captype.html
        ${CMAKE_CURRENT_BINARY_DIR}/androiddump.html
        ${CMAKE_CURRENT_BINARY_DIR}/capinfos.html
        ${CMAKE_CURRENT_BINARY_DIR}/captype.html
+       ${CMAKE_CURRENT_BINARY_DIR}/ciscodump.html
        ${CMAKE_CURRENT_BINARY_DIR}/dftest.html
        ${CMAKE_CURRENT_BINARY_DIR}/dumpcap.html
        ${CMAKE_CURRENT_BINARY_DIR}/editcap.html
        ${CMAKE_CURRENT_BINARY_DIR}/dftest.html
        ${CMAKE_CURRENT_BINARY_DIR}/dumpcap.html
        ${CMAKE_CURRENT_BINARY_DIR}/editcap.html
index 4d69a91a4842f4c423b1381511b8a5436cf36035..6a2004b2d901e0516847d5b2a7566cf600e75250 100644 (file)
@@ -86,7 +86,7 @@ man_MANS =
 noinst_DATA = asn2deb.1 asn2deb.html idl2deb.1 idl2deb.html idl2wrs.1 idl2wrs.html
 
 pkgdata_DATA = AUTHORS-SHORT $(top_srcdir)/docbook/ws.css wireshark.html \
 noinst_DATA = asn2deb.1 asn2deb.html idl2deb.1 idl2deb.html idl2wrs.1 idl2wrs.html
 
 pkgdata_DATA = AUTHORS-SHORT $(top_srcdir)/docbook/ws.css wireshark.html \
-       tshark.html wireshark-filter.html capinfos.html editcap.html \
+       tshark.html wireshark-filter.html capinfos.html ciscodump.html editcap.html \
        mergecap.html reordercap.html text2pcap.html dumpcap.html androiddump.html \
        sshdump.html randpktdump.html rawshark.html dftest.html randpkt.html \
        extcap.html
        mergecap.html reordercap.html text2pcap.html dumpcap.html androiddump.html \
        sshdump.html randpktdump.html rawshark.html dftest.html randpkt.html \
        extcap.html
@@ -237,6 +237,13 @@ sshdump.html: sshdump.pod ../config.h $(top_srcdir)/docbook/ws.css
        --noindex                                                       \
        $(srcdir)/sshdump.pod > sshdump.html
 
        --noindex                                                       \
        $(srcdir)/sshdump.pod > sshdump.html
 
+ciscodump.html: ciscodump.pod ../config.h $(top_srcdir)/docbook/ws.css
+       $(AM_V_POD2HTML)$(POD2HTML)                     \
+       --title="ciscodump - The Wireshark Network Analyzer $(VERSION)" \
+       --css=$(POD_CSS_URL)                                            \
+       --noindex                                                       \
+       $(srcdir)/ciscodump.pod > ciscodump.html
+
 randpktdump.html: randpktdump.pod ../config.h $(top_srcdir)/docbook/ws.css
        $(AM_V_POD2HTML)$(POD2HTML)                     \
        --title="randpktdump - The Wireshark Network Analyzer $(VERSION)"       \
 randpktdump.html: randpktdump.pod ../config.h $(top_srcdir)/docbook/ws.css
        $(AM_V_POD2HTML)$(POD2HTML)                     \
        --title="randpktdump - The Wireshark Network Analyzer $(VERSION)"       \
@@ -307,6 +314,7 @@ EXTRA_DIST =                                \
        asn2deb.pod                     \
        capinfos.pod                    \
        captype.pod                     \
        asn2deb.pod                     \
        capinfos.pod                    \
        captype.pod                     \
+       ciscodump.pod                   \
        dfilter2pod.pl                  \
        dftest.pod                      \
        dumpcap.pod                     \
        dfilter2pod.pl                  \
        dftest.pod                      \
        dumpcap.pod                     \
@@ -326,7 +334,7 @@ EXTRA_DIST =                                \
        rawshark.pod                    \
        reordercap.pod                  \
        sgml.doc.template               \
        rawshark.pod                    \
        reordercap.pod                  \
        sgml.doc.template               \
-       sshdump.pod                             \
+       sshdump.pod                     \
        text2pcap.pod                   \
        tshark.pod                      \
        wireshark-filter.pod            \
        text2pcap.pod                   \
        tshark.pod                      \
        wireshark-filter.pod            \
index ed5055c4eacbb10b99a9169488e78f026fb1c60e..f56d2c78a74a2f18c4848d329299b16df0437988 100644 (file)
@@ -25,7 +25,7 @@
 include ../config.nmake
 
 doc: wireshark.html tshark.html wireshark-filter.html capinfos.html \
 include ../config.nmake
 
 doc: wireshark.html tshark.html wireshark-filter.html capinfos.html \
-       editcap.html idl2wrs.html mergecap.html reordercap.html \
+       ciscodump.html editcap.html idl2wrs.html mergecap.html reordercap.html \
        text2pcap.html dumpcap.html androiddump.html sshdump.html rawshark.html \
        dftest.html randpkt.html randpktdump.html \
        idl2deb.html asn2deb.html extcap.html
        text2pcap.html dumpcap.html androiddump.html sshdump.html rawshark.html \
        dftest.html randpkt.html randpktdump.html \
        idl2deb.html asn2deb.html extcap.html
@@ -33,7 +33,7 @@ doc: wireshark.html tshark.html wireshark-filter.html capinfos.html \
 man: wireshark.1 tshark.1 wireshark-filter.4 capinfos.1 \
        editcap.1 idl2wrs.1 mergecap.1 reordercap.1 \
        text2pcap.1 dumpcap.1 androiddump.1 sshdump.1 rawshark.1 dftest.1 randpkt.1 \
 man: wireshark.1 tshark.1 wireshark-filter.4 capinfos.1 \
        editcap.1 idl2wrs.1 mergecap.1 reordercap.1 \
        text2pcap.1 dumpcap.1 androiddump.1 sshdump.1 rawshark.1 dftest.1 randpkt.1 \
-       idl2deb.1 asn2deb.1 extcap.4 randpktdump.1
+       idl2deb.1 asn2deb.1 extcap.4 randpktdump.1 ciscodump.1
 
 wireshark.pod: wireshark.pod.template AUTHORS-SHORT-FORMAT
        copy /B wireshark.pod.template + AUTHORS-SHORT-FORMAT wireshark.pod
 
 wireshark.pod: wireshark.pod.template AUTHORS-SHORT-FORMAT
        copy /B wireshark.pod.template + AUTHORS-SHORT-FORMAT wireshark.pod
@@ -249,6 +249,19 @@ sshdump.html: sshdump.pod ../config.h ws.css
        --noindex                                 \
        sshdump.pod > sshdump.html
 
        --noindex                                 \
        sshdump.pod > sshdump.html
 
+ciscodump.1: ciscodump.pod ../config.h
+       $(POD2MAN)                      \
+       --center="The Wireshark Network Analyzer" \
+       --release=$(VERSION)                     \
+       ciscodump.pod > ciscodump.1
+
+ciscodump.html: ciscodump.pod ../config.h ws.css
+       $(POD2HTML)                     \
+       --title="ciscodump - The Wireshark Network Analyzer $(VERSION)" \
+       --css=ws.css \
+       --noindex                                 \
+       ciscodump.pod > ciscodump.html
+
 randpktdump.1: randpktdump.pod ../config.h
        $(POD2MAN)                      \
        --center="The Wireshark Network Analyzer" \
 randpktdump.1: randpktdump.pod ../config.h
        $(POD2MAN)                      \
        --center="The Wireshark Network Analyzer" \
index acd6de770bea5e4f136c0c4308bb6cc1af779348..88d32b4719bef967699bb01d019294c7e3df0785 100644 (file)
--- a/extcap.c
+++ b/extcap.c
@@ -211,7 +211,7 @@ static void extcap_foreach(gint argc, gchar **args, extcap_cb_t cb,
                     &command_output, NULL, &exit_status, NULL);
 
             if (status && exit_status == 0)
                     &command_output, NULL, &exit_status, NULL);
 
             if (status && exit_status == 0)
-            keep_going = cb(extcap_path->str, ifname, command_output, cb_data, err_str);
+                keep_going = cb(extcap_path->str, ifname, command_output, cb_data, err_str);
 
             g_free(argv[0]);
             g_free(command_output);
 
             g_free(argv[0]);
             g_free(command_output);
index 22e27e9b8a99cddc012d3032e1538004e33344a2..0641e1e060964a04d2a843c165b0d9b92ef433d3 100644 (file)
@@ -76,7 +76,7 @@ ciscodump_LIBS = $(ciscodump_WSLIBS) \
 EXECUTABLES=androiddump.exe randpktdump.exe
 
 !IFDEF LIBSSH_DIR
 EXECUTABLES=androiddump.exe randpktdump.exe
 
 !IFDEF LIBSSH_DIR
-EXECUTABLES += sshdump.exe ciscodump.exe
+EXECUTABLES = $(EXECUTABLES) sshdump.exe ciscodump.exe
 !ENDIF
 
 all: $(EXECUTABLES)
 !ENDIF
 
 all: $(EXECUTABLES)
index 830485df3d219cabf62562b3f64797520d2cca29..cec08561056267095cedd6e3fbe54fc31259c02c 100644 (file)
@@ -22,6 +22,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
+#include "config.h"
+
 #include "ssh-base.h"
 
 #include <extcap/extcap-base.h>
 #include "ssh-base.h"
 
 #include <extcap/extcap-base.h>
index 92ea9fded06b182991f09e66deba8d8aa9f2b1c8..94cf27de1908996ce9aeef624395360630d7d78e 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <extcap/extcap-base.h>
 #include <wsutil/interface.h>
 
 #include <extcap/extcap-base.h>
 #include <wsutil/interface.h>
+#include <wsutil/file_util.h>
 #include <extcap/ssh-base.h>
 
 #include <errno.h>
 #include <extcap/ssh-base.h>
 
 #include <errno.h>
@@ -90,7 +91,7 @@ static void ssh_loop_read(ssh_channel channel, int fd)
        /* read from stdin until data are available */
        do {
                nbytes = ssh_channel_read(channel, buffer, SSH_READ_BLOCK_SIZE, 0);
        /* read from stdin until data are available */
        do {
                nbytes = ssh_channel_read(channel, buffer, SSH_READ_BLOCK_SIZE, 0);
-               if (write(fd, buffer, nbytes) != nbytes) {
+               if (ws_write(fd, buffer, nbytes) != nbytes) {
                        errmsg_print("ERROR reading: %s", g_strerror(errno));
                        return;
                }
                        errmsg_print("ERROR reading: %s", g_strerror(errno));
                        return;
                }
@@ -99,7 +100,7 @@ static void ssh_loop_read(ssh_channel channel, int fd)
        /* read loop finished... maybe something wrong happened. Read from stderr */
        do {
                nbytes = ssh_channel_read(channel, buffer, SSH_READ_BLOCK_SIZE, 1);
        /* read loop finished... maybe something wrong happened. Read from stderr */
        do {
                nbytes = ssh_channel_read(channel, buffer, SSH_READ_BLOCK_SIZE, 1);
-               if (write(STDERR_FILENO, buffer, nbytes) != nbytes) {
+               if (ws_write(STDERR_FILENO, buffer, nbytes) != nbytes) {
                        return;
                }
        } while(nbytes > 0);
                        return;
                }
        } while(nbytes > 0);
@@ -188,9 +189,9 @@ static int ssh_open_remote_connection(const char* hostname, const unsigned int p
 
        if (g_strcmp0(fifo, "-")) {
                /* Open or create the output file */
 
        if (g_strcmp0(fifo, "-")) {
                /* Open or create the output file */
-               fd = open(fifo, O_WRONLY);
+               fd = ws_open(fifo, O_WRONLY, 0640);
                if (fd == -1) {
                if (fd == -1) {
-                       fd = open(fifo, O_WRONLY | O_CREAT, 0640);
+                       fd = ws_open(fifo, O_WRONLY | O_CREAT, 0640);
                        if (fd == -1) {
                                errmsg_print("Error creating output file: %s", g_strerror(errno));
                                return EXIT_FAILURE;
                        if (fd == -1) {
                                errmsg_print("Error creating output file: %s", g_strerror(errno));
                                return EXIT_FAILURE;
@@ -222,7 +223,7 @@ cleanup:
        ssh_cleanup(&sshs, &channel);
 
        if (g_strcmp0(fifo, "-"))
        ssh_cleanup(&sshs, &channel);
 
        if (g_strcmp0(fifo, "-"))
-               close(fd);
+               ws_close(fd);
        return ret;
 }
 
        return ret;
 }
 
@@ -258,7 +259,7 @@ static void help(const char* binname)
        printf("  --remote-filter <filter>: a filter for remote capture (default: don't listen on local local interfaces IPs)\n");
 }
 
        printf("  --remote-filter <filter>: a filter for remote capture (default: don't listen on local local interfaces IPs)\n");
 }
 
-static char* interfaces_list_to_filter(GSList* interfaces, unsigned int remote_port)
+static char* interfaces_list_to_filter(GSList* interfaces, const unsigned int remote_port)
 {
        GString* filter = g_string_new(NULL);
        GSList* cur;
 {
        GString* filter = g_string_new(NULL);
        GSList* cur;
index 3f1ad9416d10bfdaa66a53c3240f45812fa6b4c9..dec5cb5dbc984714ab508216b772e17d00c6c486 100644 (file)
@@ -132,7 +132,7 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/config.nsh" "${_config_nsh_contents}")
 set(_all_manifest "${CMAKE_CURRENT_BINARY_DIR}/all-manifest.nsh")
 set(_all_manifest_contents "# Files required for all sections. Generated by CMake.\n")
 foreach(_dll ${GLIB2_DLLS} ${CARES_DLL} ${GCRYPT_DLLS} ${GEOIP_DLL}
 set(_all_manifest "${CMAKE_CURRENT_BINARY_DIR}/all-manifest.nsh")
 set(_all_manifest_contents "# Files required for all sections. Generated by CMake.\n")
 foreach(_dll ${GLIB2_DLLS} ${CARES_DLL} ${GCRYPT_DLLS} ${GEOIP_DLL}
-               ${GNUTLS_DLLS} ${KERBEROS_DLLS} ${LUA_DLL} ${SMI_DLL}
+               ${GNUTLS_DLLS} ${KERBEROS_DLLS} ${LUA_DLL} ${SMI_DLL} ${LIBSSH_DLL}
                ${WINSPARKLE_DLL} ${ZLIB_DLL}
        )
        set(_all_manifest_contents "${_all_manifest_contents}File \"\${STAGING_DIR}\\${_dll}\"\n")
                ${WINSPARKLE_DLL} ${ZLIB_DLL}
        )
        set(_all_manifest_contents "${_all_manifest_contents}File \"\${STAGING_DIR}\\${_dll}\"\n")
index d3edf9a4138cf8437bf1609824d2a6a4c537149f..63a6d1add73974856f6e9c0391f37b3ee13de31e 100644 (file)
@@ -22,12 +22,14 @@ DLL=../../wiretap/wiretap-$(WTAP_VERSION).dll ../../wsutil/libwsutil.dll ../../c
 DOC=../../doc/ws.css                           \
        ../../doc/androiddump.html              \
        ../../doc/capinfos.html                 \
 DOC=../../doc/ws.css                           \
        ../../doc/androiddump.html              \
        ../../doc/capinfos.html                 \
+       ../../doc/ciscodump.html                        \
        ../../doc/dumpcap.html                  \
        ../../doc/editcap.html                  \
        ../../doc/extcap.html                   \
        ../../doc/mergecap.html                 \
        ../../doc/randpktdump.html              \
        ../../doc/rawshark.html                 \
        ../../doc/dumpcap.html                  \
        ../../doc/editcap.html                  \
        ../../doc/extcap.html                   \
        ../../doc/mergecap.html                 \
        ../../doc/randpktdump.html              \
        ../../doc/rawshark.html                 \
+       ../../doc/sshdump.html                  \
        ../../doc/text2pcap.html                \
        ../../doc/tshark.html                   \
        ../../doc/wireshark-filter.html         \
        ../../doc/text2pcap.html                \
        ../../doc/tshark.html                   \
        ../../doc/wireshark-filter.html         \
@@ -37,9 +39,6 @@ DOC=../../doc/ws.css                          \
        $(STAGING_DIR)/README.txt               \
        $(STAGING_DIR)/README.windows.txt
 
        $(STAGING_DIR)/README.txt               \
        $(STAGING_DIR)/README.windows.txt
 
-#WIP: uncomment and add to the above when sshdump on windows will be ready to go
-#../../doc/sshdump.html
-
 GPL=../../COPYING
 HELP=$(STAGING_DIR)/help/capture_filters.txt \
        $(STAGING_DIR)/help/capturing.txt \
 GPL=../../COPYING
 HELP=$(STAGING_DIR)/help/capture_filters.txt \
        $(STAGING_DIR)/help/capturing.txt \
@@ -176,6 +175,9 @@ all-manifest.nsh: Makefile.nmake ..\..\config.nmake
        @echo # SMI >> $@
        @echo File "$(STAGING_DIR)\libsmi-2.dll" >> $@
 !ENDIF
        @echo # SMI >> $@
        @echo File "$(STAGING_DIR)\libsmi-2.dll" >> $@
 !ENDIF
+!IFDEF LIBSSH_DIR
+       @echo File "$(STAGING_DIR)\libssh.dll" >> $@
+!ENDIF
 !IFDEF WINSPARKLE_DIR
        @echo # WinSparkle >> $@
        @echo File "$(STAGING_DIR)\WinSparkle.dll" >> $@
 !IFDEF WINSPARKLE_DIR
        @echo # WinSparkle >> $@
        @echo File "$(STAGING_DIR)\WinSparkle.dll" >> $@
index 5365f1d637c8992d0274c12b6549cc3d767e0fa0..0d87165130cd4e32e0c7f659952de722ed03ea77 100755 (executable)
@@ -126,8 +126,8 @@ SetShellVarContext all
 
 Push "${EXECUTABLE_MARKER}"
 Push "androiddump"
 
 Push "${EXECUTABLE_MARKER}"
 Push "androiddump"
-;WIP: uncomment when sshdump on windows will be ready to go
-;Push "sshdump"
+Push "ciscodump"
+Push "sshdump"
 Push "dumpcap"
 Push "${PROGRAM_NAME}"
 Push "tshark"
 Push "dumpcap"
 Push "${PROGRAM_NAME}"
 Push "tshark"
@@ -180,9 +180,9 @@ Delete "$INSTDIR\etc\gtk-2.0\*.*"
 Delete "$INSTDIR\etc\gtk-3.0\*.*"
 Delete "$INSTDIR\etc\pango\*.*"
 Delete "$INSTDIR\extcap\androiddump.*"
 Delete "$INSTDIR\etc\gtk-3.0\*.*"
 Delete "$INSTDIR\etc\pango\*.*"
 Delete "$INSTDIR\extcap\androiddump.*"
-;WIP: uncomment when sshdump on windows will be ready to go
-;Delete "$INSTDIR\extcap\sshdump.*"
 Delete "$INSTDIR\extcap\randpktdump.*"
 Delete "$INSTDIR\extcap\randpktdump.*"
+Delete "$INSTDIR\extcap\sshdump.*"
+Delete "$INSTDIR\extcap\ciscodump.*"
 Delete "$INSTDIR\help\*.*"
 Delete "$INSTDIR\iconengines\*.*"
 Delete "$INSTDIR\imageformats\*.*"
 Delete "$INSTDIR\help\*.*"
 Delete "$INSTDIR\iconengines\*.*"
 Delete "$INSTDIR\imageformats\*.*"
index cd001dfe5f1afbd0da3c3d017c44c393475b8b0f..fbce431d7075f6d7fd2006aafb1713f87c46956e 100644 (file)
@@ -1059,14 +1059,15 @@ SetOutPath $INSTDIR\extcap
 File "${STAGING_DIR}\extcap\androiddump.exe"
 SectionEnd
 
 File "${STAGING_DIR}\extcap\androiddump.exe"
 SectionEnd
 
-;WIP: uncomment this section when sshdump on windows will be ready to go
-;Section /o "Sshdump" SecSshdumpinfos
+Section /o "SSHdump" SecSSHdumpinfos
 ;-------------------------------------------
 ;-------------------------------------------
-;SetOutPath $INSTDIR
-;File "${STAGING_DIR}\sshdump.html"
-;SetOutPath $INSTDIR\extcap
-;File "${STAGING_DIR}\extcap\sshdump.exe"
-;SectionEnd
+SetOutPath $INSTDIR
+File "${STAGING_DIR}\sshdump.html"
+File "${STAGING_DIR}\ciscodump.html"
+SetOutPath $INSTDIR\extcap
+File "${STAGING_DIR}\extcap\sshdump.exe"
+File "${STAGING_DIR}\extcap\ciscodump.exe"
+SectionEnd
 
 Section /o "Randpktdump" SecRandpktdumpinfos
 ;-------------------------------------------
 
 Section /o "Randpktdump" SecRandpktdumpinfos
 ;-------------------------------------------
@@ -1122,8 +1123,7 @@ SectionEnd
 
   !insertmacro MUI_DESCRIPTION_TEXT ${SecToolsGroup} "Additional command line based tools."
   !insertmacro MUI_DESCRIPTION_TEXT ${SecAndroiddumpinfos} "Provide capture interfaces from Android devices"
 
   !insertmacro MUI_DESCRIPTION_TEXT ${SecToolsGroup} "Additional command line based tools."
   !insertmacro MUI_DESCRIPTION_TEXT ${SecAndroiddumpinfos} "Provide capture interfaces from Android devices"
-;WIP: uncomment this section when sshdump on windows will be ready to go
-;!insertmacro MUI_DESCRIPTION_TEXT ${SecSshdumpinfos} "Provide remote capture through SSH"
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecSSHdumpinfos} "Provide remote capture through SSH"
   !insertmacro MUI_DESCRIPTION_TEXT ${SecRandpktdumpinfos} "Provide random packet generator"
   !insertmacro MUI_DESCRIPTION_TEXT ${SecEditCap} "Copy packets to a new file, optionally trimmming packets, omitting them, or saving to a different format."
   !insertmacro MUI_DESCRIPTION_TEXT ${SecText2Pcap} "Read an ASCII hex dump and write the data into a libpcap-style capture file."
   !insertmacro MUI_DESCRIPTION_TEXT ${SecRandpktdumpinfos} "Provide random packet generator"
   !insertmacro MUI_DESCRIPTION_TEXT ${SecEditCap} "Copy packets to a new file, optionally trimmming packets, omitting them, or saving to a different format."
   !insertmacro MUI_DESCRIPTION_TEXT ${SecText2Pcap} "Read an ASCII hex dump and write the data into a libpcap-style capture file."
index e87032da4dda7ecc994746ecedcdab95170edbda..b9e159d70b18ec6ab2d1310bca08bdb5de7bf2e3 100644 (file)
@@ -113,6 +113,7 @@ $Win64Archives = @{
     "gtk+-bundle_2.24.23-3.39_win64ws.zip" = "gtk2";
     "kfw-3-2-2-x64-ws.zip" = "";
     "libsmi-svn-40773-win64ws.zip" = "";
     "gtk+-bundle_2.24.23-3.39_win64ws.zip" = "gtk2";
     "kfw-3-2-2-x64-ws.zip" = "";
     "libsmi-svn-40773-win64ws.zip" = "";
+    "libssh-0.7.2-win64ws.zip" = "";
     "nasm-2.09.08-win32.zip" = "";
     "portaudio_v19_2.zip" = "";
     "upx303w.zip" = "";
     "nasm-2.09.08-win32.zip" = "";
     "portaudio_v19_2.zip" = "";
     "upx303w.zip" = "";
@@ -130,6 +131,7 @@ $Win32Archives = @{
     "gtk+-bundle_2.24.23-1.1_win32ws.zip" = "gtk2";
     "kfw-3-2-2-i386-ws-vc6.zip" = "";
     "libsmi-svn-40773-win32ws.zip" = "";
     "gtk+-bundle_2.24.23-1.1_win32ws.zip" = "gtk2";
     "kfw-3-2-2-i386-ws-vc6.zip" = "";
     "libsmi-svn-40773-win32ws.zip" = "";
+    "libssh-0.7.2-win32ws.zip" = "";
     "nasm-2.09.08-win32.zip" = "";
     "portaudio_v19_2.zip" = "";
     "upx303w.zip" = "";
     "nasm-2.09.08-win32.zip" = "";
     "portaudio_v19_2.zip" = "";
     "upx303w.zip" = "";
@@ -182,6 +184,7 @@ $CleanupItems = @(
     "lua5.2.?"
     "libsmi-0.4.8"
     "libsmi-svn-40773-win??ws"
     "lua5.2.?"
     "libsmi-0.4.8"
     "libsmi-svn-40773-win??ws"
+    "libssh-0.7.2-win??ws"
     "nasm-2.09.08"
     "portaudio_v19"
     "portaudio_v19_2"
     "nasm-2.09.08"
     "portaudio_v19"
     "portaudio_v19_2"
index 555c668781be8e2e6d07f6d2e396b9ea2372f82f..c4f3dbcd3f4f9ec6676bf5f79b1278733000819a 100644 (file)
@@ -544,6 +544,7 @@ win32 {
         $${GNUTLS_DIR}/bin/libintl-8.dll $${SMI_DIR}/bin/libsmi-2.dll \
         $${LUA_DIR}/lua52.dll \
         $${GEOIP_DIR}/bin/libGeoIP-1.dll \
         $${GNUTLS_DIR}/bin/libintl-8.dll $${SMI_DIR}/bin/libsmi-2.dll \
         $${LUA_DIR}/lua52.dll \
         $${GEOIP_DIR}/bin/libGeoIP-1.dll \
+        $${LIBSSH_DIR}/bin/libssh.dll \
         $${WINSPARKLE_DIR}/WinSparkle.dll \
         ../../colorfilters ../../dfilters ../../cfilters
 
         $${WINSPARKLE_DIR}/WinSparkle.dll \
         ../../colorfilters ../../dfilters ../../cfilters