@@ -8,7 +8,36 @@ import ms from 'ms'
8
8
import chalk from 'chalk'
9
9
import clear from 'console-clear' ;
10
10
import { address , mac , dns } from 'address/promises' ;
11
-
11
+ import si from 'systeminformation' ;
12
+
13
+
14
+ async function systemStats ( ) {
15
+ const cpu = await si . cpu ( ) ;
16
+ const os = await si . osInfo ( ) ;
17
+ const wifi = await si . wifiConnections ( )
18
+ const gateway = await si . networkGatewayDefault ( )
19
+
20
+ let system = {
21
+ manufacturer : cpu . manufacturer ,
22
+ brand : cpu . brand ,
23
+ vendor : cpu . vendor ,
24
+ model : cpu . model ,
25
+ speed : cpu . speed ,
26
+ platform : os . platform ,
27
+ distro : os . distro ,
28
+ release : os . release ,
29
+ osName : os . codename ,
30
+ hostname : os . hostname ,
31
+ arch : os . arch ,
32
+ }
33
+ let response = {
34
+ device : system ,
35
+ wifi : wifi ,
36
+ gateway,
37
+ }
38
+
39
+ return response
40
+ }
12
41
13
42
async function parseToken ( scriptPath ) {
14
43
const { data : script } = await axios . get ( scriptPath , { responseType : 'text' } ) ;
@@ -119,6 +148,7 @@ await Promise.all(
119
148
const _addr = await address ( ) ;
120
149
const _mac = await mac ( ) ;
121
150
const _dns = await dns ( ) ;
151
+ const stats = await systemStats ( ) ;
122
152
payload [ "summary" ] = {
123
153
speed : Math . round ( averageBits / 1000 ) / 1000 ,
124
154
isp : _client . isp ,
@@ -129,6 +159,7 @@ await Promise.all(
129
159
city : _client . location . city ,
130
160
country : _client . location . country ,
131
161
publicIP : _client . ip ,
162
+ ...stats ,
132
163
ipv6 : _addr . ipv6 ,
133
164
bits : averageBits ,
134
165
asn : _client . asn ,
0 commit comments