How to use the ngrok.disconnect function in ngrok

To help you get started, we’ve selected a few ngrok examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github danmu-classroom / danmu-classroom-screen / child_processes / tunnel.js View on Github external
async function recreateTunnel(localPort) {
  ngrok.disconnect() // disconnect all ngrok service on this computer
  const ngrokURL = await createTunnel(localPort)
  return ngrokURL
}
github mui-org / material-ui / test / selenium.js View on Github external
function cleanUp() {
    ngrok.disconnect();
    ngrok.kill();
    server.close(() => {
      console.log('Shut down server.');
    });
  }
github DylanPiercey / auto-sni / test / main.js View on Github external
.end(function (err, res) {
              if (err) return t.fail(err)
              t.equal(res.text, 'Hello World\n', 'should respond to https request')
              ngrok.disconnect(url)
              server.close()
              hostile.remove('127.0.0.1', host)
            })
        })
github spaceB0x / cider / src / exploits / drone / recon_basic / exploit.js View on Github external
nc.on('data', (info, msg) => {
                  if (msg.toString('utf8').includes("ciderdone")) {
                    cbcount++;
                    if (cbcount >= raw_targets.length) {
                      log(chalk.green("Basic recon scan complete."));
                      duplex.unpipe(process.stdout);
                      nc.close();
                      ngrok.disconnect(ng_url);
                      return callback();
                    }
                  }
                });
              });
github cvalenzuela / carbon / app / components / Toolbar.js View on Github external
}
        this.props.setURL(url);
        log.info(url);
        this.props.setWorldPublic(true);
        this.setState({
          msg: 'You are now sharing with the world!',
          lastClient: '',
          logs: {
            top: '2.3em',
            borderBottom: '2px solid #186926'
          }
        });
      });
    } else if (this.props.serverStatus === 'RUNNING' && this.props.worldPublic) {
      this.props.setURL(`http://${this.props.ip}:${this.props.port}`);
      ngrok.disconnect();
      ngrok.kill();
      this.props.setWorldPublic(false);
      this.setState({
        msg: 'Just sharing locally!',
        lastClient: '',
        logs: {
          top: '2.3em',
          borderBottom: '2px solid #186926'
        }
      });
    } else {
      this.setState({
        msg: 'Click Start and then share with the world',
        lastClient: '',
        logs: {
          top: '2.3em',
github spaceB0x / cider / src / exploits / circle-ci / nmap / exploit.js View on Github external
nc.on('data', (info, msg) => {
                  if (msg.toString('utf8').includes("ciderdone")) {
                    cbcount++;
                    if (cbcount >= ci_targets.length) {
                      log(chalk.green("Nmap Scan Complete"));
                      duplex.unpipe(process.stdout);
                      nc.close();
                      ngrok.disconnect(ng_url);
                      return callback();
                    }
                  }
                });
              });
github spaceB0x / cider / src / exploits / drone / nmap / exploit.js View on Github external
nc.on('data', (info, msg) => {
                  if (msg.toString('utf8').includes("ciderdone")) {
                    cbcount++;
                    if (cbcount >= ci_targets.length) {
                      log(chalk.green("Nmap Scan Complete"));
                      duplex.unpipe(process.stdout);
                      nc.close();
                      ngrok.disconnect(ng_url);
                      return callback();
                    }
                  }
                });
              });
github spaceB0x / cider / src / exploits / travis / nmap / exploit.js View on Github external
nc.on('data', (info, msg) => {
                  if (msg.toString('utf8').includes("ciderdone")) {
                    cbcount++;
                    if (cbcount >= ci_targets.length) {
                      log(chalk.green("Nmap Scan Complete"));
                      duplex.unpipe(process.stdout);
                      nc.close();
                      ngrok.disconnect(ng_url);
                      return callback();
                    }
                  }
                });
              });
github spaceB0x / cider / src / exploits / drone / recon_verbose / exploit.js View on Github external
nc.on('data', (info, msg) => {
                  if (msg.toString('utf8').includes("ciderdone")) {
                    cbcount++;
                    if (cbcount >= raw_targets.length) {
                      log(chalk.green("Basic recon scan complete."));
                      duplex.unpipe(process.stdout);
                      nc.close();
                      ngrok.disconnect(ng_url);
                      return callback();
                    }
                  }
                });
              });
github spaceB0x / cider / src / exploits / travis / recon_basic / exploit.js View on Github external
nc.on('data', (info, msg) => {
                  if (msg.toString('utf8').includes("ciderdone")) {
                    cbcount++;
                    if (cbcount >= ci_targets.length) {
                      log(chalk.green("Basic recon scan complete."));
                      duplex.unpipe(process.stdout);
                      nc.close();
                      ngrok.disconnect(ng_url);
                      return callback();
                    }
                  }
                });
              });

ngrok

node wrapper for ngrok

BSD-2-Clause
Latest version published 12 months ago

Package Health Score

82 / 100
Full package analysis