networkConnections() fixed linux (debian) issue
This commit is contained in:
parent
c7409fcf15
commit
5723e81e81
@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page.
|
||||
|
||||
| Version | Date | Comment |
|
||||
| -------------- | -------------- | -------- |
|
||||
| 4.21.2 | 2020-02-11 | `networkConnections()` fixed linux (debian) issue |
|
||||
| 4.21.1 | 2020-01-31 | `networkGatewayDefault()` fixed windows 7 issue |
|
||||
| 4.21.0 | 2020-01-27 | `npx` compatibility |
|
||||
| 4.20.1 | 2020-01-26 | `battery()` code refactoring, cleanup, updated docs |
|
||||
|
||||
@ -83,6 +83,11 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">4.21.2</th>
|
||||
<td>2020-01-31</td>
|
||||
<td><span class="code">networkConnections()</span> fixed linux (debian) issue</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">4.21.1</th>
|
||||
<td>2020-01-31</td>
|
||||
|
||||
@ -168,7 +168,7 @@
|
||||
<img class="logo" src="assets/logo.png">
|
||||
<div class="title">systeminformation</div>
|
||||
<div class="subtitle"><span id="typed"></span></div>
|
||||
<div class="version">Current Version: <span id="version">4.21.1</span></div>
|
||||
<div class="version">Current Version: <span id="version">4.21.2</span></div>
|
||||
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
|
||||
</div>
|
||||
<div class="down">
|
||||
@ -206,7 +206,7 @@
|
||||
<div class="title">Downloads last month</div>
|
||||
</div>
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
|
||||
<div class="numbers">244</div>
|
||||
<div class="numbers">248</div>
|
||||
<div class="title">Dependends</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1132,8 +1132,8 @@ function networkConnections(callback) {
|
||||
let cmd = 'export LC_ALL=C; netstat -tunap | grep "ESTABLISHED\\|SYN_SENT\\|SYN_RECV\\|FIN_WAIT1\\|FIN_WAIT2\\|TIME_WAIT\\|CLOSE\\|CLOSE_WAIT\\|LAST_ACK\\|LISTEN\\|CLOSING\\|UNKNOWN"; unset LC_ALL';
|
||||
if (_freebsd || _openbsd || _netbsd) cmd = 'export LC_ALL=C; netstat -na | grep "ESTABLISHED\\|SYN_SENT\\|SYN_RECV\\|FIN_WAIT1\\|FIN_WAIT2\\|TIME_WAIT\\|CLOSE\\|CLOSE_WAIT\\|LAST_ACK\\|LISTEN\\|CLOSING\\|UNKNOWN"; unset LC_ALL';
|
||||
exec(cmd, { maxBuffer: 1024 * 20000 }, function (error, stdout) {
|
||||
if (!error) {
|
||||
let lines = stdout.toString().split('\n');
|
||||
let lines = stdout.toString().split('\n');
|
||||
if (!error && (lines.length > 1 || lines[0] != '')) {
|
||||
lines.forEach(function (line) {
|
||||
line = line.replace(/ +/g, ' ').split(' ');
|
||||
if (line.length >= 7) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user