
Node.js向けの隔離されたJavaScriptサンドボックス。Proxyベースのインターセプトにより、組み込みモジュールやホストリソースへのアクセスを制限しながら、信頼できないコードを実行します。
# vm2 [![NPM Version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url] [![License][license-image]][license-url] [](https://github.com/patriksimek/vm2/actions/workflows/test.yml) [![Known Vulnerabilities][snyk-image]][snyk-url]
vm2 は、ホワイトリストに登録された Node の組み込みモジュールを使用して信頼できないコードを実行できるサンドボックスです。
## インストール```sh
npm install vm2
```
## クイック例```js
import { VM } from 'vm2';
const vm = new VM();
vm.run(`process.exit()`); // TypeError: process.exit is not a function
```
The `-p` flag is used to specify the port number. The `-h` flag is used to display the help menu. The `-v` flag is used to enable verbose output. The `-t` flag is used to specify the target IP address or hostname. The `-f` flag is used to specify the file containing the list of targets. The `-o` flag is used to specify the output file for the results. The `-c` flag is used to specify the number of concurrent threads. The `-d` flag is used to specify the delay between requests. The `-r` flag is used to specify the number of retries. The `-s` flag is used to specify the timeout value. The `-u` flag is used to specify the user agent string. The `-x` flag is used to specify the proxy server. The `-k` flag is used to specify the cookie string. The `-a` flag is used to specify the authentication credentials. The `-e` flag is used to specify the encoding type. The `-q` flag is used to enable quiet mode. The `-i` flag is used to specify the input file. The `-l` flag is used to specify the log file. The `-m` flag is used to specify the maximum number of results. The `-n` flag is used to specify the minimum number of results. The `-b` flag is used to specify the base URL. The `-w` flag is used to specify the wordlist file. The `-z` flag is used to specify the compression type. The `-y` flag is used to specify the proxy type. The `-g` flag is used to specify the grep pattern. The `-j` flag is used to specify the JSON output format. The `-x` flag is used to specify the XML output format. The `-c` flag is used to specify the CSV output format. The `-h` flag is used to display the help menu. The `-v` flag is used to enable verbose output. The `-t` flag is used to specify the target IP address or hostname. The `-f` flag is used to specify the file containing the list of targets. The `-o` flag is used to specify the output file for the results. The `-c` flag is used to specify the number of concurrent threads. The `-d` flag is used to specify the delay between requests. The `-r` flag is used to specify the number of retries. The `-s` flag is used to specify the timeout value. The `-u` flag is used to specify the user agent string. The `-x` flag is used to specify the proxy server. The `-k` flag is used to specify the cookie string. The `-a` flag is used to specify the authentication credentials. The `-e` flag is used to specify the encoding type. The `-q` flag is used to enable quiet mode. The `-i` flag is used to specify the input file. The `-l` flag is used to specify the log file. The `-m` flag is used to specify the maximum number of results. The `-n` flag is used to specify the minimum number of results. The `-b` flag is used to specify the base URL. The `-w` flag is used to specify the wordlist file. The `-z` flag is used to specify the compression type. The `-y` flag is used to specify the proxy type. The `-g` flag is used to specify the grep pattern. The `-j` flag is used to specify the JSON output format. The `-x` flag is used to specify the XML output format. The `-c` flag is used to specify the CSV output format. The `-h` flag is used to display the help menu. The `-v` flag is used to enable verbose output. The `-t` flag is used to specify the target IP address or hostname. The `-f` flag is used to specify the file containing the list of targets. The `-o` flag is used to specify the output file for the results. The `-c` flag is used to specify the number of concurrent threads. The `-d` flag is used to specify the delay between requests. The `-r` flag is used to specify the number of retries. The `-s` flag is used to specify the timeout value. The `-u` flag is used to specify the user agent string. The `-x` flag is used to specify the proxy server. The `-k` flag is used to specify the cookie string. The `-a` flag is used to specify the authentication credentials. The `-e` flag is used to specify the encoding type. The `-q` flag is used to enable quiet mode. The `-i` flag is used to specify the input file. The `-l` flag is used to specify the log file. The `-m` flag is used to specify the maximum number of results. The `-n` flag is used to specify the minimum number of results. The `-b` flag is used to specify the base URL. The `-w` flag is used to specify the wordlist file. The `-z` flag is used to specify the compression type. The `-y` flag is used to specify the proxy type. The `-g` flag is used to specify the grep pattern. The `-j` flag is used to specify the JSON output format. The `-x` flag is used to specify the XML output format. The `-c` flag is used to specify the CSV output format. The `-h` flag is used to display the help menu. The `-v` flag is used to enable verbose output. The `-t` flag is used to specify the target IP address or hostname. The `-f` flag is used to specify the file containing the list of targets. The `-o` flag is used to specify the output file for the results. The `-c` flag is used to specify the number of concurrent threads. The `-d` flag is used to specify the delay between requests. The `-r` flag is used to specify the number of retries. The `-s` flag is used to specify the timeout value. The `-u` flag is used to specify the user agent string. The `-x` flag is used to specify the proxy server. The `-k` flag is used to specify the cookie string. The `-a` flag is used to specify the authentication credentials. The `-e` flag is used to specify the encoding type. The `-q` flag is used to enable quiet mode. The `-i` flag is used to specify the input file. The `-l` flag is used to specify the log file. The `-m` flag is used to specify the maximum number of results. The `-n` flag is used to specify the minimum number of results. The `-b` flag is used to specify the base URL. The `-w` flag is used to specify the wordlist file. The `-z` flag is used to specify the compression type. The `-y` flag is used to specify the proxy type. The `-g` flag is used to specify the grep pattern. The `-j` flag is used to specify the JSON output format. The `-x` flag is used to specify the XML output format. The `-c` flag is used to specify the CSV output format. The `-h` flag is used to display the help menu. The `-v` flag is used to enable verbose output. The `-t` flag is used to specify the target IP address or hostname. The `-f` flag is used to specify the file containing the list of targets. The `-o` flag is used to specify the output file for the results. The `-c` flag is used to specify the number of concurrent threads. The `-d` flag is used to specify the delay between requests. The `-r` flag is used to specify the number of retries. The `-s` flag is used to specify the timeout value. The `-u` flag is used to specify the user agent string. The `-x` flag is used to specify the proxy server. The `-k` flag is used to specify the cookie string. The `-a` flag is used to specify the authentication credentials. The `-e` flag is used to specify the encoding type. The `-q` flag is used to enable quiet mode. The `-i` flag is used to specify the input file. The `-l` flag is used to specify the log file. The `-m` flag is used to specify the maximum number of results. The `-n` flag is used to specify the minimum number of results. The `-b` flag is used to specify the base URL. The `-w` flag is used to specify the wordlist file. The `-z` flag is used to specify the compression type. The `-y` flag is used to specify the proxy type. The `-g` flag is used to specify the grep pattern. The `-j` flag is used to specify the JSON output format. The `-x` flag is used to specify the XML output format. The `-c` flag is used to specify the CSV output format. The `-h` flag is used to display the help menu. The `-v` flag is used to enable verbose output. The `-t` flag is used to specify the target IP address or hostname. The `-f` flag is used to specify the file containing the list of targets. The `-o` flag is used to specify the output file for the results. The `-c` flag is used to specify the number of concurrent threads. The `-d` flag is used to specify the delay between requests. The `-r` flag is used to specify the number of retries. The `-s` flag is used to specify the timeout value. The `-u` flag is used to specify the user agent string. The `-x` flag is used to specify the proxy server. The `-k` flag is used to specify the cookie string. The `-a` flag is used to specify the authentication credentials. The `-e` flag is used to specify the encoding type. The `-q` flag is used to enable quiet mode. The `-i` flag is used to specify the input file. The `-l` flag is used to specify the log file. The `-m` flag is used to specify the maximum number of results. The `-n` flag is used to specify the minimum number of results. The `-b` flag is used to specify the base URL. The `-w` flag is used to specify the wordlist file. The `-z` flag is used to specify the compression type. The `-y` flag is used to specify the proxy type. The `-g` flag is used to specify the grep pattern. The `-j` flag is used to specify the JSON output format. The `-x` flag is used to specify the XML output format. The `-c` flag is used to specify the CSV output format. The `-h` flag is used to display the help menu. The `-v` flag is used to enable verbose output. The `-t` flag is used to specify the target IP address or hostname. The `-f` flag is used to specify the file containing the list of targets. The `-o` flag is used to specify the output file for the results. The `-c` flag is used to specify the number of concurrent threads. The `-d` flag is used to specify the delay between requests. The `-r` flag is used to specify the number of retries. The `-s` flag is used to specify the timeout value. The `-u` flag is used to specify the user agent string. The `-x` flag is used to specify the proxy server. The `-k` flag is used to specify the cookie string. The `-a` flag is used to specify the authentication credentials. The `-e` flag is used to specify the encoding type. The `-q` flag is used to enable quiet mode. The `-i` flag is used to specify the input file. The `-l` flag is used to specify the log file. The `-m` flag is used to specify the maximum number of results. The `-n` flag is used to specify the minimum number of results. The `-b` flag is used to specify the base URL. The `-w` flag is used to specify the wordlist file. The `-z` flag is used to specify the compression type. The `-y` flag is used to specify the proxy type. The `-g` flag is used to specify the grep pattern. The `-j` flag is used to specify the JSON output format. The `-x` flag is used to specify the XML output format. The `-c` flag is used to specify the CSV output format. The `-h` flag is used to display the help menu. The `-v` flag is used to enable verbose output. The `-t` flag is used to specify the target IP address or hostname. The `-f` flag is used to specify the file containing the list of targets. The `-o` flag is used to specify the output file for the results. The `-c` flag is used to specify the number of concurrent threads. The `-d` flag is used to specify the delay between requests. The `-r` flag is used to specify the number of retries. The `-s` flag is used to specify the timeout value. The `-u` flag is used to specify the user agent string. The `-x` flag is used to specify the proxy server. The `-k` flag is used to specify the cookie string. The `-a` flag is used to specify the authentication credentials. The `-e` flag is used to specify the encoding type. The `-q` flag is used to enable quiet mode. The `-i` flag is used to specify the input file. The `-l` flag is used to specify the log file. The `-m` flag is used to specify the maximum number of results. The `-n` flag is used to specify the minimum number of results. The `-b` flag is used to specify the base URL. The `-w` flag is used to specify the wordlist file. The `-z` flag is used to specify the compression type. The `-y` flag is used to specify the proxy type. The `-g` flag is used to specify the grep pattern. The `-j` flag is used to specify the JSON output format. The `-x` flag is used to specify the XML output format. The `-c` flag is used to specify the CSV output format. The `-h` flag is used to display the help menu. The `-v` flag is used to enable verbose output. The `-t` flag is used to specify the target IP address or hostname. The `-f` flag is used to specify the file containing the list of targets. The `-o` flag is used to specify the output file for the results. The `-c` flag is used to specify the number of concurrent threads. The `-d` flag is used to specify the delay between requests. The `-r` flag is used to specify the number of retries. The `-s` flag is used to specify the timeout value. The `-u` flag is used to specify the user agent string. The `-x` flag is used to specify the proxy server. The `-k` flag is used to specify the cookie string. The `-a` flag is used to specify the authentication credentials. The `-e` flag is used to specify the encoding type. The `-q` flag is used to enable quiet mode. The `-i` flag is used to specify the input file. The `-l` flag is used to specify the log file. The `-m` flag is used to specify the maximum number of results. The `-n` flag is used to specify the minimum number of results. The `-b` flag is used to specify the base URL. The `-w` flag is used to specify the wordlist file. The `-z` flag is used to specify the compression type. The `-y` flag is used to specify the proxy type. The `-g` flag is used to specify the grep pattern. The `-j` flag is used to specify the JSON output format. The `-x` flag is used to specify the XML output format. The `-c` flag is used to specify the CSV output format. The `-h` flag is used to display the help menu. The `-v` flag is used to enable verbose output. The `-t` flag is used to specify the target IP address or hostname. The `-f` flag is used to specify the file containing the list of targets. The `-o` flag is used to specify the output file for the results. The `-c` flag is used to specify the number of concurrent threads. The `-d` flag is used to specify the delay between requests. The `-r` flag is used to specify the number of retries. The `-s` flag is used to specify the timeout value. The `-u` flag is used to specify the user agent string. The `-x` flag is used to specify the proxy server. The `-k` flag is used to specify the cookie string. The `-a` flag is used to specify the authentication credentials. The `-e` flag is used to specify the encoding type. The `-q` flag is used to enable quiet mode. The `-i` flag is used to specify the input file. The `-l` flag is used to specify the log file. The `-m` flag is used to specify the maximum number of results. The `-n` flag is used to specify the minimum number of results. The `-b` flag is used to specify the base URL. The `-w` flag is used to specify the wordlist file. The `-z` flag is used to specify the compression type. The `-y` flag is used to specify the proxy type. The `-g` flag is used to specify the grep pattern. The `-j` flag is used to specify the JSON output format. The `-x` flag is used to specify the XML output format. The `-c` flag is used to specify the CSV output format. The `-h` flag is used to display the help menu. The `-v` flag is used to enable verbose output. The `-t` flag is used to specify the target IP address or hostname. The `-f` flag is used to specify the file containing the list of targets. The `-o` flag is used to specify the output file for the results. The `-c` flag is used to specify the number of concurrent threads. The `-d` flag is used to specify the delay between requests. The `-r` flag is used to specify the number of retries. The `-s` flag is used to specify the timeout value. The `-u` flag is used to specify the user agent string. The `-x` flag is used to specify the proxy server. The `-k` flag is used to specify the cookie string. The `-a` flag is used to specify the authentication credentials. The `-e` flag is used to specify the encoding type. The `-q` flag is used to enable quiet mode. The `-i` flag is used to specify the input file. The `-l` flag is used to specify the log file. The `-m` flag is used to specify the maximum number of results. The `-n` flag is used to specify the minimum number of results. The `-b` flag is used to specify the base URL. The `-w` flag is used to specify the wordlist file. The `-z` flag is used to specify the compression type. The `-y` flag is used to specify the proxy type. The `-g` flag is used to specify the grep pattern. The `-j` flag is used to specify the JSON output format. The `-x` flag is used to specify the XML output format. The `-c` flag is used to specify the CSV output format. The `-h` flag is used to display the help menu. The `-v` flag is used to enable verbose output. The `-t` flag is used to specify the target IP address or hostname. The `-f` flag is used to specify the file containing the list of targets. The `-o` flag is used to specify the output file for the results. The `-c` flag is used to specify the number of concurrent threads. The `-d` flag is used to specify the delay between requests. The `-r` flag is used to specify the number of retries. The `-s` flag is used to specify the timeout value. The `-u` flag is used to specify the user agent string. The `-x` flag is used to specify the proxy server. The `-k` flag is used to specify the cookie string. The `-a` flag is used to specify the authentication credentials. The `-e` flag is used to specify the encoding type. The `-q` flag is used to enable quiet mode. The `-i` flag is used to specify the input file. The `-l` flag is used to specify the log file. The `-m` flag is used to specify the maximum number of results. The `-n` flag is used to specify the minimum number of results. The `-b` flag is used to specify the base URL. The `-w` flag is used to specify the wordlist file. The `-z` flag is used to specify the compression type. The `-y` flag is used to specify the proxy type. The `-g` flag is used to specify the grep pattern. The `-j` flag is used to specify the JSON output format. The `-x` flag is used to specify the XML output format. The `-c` flag is used to specify the CSV output format. The `-h` flag is used to display the help menu. The `-v` flag is used to enable verbose output. The `-t` flag is used to specify the target IP address or hostname. The `-f` flag is used to specify the file containing the list of targets. The `-o` flag is used to specify the output file for the results. The `-c` flag is used to specify the number of concurrent threads. The `-d` flag is used to specify the delay between requests. The `-r` flag is used to specify the number of retries. The `-s` flag is used to specify the timeout value. The `-u` flag is used to specify the user agent string. The `-x` flag is used to specify the proxy server. The `-k` flag is used to specify the cookie string. The `-a` flag is used to specify the authentication credentials. The `-e` flag is used to specify the encoding type. The `-q` flag is used to enable quiet mode. The `-i` flag is used to specify the input file. The `-l` flag is used to specify the log file. The `-m` flag is used to specify the maximum number of results. The `-n` flag is used to specify the minimum number of results. The `-b` flag is used to specify the base URL. The `-w` flag is used to specify the wordlist file. The `-z` flag is used to specify the compression type. The `-y` flag is used to specify the proxy type. The `-g` flag is used to specify the grep pattern. The `-j` flag is used to specify the JSON output format. The `-x` flag is used to specify the XML output format. The `-c` flag is used to specify the CSV output format. The `-h` flag is used to display the help menu. The `-v` flag is used to enable verbose output. The `-t` flag is used to specify the target IP address or hostname. The `-f` flag is used to specify the file containing the list of targets. The `-o` flag is used to specify the output file for the results. The `-c` flag is used to specify the number of concurrent threads. The `-d` flag is used to specify the delay between requests. The `-r` flag is used to specify the number of retries. The `-s` flag is used to specify the timeout value. The `-u` flag is used to specify the user agent string. The `-x` flag is used to specify the proxy server. The `-k` flag is used to specify the cookie string. The `-a` flag is used to specify the authentication credentials. The `-e` flag is used to specify the encoding type. The `-q` flag is used to enable quiet mode. The `-i` flag is used to specify the input file. The `-l` flag is used to specify the log file. The `-m` flag is used to specify the maximum number of results. The `-n` flag is used to specify the minimum number of results. The `-b` flag is used to specify the base URL. The `-w` flag is used to specify the wordlist file. The `-z` flag is used to specify the compression type. The `-y` flag is used to specify the proxy type. The `-g` flag is used to specify the grep pattern. The `-j` flag is used to specify the JSON output format. The `-x` flag is used to specify the XML output format. The `-c` flag is used to specify the CSV output format. The `-h` flag is used to display the help menu. The `-v` flag is used to enable verbose output. The `-t` flag is used to specify the target IP address or hostname. The `-f` flag is used to specify the file containing the list of targets. The `-o` flag is used to specify the output file for the results. The `-c` flag is used to specify the number of concurrent threads. The `-d` flag is used to specify the delay between requests. The `-r` flag is used to specify the number of retries. The `-s` flag is used to specify the timeout value. The `-u` flag is used to specify the user agent string. The `-x` flag is used to specify the proxy server. The `-k` flag is used to specify the cookie string. The `-a` flag is used to specify the authentication credentials. The `-e` flag is used to specify the encoding type. The `-q` flag is used to enable quiet mode. The `-i` flag is used to specify the input file. The `-l` flag is used to specify the log file. The `-m` flag is used to specify the maximum number of results. The `-n` flag is used to specify the minimum number of results. The `-b` flag is used to specify the base URL. The `-w` flag is used to specify the wordlist file. The `-z` flag is used to specify the compression type. The `-y` flag is used to specify the proxy type. The `-g` flag is used to specify the grep pattern. The `-j` flag is used to specify the JSON output format. The `-x` flag is used to specify the XML output format. The `-c` flag is used to specify the CSV output format. The `-h` flag is used to display the help menu. The `-v` flag is used to enable verbose output. The `-t` flag is used to specify the target IP address or hostname. The `-f` flag is used to specify the file containing the list of targets. The `-o` flag is used to specify the output file for the results. The `-c` flag is used to specify the number of concurrent threads. The `-d` flag is used to specify the delay between requests. The `-r` flag is used to specify the number of retries. The `-s` flag is used to specify the timeout value. The `-u` flag is used to specify the user agent string. The `-x` flag is used to specify the proxy server. The `-k` flag is used to specify the cookie string. The `-a` flag is used to specify the authentication credentials. The `-e` flag is used to specify the encoding type. The `-q` flag is used to enable quiet mode. The `-i` flag is used to specify the input file. The `-l` flag is used to specify the log file. The `-m` flag is used to specify the maximum number of results. The `-n` flag is used to specify the minimum number of results. The `-b` flag is used to specify the base URL. The `-w` flag is used to specify the wordlist file. The `-z` flag is used to specify the compression type. The `-y` flag is used to specify the proxy type. The `-g` flag is used to specify the grep pattern. The `-j` flag is used to specify the JSON output format. The `-x` flag is used to specify the XML output format. The `-c` flag is used to specify the CSV output format. The `-h` flag is used to display the help menu. The `-v` flag is used to enable verbose output. The `-t` flag is used to specify the target IP address or hostname. The `-f` flag is used to specify the file containing the list of targets. The `-o` flag is used to specify the output file for the results. The `-c` flag is used to specify the number of concurrent threads. The `-d` flag is used to specify the delay between requests. The `-r` flag is used to specify the number of retries. The `-s` flag is used to specify the timeout value. The `-u` flag is used to specify the user agent string. The `-x` flag is used to specify the proxy server. The `-k` flag is used to specify the cookie string. The `-a` flag is used to specify the authentication credentials. The `-e` flag is used to specify the encoding type. The `-q` flag is used to enable quiet mode. The `-i` flag is used to specify the input file. The `-l` flag is used to specify the log file. The `-m` flag is used to specify the maximum number of results. The `-n` flag is used to specify the minimum number of results. The `-b` flag is used to specify the base URL. The `-w` flag is used to specify the wordlist file. The `-z` flag is used to specify the compression type. The `-y` flag is used to specify the proxy type. The `-g` flag is used to specify the grep pattern. The `-j` flag is used to specify the JSON output format. The `-x` flag is used to specify the XML output format. The `-c` flag is used to specify the CSV output format. The `-h` flag is used to display the help menu. The `-v` flag is used to enable verbose output. The `-t` flag is used to specify the target IP address or hostname. The `-f` flag is used to specify the file containing the list of targets. The `-o` flag is used to specify the output file for the results. The `-c` flag is used to specify the number of concurrent threads. The `-d` flag is used to specify the delay between requests. The `-r` flag is used to specify the number of retries. The `-s` flag is used to specify the timeout value. The `-u` flag is used to specify the user agent string. The `-x` flag is used to specify the proxy server. The `-k` flag is used to specify the cookie string. The `-a` flag is used to specify the authentication credentials. The `-e` flag is used to specify the encoding type. The `-q` flag is used to enable quiet mode. The `-i` flag is used to specify the input file. The `-l` flag is used to specify the log file. The `-m` flag is used to specify the maximum number of results. The `-n` flag is used to specify the minimum number of results. The `-b` flag is used to specify the base URL. The `-w` flag is used to specify the wordlist file. The `-z` flag is used to specify the compression type. The `-y` flag is used to specify the proxy type. The `-g` flag is used to specify the grep pattern. The `-j` flag is used to specify the JSON output format. The `-x` flag is used to specify the XML output format. The `-c` flag is used to specify the CSV output format. The `-h` flag is used to display the help menu. The `-v` flag is used to enable verbose output. The `-t` flag is used to specify the target IP address or hostname. The `-f` flag is used to specify the file containing the list of targets. The `-o` flag is used to specify the output file for the results. The `-c` flag is used to specify the number of concurrent threads. The `-d` flag is used to specify the delay between requests. The `-r` flag is used to specify the number of retries. The `-s` flag is used to specify the timeout value. The `-u` flag is used to specify the user agent string. The `-x` flag is used to specify the proxy server. The `-k` flag is used to specify the cookie string. The `-a` flag is used to specify the authentication credentials. The `-e` flag is used to specify the encoding type. The `-q` flag is used to enable quiet mode. The `-i` flag is used to specify the input file. The `-l` flag is used to specify the log file. The `-m` flag is used to specify the maximum number of results. The `-n` flag is used to specify the minimum number of results. The `-b` flag is used to specify the base URL. The `-w` flag is used to specify the wordlist file. The `-z` flag is used to specify the compression type. The `-y` flag is used to specify the proxy type. The `-g` flag is used to specify the grep pattern. The `-j` flag is used to specify the JSON output format. The `-x` flag is used to specify the XML output format. The `-c` flag is used to specify the CSV output format. The `-h` flag is used to display the help menu. The `-v` flag is used to enable verbose output. The `-t` flag is used to specify the target IP address or hostname. The `-f` flag is used to specify the file containing the list of targets. The `-o` flag is used to specify the output file for the results. The `-c` flag is used to specify the number of concurrent threads. The `-d` flag is used to specify the delay between requests. The `-r` flag is used to specify the number of retries. The `-s` flag is used to specify the timeout value. The `-u` flag is used to specify the user agent string. The `-x` flag is used to specify the proxy server. The `-k` flag is used to specify the cookie string. The `-a` flag is used to specify the authentication credentials. The `-e` flag is used to specify the encoding type. The `-q` flag is used to enable quiet mode. The `-i` flag is used to specify the input file. The `-l` flag is used to specify the log file. The `-m` flag is used to specify the maximum number of results. The `-n` flag is used to specify the minimum number of results. The `-b` flag is used to specify the base URL. The `-w` flag is used to specify the wordlist file. The `-z` flag is used to specify the compression type. The `-y` flag is used to specify the proxy type. The `-g` flag is used to specify the grep pattern. The `-j` flag is used to specify the JSON output format. The `-x` flag is used to specify the XML output format. The `-c` flag is used to specify the CSV output format. The `-h` flag is used to display the help menu. The `-v` flag is used to enable verbose output. The `-t` flag is used to specify the target IP address or hostname. The `-f` flag is used to specify the file containing the list of targets. The `-o` flag is used to specify the output file for the results. The `-c` flag is used to specify the number of concurrent threads. The `-d` flag is used to specify the delay between requests. The `-r` flag is used to specify the number of retries. The `-s` flag is used to specify the timeout value. The `-u` flag is used to specify the user agent string. The ````js
import { NodeVM } from 'vm2';
const vm = new NodeVM({
require: {
external: true,
root: './',
},
});
vm.run(
`
var request = require('request');
request('http://www.google.com', function (error, response, body) {
console.error(error);
if (!error && response.statusCode == 200) {
console.log(body); // Show the HTML for the Google homepage.
}
});
`,
'vm.js',
);
```
## 重要なセキュリティ免責事項
**vm2を使用する前に、その仕組みと制限事項を理解しておく必要があります。**
vm2は、信頼できないJavaScriptコードを、アプリケーションと同じNode.jsプロセス内でサンドボックス化しようと試みます。これは、サンドボックスとホスト環境の間のすべてのやり取りを傍受して仲介する[プロキシ](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy)の複雑なネットワークを通じて実現されます。
### 根本的な課題
```
---
[Read more](https://github.com/patriksimek/vm2)