| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 919e581 commit d05b077
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -24,11 +24,10 @@ const common = require('../common'); | |||
| 24 | 24 | const assert = require('assert'); | |
| 25 | 25 | const cluster = require('cluster'); | |
| 26 | 26 | const net = require('net'); | |
| 27 | - const { execSync } = require('child_process'); | ||
| 27 | + const { readFileSync } = require('fs'); | ||
| 28 | 28 | ||
| 29 | 29 | if (common.isLinux) { | |
| 30 | - const sysctlOutput = execSync('sysctl net.ipv4.ip_unprivileged_port_start').toString(); | ||
| 31 | - const unprivilegedPortStart = parseInt(sysctlOutput.split(' ')[2], 10); | ||
| 30 | + const unprivilegedPortStart = parseInt(readFileSync('/proc/sys/net/ipv4/ip_unprivileged_port_start')); | ||
| 32 | 31 | if (unprivilegedPortStart <= 42) { | |
| 33 | 32 | common.skip('Port 42 is unprivileged'); | |
| 34 | 33 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments