From ba12212a456c8e5581d7e4a5048094a06e2158e2 Mon Sep 17 00:00:00 2001 From: "Michael Hirsch, Ph.D" Date: Sun, 17 Feb 2019 12:26:02 -0500 Subject: [PATCH] update matlab api [skip ci] vers bump [skip ci] --- findssh.m | 15 ++++++--------- setup.cfg | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/findssh.m b/findssh.m index 1d64a2e..4bc81f7 100644 --- a/findssh.m +++ b/findssh.m @@ -1,8 +1,8 @@ -function findssh(port, service, timeout, baseip) +function hosts = findssh(port, service, timeout) %% FINDSSH find SSH or other servers on an IPv4 subnet % -% must first do one-time install in Python 3.6 from Terminal: -% pip install -e . +% must first do one-time install in Python 3 from Terminal: +% python3 -m pip install -e . % % example (find all SSH servers on IPv4 subnet on Port 22): % findssh() @@ -12,17 +12,14 @@ function findssh(port, service, timeout, baseip) if nargin < 1, port=22; end if nargin < 2, service = ''; end if nargin < 3, timeout = 0.1; end -if nargin < 4, baseip = ''; end - validateattributes(port, {'numeric'}, {'integer', 'nonnegative'}) validateattributes(service, {'string', 'char'}, {'scalartext'}) validateattributes(timeout, {'numeric'}, {'real', 'nonnegative'}) -validateattributes(baseip, {'string', 'char'}, {'scalartext'}) % Matlab R2018b didn't like ThreadPoolExectutor -servers = py.findssh.run(uint16(port), service, timeout, baseip, true); +servers = py.findssh.main('', port, service, timeout); hosts = cellfun(@char, cell(servers), 'uniformoutput', false); -disp(hosts) -end \ No newline at end of file + +end diff --git a/setup.cfg b/setup.cfg index 1666ce4..360622a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = findssh -version = 1.1.0.1 +version = 1.2.0 author = Michael Hirsch, Ph.D. url = https://github.com/scivision/findssh description = find open servers on your IPv4 subnet, e.g. SSH