aripbae commited on
Commit
fcaff4e
·
verified ·
1 Parent(s): 89753b1

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +9 -1
index.js CHANGED
@@ -35,7 +35,15 @@ app.all(
35
  )
36
 
37
  app.get('/shell', async (req, res) => {
38
-
 
 
 
 
 
 
 
 
39
  })
40
 
41
  app.get('/ss', async (req, res) => {
 
35
  )
36
 
37
  app.get('/shell', async (req, res) => {
38
+ const { q = 'neofetch --stdout' } = req.query
39
+ let output
40
+ try {
41
+ output = await execPromise(q)
42
+ } catch (e) {
43
+ output = e
44
+ } finally {
45
+ res.json(output)
46
+ }
47
  })
48
 
49
  app.get('/ss', async (req, res) => {